diff options
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/cpu/common.c | 13 | ||||
-rw-r--r-- | arch/i386/kernel/nmi.c | 8 | ||||
-rw-r--r-- | arch/i386/kernel/paravirt.c | 9 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 9 |
4 files changed, 24 insertions, 15 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 8689d62abd4a..8a8bbdaaf38a 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -710,11 +710,8 @@ __cpuinit int init_gdt(int cpu, struct task_struct *idle) | |||
710 | return 1; | 710 | return 1; |
711 | } | 711 | } |
712 | 712 | ||
713 | /* Common CPU init for both boot and secondary CPUs */ | 713 | void __cpuinit cpu_set_gdt(int cpu) |
714 | static void __cpuinit _cpu_init(int cpu, struct task_struct *curr) | ||
715 | { | 714 | { |
716 | struct tss_struct * t = &per_cpu(init_tss, cpu); | ||
717 | struct thread_struct *thread = &curr->thread; | ||
718 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); | 715 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); |
719 | 716 | ||
720 | /* Reinit these anyway, even if they've already been done (on | 717 | /* Reinit these anyway, even if they've already been done (on |
@@ -722,6 +719,13 @@ static void __cpuinit _cpu_init(int cpu, struct task_struct *curr) | |||
722 | the real ones). */ | 719 | the real ones). */ |
723 | load_gdt(cpu_gdt_descr); | 720 | load_gdt(cpu_gdt_descr); |
724 | set_kernel_gs(); | 721 | set_kernel_gs(); |
722 | } | ||
723 | |||
724 | /* Common CPU init for both boot and secondary CPUs */ | ||
725 | static void __cpuinit _cpu_init(int cpu, struct task_struct *curr) | ||
726 | { | ||
727 | struct tss_struct * t = &per_cpu(init_tss, cpu); | ||
728 | struct thread_struct *thread = &curr->thread; | ||
725 | 729 | ||
726 | if (cpu_test_and_set(cpu, cpu_initialized)) { | 730 | if (cpu_test_and_set(cpu, cpu_initialized)) { |
727 | printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); | 731 | printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); |
@@ -807,6 +811,7 @@ void __cpuinit cpu_init(void) | |||
807 | local_irq_enable(); | 811 | local_irq_enable(); |
808 | } | 812 | } |
809 | 813 | ||
814 | cpu_set_gdt(cpu); | ||
810 | _cpu_init(cpu, curr); | 815 | _cpu_init(cpu, curr); |
811 | } | 816 | } |
812 | 817 | ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index a5e34d655965..1a6f8bb8881c 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -310,13 +310,7 @@ static int __init setup_nmi_watchdog(char *str) | |||
310 | 310 | ||
311 | if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) | 311 | if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) |
312 | return 0; | 312 | return 0; |
313 | /* | 313 | |
314 | * If any other x86 CPU has a local APIC, then | ||
315 | * please test the NMI stuff there and send me the | ||
316 | * missing bits. Right now Intel P6/P4 and AMD K7 only. | ||
317 | */ | ||
318 | if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0)) | ||
319 | return 0; /* no lapic support */ | ||
320 | nmi_watchdog = nmi; | 314 | nmi_watchdog = nmi; |
321 | return 1; | 315 | return 1; |
322 | } | 316 | } |
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index 3dceab5828f1..e55fd05da0f5 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c | |||
@@ -566,4 +566,11 @@ struct paravirt_ops paravirt_ops = { | |||
566 | .irq_enable_sysexit = native_irq_enable_sysexit, | 566 | .irq_enable_sysexit = native_irq_enable_sysexit, |
567 | .iret = native_iret, | 567 | .iret = native_iret, |
568 | }; | 568 | }; |
569 | EXPORT_SYMBOL(paravirt_ops); | 569 | |
570 | /* | ||
571 | * NOTE: CONFIG_PARAVIRT is experimental and the paravirt_ops | ||
572 | * semantics are subject to change. Hence we only do this | ||
573 | * internal-only export of this, until it gets sorted out and | ||
574 | * all lowlevel CPU ops used by modules are separately exported. | ||
575 | */ | ||
576 | EXPORT_SYMBOL_GPL(paravirt_ops); | ||
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index dea7ef9d3e82..8c6c8c52b95c 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -596,6 +596,12 @@ static void __cpuinit start_secondary(void *unused) | |||
596 | void __devinit initialize_secondary(void) | 596 | void __devinit initialize_secondary(void) |
597 | { | 597 | { |
598 | /* | 598 | /* |
599 | * switch to the per CPU GDT we already set up | ||
600 | * in do_boot_cpu() | ||
601 | */ | ||
602 | cpu_set_gdt(current_thread_info()->cpu); | ||
603 | |||
604 | /* | ||
599 | * We don't actually need to load the full TSS, | 605 | * We don't actually need to load the full TSS, |
600 | * basically just the stack pointer and the eip. | 606 | * basically just the stack pointer and the eip. |
601 | */ | 607 | */ |
@@ -972,9 +978,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
972 | /* Stack for startup_32 can be just as for start_secondary onwards */ | 978 | /* Stack for startup_32 can be just as for start_secondary onwards */ |
973 | stack_start.esp = (void *) idle->thread.esp; | 979 | stack_start.esp = (void *) idle->thread.esp; |
974 | 980 | ||
975 | start_pda = cpu_pda(cpu); | ||
976 | cpu_gdt_descr = per_cpu(cpu_gdt_descr, cpu); | ||
977 | |||
978 | irq_ctx_init(cpu); | 981 | irq_ctx_init(cpu); |
979 | 982 | ||
980 | x86_cpu_to_apicid[cpu] = apicid; | 983 | x86_cpu_to_apicid[cpu] = apicid; |