Skip to content

Commit 6973210

Browse files
liupingfanKAGA-KOKO
authored andcommitted
x86/realmode: Remove trampoline_status
There is no reader of trampoline_status, it's only written. It turns out that after commit ce4b1b1 ("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
1 parent 5f9e832 commit 6973210

File tree

6 files changed

+0
-17
lines changed

6 files changed

+0
-17
lines changed

arch/x86/include/asm/realmode.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct real_mode_header {
2020
u32 ro_end;
2121
/* SMP trampoline */
2222
u32 trampoline_start;
23-
u32 trampoline_status;
2423
u32 trampoline_header;
2524
#ifdef CONFIG_X86_64
2625
u32 trampoline_pgd;

arch/x86/kernel/smpboot.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,6 @@ int common_cpu_up(unsigned int cpu, struct task_struct *idle)
10231023
static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle,
10241024
int *cpu0_nmi_registered)
10251025
{
1026-
volatile u32 *trampoline_status =
1027-
(volatile u32 *) __va(real_mode_header->trampoline_status);
10281026
/* start_ip had better be page-aligned! */
10291027
unsigned long start_ip = real_mode_header->trampoline_start;
10301028

@@ -1116,9 +1114,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle,
11161114
}
11171115
}
11181116

1119-
/* mark "stuck" area as not stuck */
1120-
*trampoline_status = 0;
1121-
11221117
if (x86_platform.legacy.warm_reset) {
11231118
/*
11241119
* Cleanup possible dangling ends...

arch/x86/realmode/rm/header.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ GLOBAL(real_mode_header)
1919
.long pa_ro_end
2020
/* SMP trampoline */
2121
.long pa_trampoline_start
22-
.long pa_trampoline_status
2322
.long pa_trampoline_header
2423
#ifdef CONFIG_X86_64
2524
.long pa_trampoline_pgd;

arch/x86/realmode/rm/trampoline_32.S

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ ENTRY(trampoline_start)
4141

4242
movl tr_start, %eax # where we need to go
4343

44-
movl $0xA5A5A5A5, trampoline_status
45-
# write marker for master knows we're running
46-
4744
/*
4845
* GDT tables in non default location kernel can be beyond 16MB and
4946
* lgdt will not be able to load the address as in real mode default

arch/x86/realmode/rm/trampoline_64.S

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ ENTRY(trampoline_start)
4949
mov %ax, %es
5050
mov %ax, %ss
5151

52-
movl $0xA5A5A5A5, trampoline_status
53-
# write marker for master knows we're running
54-
5552
# Setup stack
5653
movl $rm_stack_end, %esp
5754

arch/x86/realmode/rm/trampoline_common.S

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@
22
.section ".rodata","a"
33
.balign 16
44
tr_idt: .fill 1, 6, 0
5-
6-
.bss
7-
.balign 4
8-
GLOBAL(trampoline_status) .space 4

0 commit comments

Comments
 (0)