[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.9999.2001070253000.75790@viisi.sifive.com>
Date: Tue, 7 Jan 2020 02:54:07 -0800 (PST)
From: Paul Walmsley <paul.walmsley@...ive.com>
To: Greentime Hu <greentime.hu@...ive.com>
cc: green.hu@...il.com, greentime@...nel.org, palmer@...belt.com,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: to make sure the cores in .Lsecondary_park
Hi Greentime,
On Tue, 7 Jan 2020, Greentime Hu wrote:
> The code in secondary_park is currently placed in the .init section. The
> kernel reclaims and clears this code when it finishes booting. That
> causes the cores parked in it to go to somewhere unpredictable, so we
> move this function out of init to make sure the cores stay looping there.
>
> Signed-off-by: Greentime Hu <greentime.hu@...ive.com>
> ---
> arch/riscv/kernel/head.S | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
> index f8f996916c5b..d8da076fc69e 100644
> --- a/arch/riscv/kernel/head.S
> +++ b/arch/riscv/kernel/head.S
> @@ -217,11 +217,6 @@ relocate:
> tail smp_callin
> #endif
>
> -.align 2
> -.Lsecondary_park:
> - /* We lack SMP support or have too many harts, so park this hart */
> - wfi
> - j .Lsecondary_park
> END(_start)
>
> #ifdef CONFIG_RISCV_M_MODE
> @@ -303,6 +298,14 @@ ENTRY(reset_regs)
> END(reset_regs)
> #endif /* CONFIG_RISCV_M_MODE */
>
> +__FINIT
> +.section ".text", "ax",@progbits
Can the __FINIT be dropped?
> +.align 2
> +.Lsecondary_park:
> + /* We lack SMP support or have too many harts, so park this hart */
> + wfi
> + j .Lsecondary_park
> +
> __PAGE_ALIGNED_BSS
> /* Empty zero page */
> .balign PAGE_SIZE
- Paul
Powered by blists - more mailing lists