Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-04 Thread Rick Chen
Hi Sean > Hi Sean > > > On Mon, 2020-03-02 at 10:43 -0500, Sean Anderson wrote: > > > > > On 3/2/20 4:08 AM, Rick Chen wrote: > > > > Hi Sean > > > > > > > > > The IPI code could have race conditions in several places. > > > > > * Several harts could race on the value of gd->arch->clint/plic > >

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-04 Thread Lukas Auer
On Tue, 2020-03-03 at 16:57 -0500, Sean Anderson wrote: > On 3/3/20 4:53 PM, Lukas Auer wrote: > > On Mon, 2020-03-02 at 18:43 -0500, Sean Anderson wrote: > > > On 3/2/20 6:17 PM, Lukas Auer wrote: > > > > Don't move this. It is intended to be run before the IPI is cleared. > > > > > > Hm, ok. I

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-03 Thread Sean Anderson
On 3/3/20 4:53 PM, Lukas Auer wrote: > On Mon, 2020-03-02 at 18:43 -0500, Sean Anderson wrote: >> On 3/2/20 6:17 PM, Lukas Auer wrote: >>> Don't move this. It is intended to be run before the IPI is cleared. >> >> Hm, ok. I think I moved it to after because of the 'if (!smp_function)' >> check,

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-03 Thread Lukas Auer
On Mon, 2020-03-02 at 18:43 -0500, Sean Anderson wrote: > On 3/2/20 6:17 PM, Lukas Auer wrote: > > On Fri, 2020-02-28 at 16:05 -0500, Sean Anderson wrote: > > > > > The IPI code could have race conditions in several places. > > > * Several harts could race on the value of gd->arch->clint/plic > >

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-03 Thread Rick Chen
Hi Sean > On Mon, 2020-03-02 at 10:43 -0500, Sean Anderson wrote: > > > On 3/2/20 4:08 AM, Rick Chen wrote: > > > Hi Sean > > > > > > > The IPI code could have race conditions in several places. > > > > * Several harts could race on the value of gd->arch->clint/plic > > > > * Non-boot harts could

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-02 Thread Sean Anderson
On 3/2/20 6:17 PM, Lukas Auer wrote: > On Fri, 2020-02-28 at 16:05 -0500, Sean Anderson wrote: > >> The IPI code could have race conditions in several places. >> * Several harts could race on the value of gd->arch->clint/plic >> * Non-boot harts could race with the main hart on the DM subsystem

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-02 Thread Lukas Auer
On Fri, 2020-02-28 at 16:05 -0500, Sean Anderson wrote: > The IPI code could have race conditions in several places. > * Several harts could race on the value of gd->arch->clint/plic > * Non-boot harts could race with the main hart on the DM subsystem In > addition, if an IPI was pending when

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-02 Thread Lukas Auer
On Mon, 2020-03-02 at 10:43 -0500, Sean Anderson wrote: > On 3/2/20 4:08 AM, Rick Chen wrote: > > Hi Sean > > > > > The IPI code could have race conditions in several places. > > > * Several harts could race on the value of gd->arch->clint/plic > > > * Non-boot harts could race with the main

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-02 Thread Sean Anderson
On 3/2/20 4:08 AM, Rick Chen wrote: > Hi Sean > >> The IPI code could have race conditions in several places. >> * Several harts could race on the value of gd->arch->clint/plic >> * Non-boot harts could race with the main hart on the DM subsystem In >> addition, if an IPI was pending when

Re: [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-03-02 Thread Rick Chen
Hi Sean > The IPI code could have race conditions in several places. > * Several harts could race on the value of gd->arch->clint/plic > * Non-boot harts could race with the main hart on the DM subsystem In > addition, if an IPI was pending when U-Boot started, it would cause the > IPI

[PATCH v5 27/33] riscv: Fix race conditions when initializing IPI

2020-02-28 Thread Sean Anderson
The IPI code could have race conditions in several places. * Several harts could race on the value of gd->arch->clint/plic * Non-boot harts could race with the main hart on the DM subsystem In addition, if an IPI was pending when U-Boot started, it would cause the IPI handler to jump to