Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1592439
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] x86/head_64.S: Rename start_cpu() |
| Date | 2017-03-04 11:00 +0100 |
| Message-ID | <theDL-7cX-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Borislav Petkov <bp@suse.de> It doesn't really start a CPU but does a far jump to C code. So call it that. Eliminate the unconditional JMP to it from secondary_startup_64() but make the jump to C code piece part of secondary_startup_64() instead. Also, it doesn't need to be a global symbol either so make it a local label. One less needlessly global symbol in the symbol table. No functionality change. Signed-off-by: Borislav Petkov <bp@suse.de> --- arch/x86/kernel/head_64.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index b467b14b03eb..ac9d327d2e42 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -269,10 +269,8 @@ ENTRY(secondary_startup_64) /* rsi is pointer to real mode structure with interesting info. pass it to C */ movq %rsi, %rdi - jmp start_cpu -ENDPROC(secondary_startup_64) -ENTRY(start_cpu) +.Ljump_to_C_code: /* * Jump to run C code and to be on a real kernel address. * Since we are running on identity-mapped space we have to jump @@ -305,7 +303,7 @@ ENTRY(start_cpu) pushq %rax # target address in negative space lretq .Lafter_lret: -ENDPROC(start_cpu) +ENDPROC(secondary_startup_64) #include "verify_cpu.S" @@ -313,11 +311,11 @@ ENDPROC(start_cpu) /* * Boot CPU0 entry point. It's called from play_dead(). Everything has been set * up already except stack. We just set up stack here. Then call - * start_secondary() via start_cpu(). + * start_secondary() via .Ljump_to_C_code. */ ENTRY(start_cpu0) movq initial_stack(%rip), %rsp - jmp start_cpu + jmp .Ljump_to_C_code ENDPROC(start_cpu0) #endif -- 2.11.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] x86/head_64.S: Rename start_cpu() Borislav Petkov <bp@alien8.de> - 2017-03-04 11:00 +0100
[PATCH 2/2] x86/head_64.S: Pass struct boot_params' virtual address to C Borislav Petkov <bp@alien8.de> - 2017-03-04 11:00 +0100
Re: [PATCH 2/2] x86/head_64.S: Pass struct boot_params' virtual address to C Ingo Molnar <mingo@kernel.org> - 2017-03-07 10:20 +0100
Re: [PATCH 2/2] x86/head_64.S: Pass struct boot_params' virtual address to C Borislav Petkov <bp@alien8.de> - 2017-03-07 12:00 +0100
Re: [PATCH 1/2] x86/head_64.S: Rename start_cpu() Ingo Molnar <mingo@kernel.org> - 2017-03-07 10:10 +0100
Re: [PATCH 1/2] x86/head_64.S: Rename start_cpu() Borislav Petkov <bp@alien8.de> - 2017-03-07 12:00 +0100
Re: [PATCH 1/2] x86/head_64.S: Rename start_cpu() Ingo Molnar <mingo@kernel.org> - 2017-03-07 16:00 +0100
[tip:x86/boot] x86/boot/64: Rename start_cpu() tip-bot for Borislav Petkov <tipbot@zytor.com> - 2017-03-07 14:10 +0100
csiph-web