Skip to content

Commit 108eae2

Browse files
Julien Thierrywilldeacon
authored andcommitted
arm64: entry: Avoid empty alternatives entries
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. Acked-by: Mark Rutland <[email protected]> Signed-off-by: Julien Thierry <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 9834602 commit 108eae2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/entry.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@
6060
.macro kernel_ventry, el, label, regsize = 64
6161
.align 7
6262
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
63-
alternative_if ARM64_UNMAP_KERNEL_AT_EL0
6463
.if \el == 0
64+
alternative_if ARM64_UNMAP_KERNEL_AT_EL0
6565
.if \regsize == 64
6666
mrs x30, tpidrro_el0
6767
msr tpidrro_el0, xzr
6868
.else
6969
mov x30, xzr
7070
.endif
71-
.endif
7271
alternative_else_nop_endif
72+
.endif
7373
#endif
7474

7575
sub sp, sp, #S_FRAME_SIZE

0 commit comments

Comments
 (0)