From 024d807bc11cd7a64efd821fc0d1b6e1787c293d Mon Sep 17 00:00:00 2001 From: Brian Gerst Date: Tue, 27 Jan 2009 12:56:48 +0900 Subject: [PATCH] --- yaml --- r: 136507 b: refs/heads/master c: 1688401a0fddba8991aa5c0943b8ae9583998d60 h: refs/heads/master i: 136505: 8de9fe7907367728fdf204a7da7077bd32fa7b92 136503: 44c1dfe4be7040a13e651c1b877817d97288b2f5 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/setup_percpu.c | 15 ++++++++++----- trunk/arch/x86/kernel/smpcommon.c | 7 ------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 5b821c8d9419..d7370b240180 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 996db817e3d1529d711e55b938d72ae4060b39fd +refs/heads/master: 1688401a0fddba8991aa5c0943b8ae9583998d60 diff --git a/trunk/arch/x86/kernel/setup_percpu.c b/trunk/arch/x86/kernel/setup_percpu.c index f30ff691c34d..36c2e81dfc3c 100644 --- a/trunk/arch/x86/kernel/setup_percpu.c +++ b/trunk/arch/x86/kernel/setup_percpu.c @@ -25,15 +25,20 @@ DEFINE_PER_CPU(int, cpu_number); EXPORT_PER_CPU_SYMBOL(cpu_number); +#ifdef CONFIG_X86_64 +#define BOOT_PERCPU_OFFSET ((unsigned long)__per_cpu_load) +#else +#define BOOT_PERCPU_OFFSET 0 +#endif + +DEFINE_PER_CPU(unsigned long, this_cpu_off) = BOOT_PERCPU_OFFSET; +EXPORT_PER_CPU_SYMBOL(this_cpu_off); + #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA -#ifdef CONFIG_X86_64 unsigned long __per_cpu_offset[NR_CPUS] __read_mostly = { - [0] = (unsigned long)__per_cpu_load, + [0] = BOOT_PERCPU_OFFSET, }; -#else -unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; -#endif EXPORT_SYMBOL(__per_cpu_offset); /* diff --git a/trunk/arch/x86/kernel/smpcommon.c b/trunk/arch/x86/kernel/smpcommon.c index add36b4e37c9..5ec29a1a8465 100644 --- a/trunk/arch/x86/kernel/smpcommon.c +++ b/trunk/arch/x86/kernel/smpcommon.c @@ -5,13 +5,6 @@ #include #include -#ifdef CONFIG_X86_64 -DEFINE_PER_CPU(unsigned long, this_cpu_off) = (unsigned long)__per_cpu_load; -#else -DEFINE_PER_CPU(unsigned long, this_cpu_off); -#endif -EXPORT_PER_CPU_SYMBOL(this_cpu_off); - #ifdef CONFIG_X86_32 /* * Initialize the CPU's GDT. This is either the boot CPU doing itself