Skip to content

Commit a5d4420

Browse files
brooniectmarinas
authored andcommitted
arm64: kernel: Convert to modern annotations for assembly data
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These include specific annotations for the start and end of data, update symbols for data to use these. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent ebdf44a commit a5d4420

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

arch/arm64/kernel/entry.S

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,9 @@ SYM_CODE_END(tramp_exit_compat)
859859
#ifdef CONFIG_RANDOMIZE_BASE
860860
.pushsection ".rodata", "a"
861861
.align PAGE_SHIFT
862-
.globl __entry_tramp_data_start
863-
__entry_tramp_data_start:
862+
SYM_DATA_START(__entry_tramp_data_start)
864863
.quad vectors
864+
SYM_DATA_END(__entry_tramp_data_start)
865865
.popsection // .rodata
866866
#endif /* CONFIG_RANDOMIZE_BASE */
867867
#endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */
@@ -983,8 +983,9 @@ NOKPROBE(__sdei_asm_exit_trampoline)
983983
.popsection // .entry.tramp.text
984984
#ifdef CONFIG_RANDOMIZE_BASE
985985
.pushsection ".rodata", "a"
986-
__sdei_asm_trampoline_next_handler:
986+
SYM_DATA_START(__sdei_asm_trampoline_next_handler)
987987
.quad __sdei_asm_handler
988+
SYM_DATA_END(__sdei_asm_trampoline_next_handler)
988989
.popsection // .rodata
989990
#endif /* CONFIG_RANDOMIZE_BASE */
990991
#endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */

arch/arm64/kernel/head.S

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,9 @@ SYM_FUNC_END(__primary_switched)
464464
*/
465465
.section ".idmap.text","awx"
466466

467-
ENTRY(kimage_vaddr)
467+
SYM_DATA_START(kimage_vaddr)
468468
.quad _text - TEXT_OFFSET
469+
SYM_DATA_END(kimage_vaddr)
469470
EXPORT_SYMBOL(kimage_vaddr)
470471

471472
/*
@@ -667,15 +668,17 @@ SYM_FUNC_END(set_cpu_boot_mode_flag)
667668
* This is not in .bss, because we set it sufficiently early that the boot-time
668669
* zeroing of .bss would clobber it.
669670
*/
670-
ENTRY(__boot_cpu_mode)
671+
SYM_DATA_START(__boot_cpu_mode)
671672
.long BOOT_CPU_MODE_EL2
672673
.long BOOT_CPU_MODE_EL1
674+
SYM_DATA_END(__boot_cpu_mode)
673675
/*
674676
* The booting CPU updates the failed status @__early_cpu_boot_status,
675677
* with MMU turned off.
676678
*/
677-
ENTRY(__early_cpu_boot_status)
679+
SYM_DATA_START(__early_cpu_boot_status)
678680
.quad 0
681+
SYM_DATA_END(__early_cpu_boot_status)
679682

680683
.popsection
681684

0 commit comments

Comments
 (0)