Skip to content

Commit deff8a2

Browse files
Jiri Slabysuryasaimadhu
authored andcommitted
x86/boot: Annotate local functions
.Lrelocated, .Lpaging_enabled, .Lno_longmode, and .Lin_pm32 are self-standing local functions, annotate them as such and preserve "no alignment". The annotations do not generate anything yet. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Cao jin <caoj.fnst@cn.fujitsu.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Wei Huang <wei@redhat.com> Cc: x86-ml <x86@kernel.org> Cc: Xiaoyao Li <xiaoyao.li@linux.intel.com> Link: https://lkml.kernel.org/r/20191011115108.12392-8-jslaby@suse.cz
1 parent 74d8b90 commit deff8a2

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎arch/x86/boot/compressed/head_32.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ ENDPROC(efi32_stub_entry)
209209
#endif
210210

211211
.text
212-
.Lrelocated:
212+
SYM_FUNC_START_LOCAL_NOALIGN(.Lrelocated)
213213

214214
/*
215215
* Clear BSS (stack is currently empty)
@@ -260,6 +260,7 @@ ENDPROC(efi32_stub_entry)
260260
*/
261261
xorl %ebx, %ebx
262262
jmp *%eax
263+
SYM_FUNC_END(.Lrelocated)
263264

264265
#ifdef CONFIG_EFI_STUB
265266
.data

‎arch/x86/boot/compressed/head_64.S‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ ENDPROC(efi64_stub_entry)
511511
#endif
512512

513513
.text
514-
.Lrelocated:
514+
SYM_FUNC_START_LOCAL_NOALIGN(.Lrelocated)
515515

516516
/*
517517
* Clear BSS (stack is currently empty)
@@ -540,6 +540,7 @@ ENDPROC(efi64_stub_entry)
540540
* Jump to the decompressed kernel.
541541
*/
542542
jmp *%rax
543+
SYM_FUNC_END(.Lrelocated)
543544

544545
/*
545546
* Adjust the global offset table
@@ -635,9 +636,10 @@ ENTRY(trampoline_32bit_src)
635636
lret
636637

637638
.code64
638-
.Lpaging_enabled:
639+
SYM_FUNC_START_LOCAL_NOALIGN(.Lpaging_enabled)
639640
/* Return from the trampoline */
640641
jmp *%rdi
642+
SYM_FUNC_END(.Lpaging_enabled)
641643

642644
/*
643645
* The trampoline code has a size limit.
@@ -647,11 +649,12 @@ ENTRY(trampoline_32bit_src)
647649
.org trampoline_32bit_src + TRAMPOLINE_32BIT_CODE_SIZE
648650

649651
.code32
650-
.Lno_longmode:
652+
SYM_FUNC_START_LOCAL_NOALIGN(.Lno_longmode)
651653
/* This isn't an x86-64 CPU, so hang intentionally, we cannot continue */
652654
1:
653655
hlt
654656
jmp 1b
657+
SYM_FUNC_END(.Lno_longmode)
655658

656659
#include "../../kernel/verify_cpu.S"
657660

‎arch/x86/boot/pmjump.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ENDPROC(protected_mode_jump)
4646

4747
.code32
4848
.section ".text32","ax"
49-
.Lin_pm32:
49+
SYM_FUNC_START_LOCAL_NOALIGN(.Lin_pm32)
5050
# Set up data segments for flat 32-bit mode
5151
movl %ecx, %ds
5252
movl %ecx, %es
@@ -72,4 +72,4 @@ ENDPROC(protected_mode_jump)
7272
lldt %cx
7373

7474
jmpl *%eax # Jump to the 32-bit entrypoint
75-
ENDPROC(.Lin_pm32)
75+
SYM_FUNC_END(.Lin_pm32)

0 commit comments

Comments
 (0)