[PATCH 1/1] riscv: don't jump to 0x0 in handle_ipi()
Rick Chen
rickchen36 at gmail.com
Tue Aug 11 08:20:15 CEST 2020
Hi Heinrich
> From: Heinrich Schuchardt [mailto:xypron.glpk at gmx.de]
> Sent: Tuesday, August 11, 2020 11:57 AM
> To: Rick Jian-Zhi Chen(陳建志)
> Cc: Sean Anderson; Lukas Auer; Simon Glass; Anup Patel; Daniel Schwierzeck; u-boot at lists.denx.de; Heinrich Schuchardt
> Subject: [PATCH 1/1] riscv: don't jump to 0x0 in handle_ipi()
>
> At least on the Kendryte K210:
>
> gd->arch.available_harts= 0x0000000000000003 arch.ipi[0].addr=
> gd->0x0000000000000000 arch.ipi[0].arg0= 0x0000000000000000
> gd->arch.ipi[0].arg1= 0x0000000000000000 arch.ipi[1].addr=
> gd->0x0000000000000000 arch.ipi[1].arg0= 0x0000000000000000
> gd->arch.ipi[1].arg1= 0x0000000000000000
>
> We should not jump to 0x0 to handle an interrupt.
Can you explain why K210 be affected by it ?
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> arch/riscv/lib/smp.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c index ac22136314..d725fa32e8 100644
> --- a/arch/riscv/lib/smp.c
> +++ b/arch/riscv/lib/smp.c
> @@ -96,6 +96,8 @@ void handle_ipi(ulong hart)
> return;
> }
>
> + if (!smp_function)
> + return;
> smp_function(hart, gd->arch.ipi[hart].arg0, gd->arch.ipi[hart].arg1); }
I remember Sean add this check in
[v10,14/21] riscv: Clean up IPI initialization code
. And I ask him to remove.
https://patchwork.ozlabs.org/project/uboot/patch/20200503024637.327733-15-seanga2@gmail.com/
Thanks,
Rick
>
> --
> 2.28.0
More information about the U-Boot
mailing list