Commit 8ce03197 authored by Brian Gerst's avatar Brian Gerst Committed by Tejun Heo

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: default avatarBrian Gerst <brgerst@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent b4a8f7a2
...@@ -24,7 +24,6 @@ struct x8664_pda { ...@@ -24,7 +24,6 @@ struct x8664_pda {
} ____cacheline_aligned_in_smp; } ____cacheline_aligned_in_smp;
DECLARE_PER_CPU(struct x8664_pda, __pda); DECLARE_PER_CPU(struct x8664_pda, __pda);
extern void pda_init(int);
#define cpu_pda(cpu) (&per_cpu(__pda, cpu)) #define cpu_pda(cpu) (&per_cpu(__pda, cpu))
......
...@@ -895,15 +895,6 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack); ...@@ -895,15 +895,6 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack);
DEFINE_PER_CPU(unsigned int, irq_count) = -1; 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 static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks
[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]) [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ])
__aligned(PAGE_SIZE); __aligned(PAGE_SIZE);
...@@ -967,9 +958,9 @@ void __cpuinit cpu_init(void) ...@@ -967,9 +958,9 @@ void __cpuinit cpu_init(void)
struct task_struct *me; struct task_struct *me;
int i; int i;
/* CPU 0 is initialised in head64.c */ loadsegment(fs, 0);
if (cpu != 0) loadsegment(gs, 0);
pda_init(cpu); load_pda_offset(cpu);
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
if (cpu != 0 && percpu_read(node_number) == 0 && if (cpu != 0 && percpu_read(node_number) == 0 &&
......
...@@ -91,8 +91,6 @@ void __init x86_64_start_kernel(char * real_mode_data) ...@@ -91,8 +91,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
if (console_loglevel == 10) if (console_loglevel == 10)
early_printk("Kernel alive\n"); early_printk("Kernel alive\n");
pda_init(0);
x86_64_start_reservations(real_mode_data); x86_64_start_reservations(real_mode_data);
} }
......
...@@ -1645,7 +1645,6 @@ asmlinkage void __init xen_start_kernel(void) ...@@ -1645,7 +1645,6 @@ asmlinkage void __init xen_start_kernel(void)
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
/* Disable until direct per-cpu data access. */ /* Disable until direct per-cpu data access. */
have_vcpu_info_placement = 0; have_vcpu_info_placement = 0;
pda_init(0);
#endif #endif
xen_smp_init(); xen_smp_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment