x86: remove pda_init()
authorBrian Gerst <brgerst@gmail.com>
Mon, 19 Jan 2009 03:21:27 +0000 (12:21 +0900)
committerTejun Heo <tj@kernel.org>
Tue, 20 Jan 2009 03:29:19 +0000 (12:29 +0900)
Impact: cleanup

Copy the code to cpu_init() to satisfy the requirement that the cpu
be reinitialized.  Remove all other calls, since the segments are
already initialized in head_64.S.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/x86/include/asm/pda.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/head64.c
arch/x86/xen/enlighten.c

index 4a8c9d382c93ebf2382a0280c686a4dac847f53c..b473e952439a18354e197c57aac3087bb9a55b05 100644 (file)
@@ -24,7 +24,6 @@ struct x8664_pda {
 } ____cacheline_aligned_in_smp;
 
 DECLARE_PER_CPU(struct x8664_pda, __pda);
-extern void pda_init(int);
 
 #define cpu_pda(cpu)           (&per_cpu(__pda, cpu))
 
index 7976a6a0f65c1c626c4fb983e7c45f7f6d84198d..f83a4d6160f0ab53a871b0caf12844ea7f18adb1 100644 (file)
@@ -895,15 +895,6 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack);
 
 DEFINE_PER_CPU(unsigned int, irq_count) = -1;
 
-void __cpuinit pda_init(int cpu)
-{
-       /* Setup up data that may be needed in __get_free_pages early */
-       loadsegment(fs, 0);
-       loadsegment(gs, 0);
-
-       load_pda_offset(cpu);
-}
-
 static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks
        [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ])
        __aligned(PAGE_SIZE);
@@ -967,9 +958,9 @@ void __cpuinit cpu_init(void)
        struct task_struct *me;
        int i;
 
-       /* CPU 0 is initialised in head64.c */
-       if (cpu != 0)
-               pda_init(cpu);
+       loadsegment(fs, 0);
+       loadsegment(gs, 0);
+       load_pda_offset(cpu);
 
 #ifdef CONFIG_NUMA
        if (cpu != 0 && percpu_read(node_number) == 0 &&
index af67d3227ea6fe7e6182f21030f687b78b4dd71b..f5b2722476907bcd3fe7ace735238330c604b9e9 100644 (file)
@@ -91,8 +91,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
        if (console_loglevel == 10)
                early_printk("Kernel alive\n");
 
-       pda_init(0);
-
        x86_64_start_reservations(real_mode_data);
 }
 
index 75b94139e1f2210811b431a21b9f6a63a81a1a98..bef941f6145140c2c8ceeb50b532a163f9cd58e6 100644 (file)
@@ -1645,7 +1645,6 @@ asmlinkage void __init xen_start_kernel(void)
 #ifdef CONFIG_X86_64
        /* Disable until direct per-cpu data access. */
        have_vcpu_info_placement = 0;
-       pda_init(0);
 #endif
 
        xen_smp_init();
This page took 0.034328 seconds and 5 git commands to generate.