aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head64.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-01-13 06:41:35 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-16 08:20:03 -0500
commitb12d8db8fbfaed1e8222a15333a3645599636854 (patch)
tree4ae6ce55232885d0707eb464c5b43a54bdfe3ce4 /arch/x86/kernel/head64.c
parent9939ddaff52787b2a7c1adf1b2afc95421aa0884 (diff)
x86: make pda a percpu variable
[ Based on original patch from Christoph Lameter and Mike Travis. ] As pda is now allocated in percpu area, it can easily be made a proper percpu variable. Make it so by defining per cpu symbol from linker script and declaring it in C code for SMP and simply defining it for UP. This change cleans up code and brings SMP and UP closer a bit. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r--arch/x86/kernel/head64.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index e99b661a97f4..71b6f6ec96a2 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -26,18 +26,8 @@
26#include <asm/bios_ebda.h> 26#include <asm/bios_ebda.h>
27#include <asm/trampoline.h> 27#include <asm/trampoline.h>
28 28
29#ifndef CONFIG_SMP
30/* boot cpu pda, referenced by head_64.S to initialize %gs on UP */
31struct x8664_pda _boot_cpu_pda;
32#endif
33
34void __init x86_64_init_pda(void) 29void __init x86_64_init_pda(void)
35{ 30{
36#ifdef CONFIG_SMP
37 cpu_pda(0) = (void *)__per_cpu_load;
38#else
39 cpu_pda(0) = &_boot_cpu_pda;
40#endif
41 pda_init(0); 31 pda_init(0);
42} 32}
43 33