diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-18 22:21:27 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-19 22:29:19 -0500 |
commit | 8ce031972b40da58c268caba8c5ea3c0856d7131 (patch) | |
tree | 2f41175bdf1001ebe7249fdfddfe8fe578d860a9 | |
parent | b4a8f7a262e79ecb0b39beb1449af524a78887f8 (diff) |
x86: remove pda_init()
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>
-rw-r--r-- | arch/x86/include/asm/pda.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/head64.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 1 |
4 files changed, 3 insertions, 16 deletions
diff --git a/arch/x86/include/asm/pda.h b/arch/x86/include/asm/pda.h index 4a8c9d382c93..b473e952439a 100644 --- a/arch/x86/include/asm/pda.h +++ b/arch/x86/include/asm/pda.h | |||
@@ -24,7 +24,6 @@ struct x8664_pda { | |||
24 | } ____cacheline_aligned_in_smp; | 24 | } ____cacheline_aligned_in_smp; |
25 | 25 | ||
26 | DECLARE_PER_CPU(struct x8664_pda, __pda); | 26 | DECLARE_PER_CPU(struct x8664_pda, __pda); |
27 | extern void pda_init(int); | ||
28 | 27 | ||
29 | #define cpu_pda(cpu) (&per_cpu(__pda, cpu)) | 28 | #define cpu_pda(cpu) (&per_cpu(__pda, cpu)) |
30 | 29 | ||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 7976a6a0f65c..f83a4d6160f0 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -895,15 +895,6 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack); | |||
895 | 895 | ||
896 | DEFINE_PER_CPU(unsigned int, irq_count) = -1; | 896 | DEFINE_PER_CPU(unsigned int, irq_count) = -1; |
897 | 897 | ||
898 | void __cpuinit pda_init(int cpu) | ||
899 | { | ||
900 | /* Setup up data that may be needed in __get_free_pages early */ | ||
901 | loadsegment(fs, 0); | ||
902 | loadsegment(gs, 0); | ||
903 | |||
904 | load_pda_offset(cpu); | ||
905 | } | ||
906 | |||
907 | static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks | 898 | static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks |
908 | [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]) | 899 | [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]) |
909 | __aligned(PAGE_SIZE); | 900 | __aligned(PAGE_SIZE); |
@@ -967,9 +958,9 @@ void __cpuinit cpu_init(void) | |||
967 | struct task_struct *me; | 958 | struct task_struct *me; |
968 | int i; | 959 | int i; |
969 | 960 | ||
970 | /* CPU 0 is initialised in head64.c */ | 961 | loadsegment(fs, 0); |
971 | if (cpu != 0) | 962 | loadsegment(gs, 0); |
972 | pda_init(cpu); | 963 | load_pda_offset(cpu); |
973 | 964 | ||
974 | #ifdef CONFIG_NUMA | 965 | #ifdef CONFIG_NUMA |
975 | if (cpu != 0 && percpu_read(node_number) == 0 && | 966 | if (cpu != 0 && percpu_read(node_number) == 0 && |
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index af67d3227ea6..f5b272247690 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -91,8 +91,6 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
91 | if (console_loglevel == 10) | 91 | if (console_loglevel == 10) |
92 | early_printk("Kernel alive\n"); | 92 | early_printk("Kernel alive\n"); |
93 | 93 | ||
94 | pda_init(0); | ||
95 | |||
96 | x86_64_start_reservations(real_mode_data); | 94 | x86_64_start_reservations(real_mode_data); |
97 | } | 95 | } |
98 | 96 | ||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 75b94139e1f2..bef941f61451 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1645,7 +1645,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
1645 | #ifdef CONFIG_X86_64 | 1645 | #ifdef CONFIG_X86_64 |
1646 | /* Disable until direct per-cpu data access. */ | 1646 | /* Disable until direct per-cpu data access. */ |
1647 | have_vcpu_info_placement = 0; | 1647 | have_vcpu_info_placement = 0; |
1648 | pda_init(0); | ||
1649 | #endif | 1648 | #endif |
1650 | 1649 | ||
1651 | xen_smp_init(); | 1650 | xen_smp_init(); |