lkml.org 
[lkml]   [2020]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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@redhat.com>

This looks like a sensible cleanup on its own. FWIW:

Acked-by: Mark Rutland <mark.rutland@arm.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
>

\
 
 \ /
  Last update: 2020-01-09 17:52    [W:0.354 / U:3.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site