diff options
author | Tejun Heo <tj@kernel.org> | 2009-01-13 06:41:35 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-16 08:20:03 -0500 |
commit | b12d8db8fbfaed1e8222a15333a3645599636854 (patch) | |
tree | 4ae6ce55232885d0707eb464c5b43a54bdfe3ce4 /arch/x86/kernel/head_64.S | |
parent | 9939ddaff52787b2a7c1adf1b2afc95421aa0884 (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/head_64.S')
-rw-r--r-- | arch/x86/kernel/head_64.S | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 7a995d0e9f7..c8ace880661 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/msr.h> | 19 | #include <asm/msr.h> |
20 | #include <asm/cache.h> | 20 | #include <asm/cache.h> |
21 | #include <asm/processor-flags.h> | 21 | #include <asm/processor-flags.h> |
22 | #include <asm/percpu.h> | ||
22 | 23 | ||
23 | #ifdef CONFIG_PARAVIRT | 24 | #ifdef CONFIG_PARAVIRT |
24 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
@@ -250,7 +251,7 @@ ENTRY(secondary_startup_64) | |||
250 | * secondary CPU,initial_gs should be set to its pda address | 251 | * secondary CPU,initial_gs should be set to its pda address |
251 | * before the CPU runs this code. | 252 | * before the CPU runs this code. |
252 | * | 253 | * |
253 | * On UP, initial_gs points to _boot_cpu_pda and doesn't | 254 | * On UP, initial_gs points to PER_CPU_VAR(__pda) and doesn't |
254 | * change. | 255 | * change. |
255 | */ | 256 | */ |
256 | movl $MSR_GS_BASE,%ecx | 257 | movl $MSR_GS_BASE,%ecx |
@@ -284,7 +285,7 @@ ENTRY(secondary_startup_64) | |||
284 | #ifdef CONFIG_SMP | 285 | #ifdef CONFIG_SMP |
285 | .quad __per_cpu_load | 286 | .quad __per_cpu_load |
286 | #else | 287 | #else |
287 | .quad _boot_cpu_pda | 288 | .quad PER_CPU_VAR(__pda) |
288 | #endif | 289 | #endif |
289 | __FINITDATA | 290 | __FINITDATA |
290 | 291 | ||