提交 89c9c4c5 编写于 作者: B Brian Gerst 提交者: Tejun Heo

x86: make Voyager use x86 per-cpu setup.

Impact: standardize all x86 platforms on same setup code

With the preceding changes, Voyager can use the same per-cpu setup
code as all the other x86 platforms.
Signed-off-by: NBrian Gerst <brgerst@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 34019be1
...@@ -133,7 +133,7 @@ config ARCH_HAS_CACHE_LINE_SIZE ...@@ -133,7 +133,7 @@ config ARCH_HAS_CACHE_LINE_SIZE
def_bool y def_bool y
config HAVE_SETUP_PER_CPU_AREA config HAVE_SETUP_PER_CPU_AREA
def_bool X86_64_SMP || (X86_SMP && !X86_VOYAGER) def_bool y
config HAVE_CPUMASK_OF_CPU_MAP config HAVE_CPUMASK_OF_CPU_MAP
def_bool X86_64_SMP def_bool X86_64_SMP
......
...@@ -35,8 +35,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_number); ...@@ -35,8 +35,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_number);
DEFINE_PER_CPU(unsigned long, this_cpu_off) = BOOT_PERCPU_OFFSET; DEFINE_PER_CPU(unsigned long, this_cpu_off) = BOOT_PERCPU_OFFSET;
EXPORT_PER_CPU_SYMBOL(this_cpu_off); EXPORT_PER_CPU_SYMBOL(this_cpu_off);
#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly = { unsigned long __per_cpu_offset[NR_CPUS] __read_mostly = {
[0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET, [0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET,
}; };
...@@ -125,6 +123,3 @@ void __init setup_per_cpu_areas(void) ...@@ -125,6 +123,3 @@ void __init setup_per_cpu_areas(void)
/* Setup cpu initialized, callin, callout masks */ /* Setup cpu initialized, callin, callout masks */
setup_cpu_local_masks(); setup_cpu_local_masks();
} }
#endif
...@@ -531,7 +531,6 @@ static void __init do_boot_cpu(__u8 cpu) ...@@ -531,7 +531,6 @@ static void __init do_boot_cpu(__u8 cpu)
stack_start.sp = (void *)idle->thread.sp; stack_start.sp = (void *)idle->thread.sp;
init_gdt(cpu); init_gdt(cpu);
per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu];
per_cpu(current_task, cpu) = idle; per_cpu(current_task, cpu) = idle;
early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu);
irq_ctx_init(cpu); irq_ctx_init(cpu);
...@@ -1749,7 +1748,6 @@ static void __init voyager_smp_prepare_cpus(unsigned int max_cpus) ...@@ -1749,7 +1748,6 @@ static void __init voyager_smp_prepare_cpus(unsigned int max_cpus)
static void __cpuinit voyager_smp_prepare_boot_cpu(void) static void __cpuinit voyager_smp_prepare_boot_cpu(void)
{ {
init_gdt(smp_processor_id()); init_gdt(smp_processor_id());
per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu];
switch_to_new_gdt(); switch_to_new_gdt();
cpu_set(smp_processor_id(), cpu_online_map); cpu_set(smp_processor_id(), cpu_online_map);
...@@ -1782,7 +1780,6 @@ static void __init voyager_smp_cpus_done(unsigned int max_cpus) ...@@ -1782,7 +1780,6 @@ static void __init voyager_smp_cpus_done(unsigned int max_cpus)
void __init smp_setup_processor_id(void) void __init smp_setup_processor_id(void)
{ {
current_thread_info()->cpu = hard_smp_processor_id(); current_thread_info()->cpu = hard_smp_processor_id();
percpu_write(cpu_number, hard_smp_processor_id());
} }
static void voyager_send_call_func(cpumask_t callmask) static void voyager_send_call_func(cpumask_t callmask)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册