Re: [PATCH v2] RISC-V: Check clint_time_val before use

2020-09-26 Thread Palmer Dabbelt
On Sat, 26 Sep 2020 22:38:17 PDT (-0700), a...@brainfault.org wrote: On Sun, Sep 27, 2020 at 5:50 AM Palmer Dabbelt wrote: On Sat, 26 Sep 2020 03:31:29 PDT (-0700), Damien Le Moal wrote: > On Sat, 2020-09-26 at 15:51 +0530, Anup Patel wrote: >> The NoMMU kernel is broken for QEMU virt machine

Re: [PATCH v2] RISC-V: Check clint_time_val before use

2020-09-26 Thread Palmer Dabbelt
On Sat, 26 Sep 2020 22:35:39 PDT (-0700), a...@brainfault.org wrote: On Sun, Sep 27, 2020 at 5:50 AM Palmer Dabbelt wrote: On Sat, 26 Sep 2020 03:31:29 PDT (-0700), Damien Le Moal wrote: > On Sat, 2020-09-26 at 15:51 +0530, Anup Patel wrote: >> The NoMMU kernel is broken for QEMU virt machine

Re: [PATCH v2] RISC-V: Check clint_time_val before use

2020-09-26 Thread Anup Patel
On Sun, Sep 27, 2020 at 5:50 AM Palmer Dabbelt wrote: > > On Sat, 26 Sep 2020 03:31:29 PDT (-0700), Damien Le Moal wrote: > > On Sat, 2020-09-26 at 15:51 +0530, Anup Patel wrote: > >> The NoMMU kernel is broken for QEMU virt machine from Linux-5.9-rc6 > >> because the get_cycles() and friends are

Re: [PATCH v2] RISC-V: Check clint_time_val before use

2020-09-26 Thread Anup Patel
On Sun, Sep 27, 2020 at 5:50 AM Palmer Dabbelt wrote: > > On Sat, 26 Sep 2020 03:31:29 PDT (-0700), Damien Le Moal wrote: > > On Sat, 2020-09-26 at 15:51 +0530, Anup Patel wrote: > >> The NoMMU kernel is broken for QEMU virt machine from Linux-5.9-rc6 > >> because the get_cycles() and friends are

Re: [PATCH v2] RISC-V: Check clint_time_val before use

2020-09-26 Thread Palmer Dabbelt
On Sat, 26 Sep 2020 03:31:29 PDT (-0700), Damien Le Moal wrote: On Sat, 2020-09-26 at 15:51 +0530, Anup Patel wrote: The NoMMU kernel is broken for QEMU virt machine from Linux-5.9-rc6 because the get_cycles() and friends are called very early from rand_initialize() before CLINT driver is probed

Re: [PATCH v2] RISC-V: Check clint_time_val before use

2020-09-26 Thread Damien Le Moal
On Sat, 2020-09-26 at 15:51 +0530, Anup Patel wrote: > The NoMMU kernel is broken for QEMU virt machine from Linux-5.9-rc6 > because the get_cycles() and friends are called very early from > rand_initialize() before CLINT driver is probed. To fix this, we > should check clint_time_val before use in