diff options
author | Pingfan Liu <kernelfans@gmail.com> | 2019-07-16 04:40:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-07-22 05:30:18 -0400 |
commit | 69732102426b1c55a257386841fb80ec1f425d32 (patch) | |
tree | 5b6a6361e1adb9719bbd55389769d352eda09890 | |
parent | 5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff) |
x86/realmode: Remove trampoline_status
There is no reader of trampoline_status, it's only written.
It turns out that after commit ce4b1b16502b ("x86/smpboot: Initialize
secondary CPU only if master CPU will wait for it"), trampoline_status is
not needed any more.
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1563266424-3472-1-git-send-email-kernelfans@gmail.com
-rw-r--r-- | arch/x86/include/asm/realmode.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 5 | ||||
-rw-r--r-- | arch/x86/realmode/rm/header.S | 1 | ||||
-rw-r--r-- | arch/x86/realmode/rm/trampoline_32.S | 3 | ||||
-rw-r--r-- | arch/x86/realmode/rm/trampoline_64.S | 3 | ||||
-rw-r--r-- | arch/x86/realmode/rm/trampoline_common.S | 4 |
6 files changed, 0 insertions, 17 deletions
diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h index c53682303c9c..09ecc32f6524 100644 --- a/arch/x86/include/asm/realmode.h +++ b/arch/x86/include/asm/realmode.h | |||
@@ -20,7 +20,6 @@ struct real_mode_header { | |||
20 | u32 ro_end; | 20 | u32 ro_end; |
21 | /* SMP trampoline */ | 21 | /* SMP trampoline */ |
22 | u32 trampoline_start; | 22 | u32 trampoline_start; |
23 | u32 trampoline_status; | ||
24 | u32 trampoline_header; | 23 | u32 trampoline_header; |
25 | #ifdef CONFIG_X86_64 | 24 | #ifdef CONFIG_X86_64 |
26 | u32 trampoline_pgd; | 25 | u32 trampoline_pgd; |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index fdbd47ceb84d..497e9b7077c1 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1023,8 +1023,6 @@ int common_cpu_up(unsigned int cpu, struct task_struct *idle) | |||
1023 | static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle, | 1023 | static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle, |
1024 | int *cpu0_nmi_registered) | 1024 | int *cpu0_nmi_registered) |
1025 | { | 1025 | { |
1026 | volatile u32 *trampoline_status = | ||
1027 | (volatile u32 *) __va(real_mode_header->trampoline_status); | ||
1028 | /* start_ip had better be page-aligned! */ | 1026 | /* start_ip had better be page-aligned! */ |
1029 | unsigned long start_ip = real_mode_header->trampoline_start; | 1027 | unsigned long start_ip = real_mode_header->trampoline_start; |
1030 | 1028 | ||
@@ -1116,9 +1114,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle, | |||
1116 | } | 1114 | } |
1117 | } | 1115 | } |
1118 | 1116 | ||
1119 | /* mark "stuck" area as not stuck */ | ||
1120 | *trampoline_status = 0; | ||
1121 | |||
1122 | if (x86_platform.legacy.warm_reset) { | 1117 | if (x86_platform.legacy.warm_reset) { |
1123 | /* | 1118 | /* |
1124 | * Cleanup possible dangling ends... | 1119 | * Cleanup possible dangling ends... |
diff --git a/arch/x86/realmode/rm/header.S b/arch/x86/realmode/rm/header.S index 30b0d30d861a..6363761cc74c 100644 --- a/arch/x86/realmode/rm/header.S +++ b/arch/x86/realmode/rm/header.S | |||
@@ -19,7 +19,6 @@ GLOBAL(real_mode_header) | |||
19 | .long pa_ro_end | 19 | .long pa_ro_end |
20 | /* SMP trampoline */ | 20 | /* SMP trampoline */ |
21 | .long pa_trampoline_start | 21 | .long pa_trampoline_start |
22 | .long pa_trampoline_status | ||
23 | .long pa_trampoline_header | 22 | .long pa_trampoline_header |
24 | #ifdef CONFIG_X86_64 | 23 | #ifdef CONFIG_X86_64 |
25 | .long pa_trampoline_pgd; | 24 | .long pa_trampoline_pgd; |
diff --git a/arch/x86/realmode/rm/trampoline_32.S b/arch/x86/realmode/rm/trampoline_32.S index 2dd866c9e21e..1868b158480d 100644 --- a/arch/x86/realmode/rm/trampoline_32.S +++ b/arch/x86/realmode/rm/trampoline_32.S | |||
@@ -41,9 +41,6 @@ ENTRY(trampoline_start) | |||
41 | 41 | ||
42 | movl tr_start, %eax # where we need to go | 42 | movl tr_start, %eax # where we need to go |
43 | 43 | ||
44 | movl $0xA5A5A5A5, trampoline_status | ||
45 | # write marker for master knows we're running | ||
46 | |||
47 | /* | 44 | /* |
48 | * GDT tables in non default location kernel can be beyond 16MB and | 45 | * GDT tables in non default location kernel can be beyond 16MB and |
49 | * lgdt will not be able to load the address as in real mode default | 46 | * lgdt will not be able to load the address as in real mode default |
diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S index 24bb7598774e..aee2b45d83b8 100644 --- a/arch/x86/realmode/rm/trampoline_64.S +++ b/arch/x86/realmode/rm/trampoline_64.S | |||
@@ -49,9 +49,6 @@ ENTRY(trampoline_start) | |||
49 | mov %ax, %es | 49 | mov %ax, %es |
50 | mov %ax, %ss | 50 | mov %ax, %ss |
51 | 51 | ||
52 | movl $0xA5A5A5A5, trampoline_status | ||
53 | # write marker for master knows we're running | ||
54 | |||
55 | # Setup stack | 52 | # Setup stack |
56 | movl $rm_stack_end, %esp | 53 | movl $rm_stack_end, %esp |
57 | 54 | ||
diff --git a/arch/x86/realmode/rm/trampoline_common.S b/arch/x86/realmode/rm/trampoline_common.S index 7c706772ab59..8d8208dcca24 100644 --- a/arch/x86/realmode/rm/trampoline_common.S +++ b/arch/x86/realmode/rm/trampoline_common.S | |||
@@ -2,7 +2,3 @@ | |||
2 | .section ".rodata","a" | 2 | .section ".rodata","a" |
3 | .balign 16 | 3 | .balign 16 |
4 | tr_idt: .fill 1, 6, 0 | 4 | tr_idt: .fill 1, 6, 0 |
5 | |||
6 | .bss | ||
7 | .balign 4 | ||
8 | GLOBAL(trampoline_status) .space 4 | ||