[PATCH v2 3/7] riscv: Use a valid bit to ignore already-pending IPIs

Bin Meng
2020-09-15T06:35:25Z

On Mon, Sep 14, 2020 at 10:23 PM Sean Anderson <seanga2@gmail.com> wrote:
>
> Some IPIs may already be pending when U-Boot is started. This could be a
> problem if a secondary hart tries to handle an IPI before the boot hart has
> initialized the IPI device.
>
> This commit introduces a valid bit so secondary harts know when and IPI
> originates from U-boot, and it is safe to use the IPI API. The valid bit is

nits: U-Boot

> initialized to 0 by board_init_f_init_reserve. Before this, secondary harts
> wait in wait_for_gd_init.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
>
> Changes in v2:
> - Use a valid bit instead of addr to validate IPIs
>
> arch/riscv/include/asm/smp.h | 7 +++++++
> arch/riscv/lib/smp.c | 16 ++++++++++++++--
> 2 files changed, 21 insertions(+), 2 deletions(-)
>

Reviewed-by: Bin Meng <bin.meng@windriver.com>