[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200109165145.GI3112@lakrids.cambridge.arm.com>
Date: Thu, 9 Jan 2020 16:51:46 +0000
From: Mark Rutland <mark.rutland@....com>
To: Julien Thierry <jthierry@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
jpoimboe@...hat.com, peterz@...radead.org, raphael.gault@....com,
catalin.marinas@....com, will@...nel.org
Subject: Re: [RFC v5 56/57] arm64: entry: Avoid empty alternatives entries
On Thu, Jan 09, 2020 at 04:02:59PM +0000, Julien Thierry wrote:
> kernel_ventry will create alternative entries to potentially replace
> 0 instructions with 0 instructions for EL1 vectors. While this does not
> cause an issue, it pointlessly takes up some bytes in the alternatives
> section.
>
> Do not generate such entries.
>
> Signed-off-by: Julien Thierry <jthierry@...hat.com>
This looks like a sensible cleanup on its own. FWIW:
Acked-by: Mark Rutland <mark.rutland@....com>
Mark.
> ---
> arch/arm64/kernel/entry.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 7c6a0a41676f..605bb7cbe499 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -60,16 +60,16 @@
> .macro kernel_ventry, el, label, regsize = 64
> .align 7
> #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
> -alternative_if ARM64_UNMAP_KERNEL_AT_EL0
> .if \el == 0
> +alternative_if ARM64_UNMAP_KERNEL_AT_EL0
> .if \regsize == 64
> mrs x30, tpidrro_el0
> msr tpidrro_el0, xzr
> .else
> mov x30, xzr
> .endif
> - .endif
> alternative_else_nop_endif
> + .endif
> #endif
>
> sub sp, sp, #S_FRAME_SIZE
> --
> 2.21.0
>
Powered by blists - more mailing lists