Skip to content

Commit 9d97d0d

Browse files
glommerIngo Molnar
authored andcommitted
x86: move stack_start to smp.h
voyager would conflict with it, but the types are ultimately compatible. So remove the extern definition from voyager_smp.c in favour of the common one Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 7cc3959 commit 9d97d0d

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

‎arch/x86/kernel/smpboot_32.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,6 @@ void __devinit initialize_secondary(void)
257257
:"m" (current->thread.sp),"m" (current->thread.ip));
258258
}
259259

260-
/* Static state in head.S used to set up a CPU */
261-
extern struct {
262-
void * sp;
263-
unsigned short ss;
264-
} stack_start;
265-
266260
static inline void __inquire_remote_apic(int apicid)
267261
{
268262
unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };

‎arch/x86/mach-voyager/voyager_smp.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,6 @@ static void __init do_boot_cpu(__u8 cpu)
520520
& ~(voyager_extended_vic_processors
521521
& voyager_allowed_boot_processors);
522522

523-
/* This is an area in head.S which was used to set up the
524-
* initial kernel stack. We need to alter this to give the
525-
* booting CPU a new stack (taken from its idle process) */
526-
extern struct {
527-
__u8 *sp;
528-
unsigned short ss;
529-
} stack_start;
530523
/* This is the format of the CPI IDT gate (in real mode) which
531524
* we're hijacking to boot the CPU */
532525
union IDTFormat {

‎include/asm-x86/smp.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ extern const unsigned char trampoline_data [];
2828
extern const unsigned char trampoline_end [];
2929
extern unsigned char *trampoline_base;
3030

31+
/* Static state in head.S used to set up a CPU */
32+
extern struct {
33+
void *sp;
34+
unsigned short ss;
35+
} stack_start;
36+
37+
3138
struct smp_ops {
3239
void (*smp_prepare_boot_cpu)(void);
3340
void (*smp_prepare_cpus)(unsigned max_cpus);

0 commit comments

Comments
 (0)