aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/cpu/common.c')
-rw-r--r--arch/i386/kernel/cpu/common.c13
1 files changed, 9 insertions, 4 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 */ 713void __cpuinit cpu_set_gdt(int cpu)
714static 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 */
725static 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