diff options
author | Ravikiran G Thirumalai <kiran@scalex86.org> | 2006-01-11 16:45:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:04:59 -0500 |
commit | df79efde82952edc653fa6eb1338a82b87aa0585 (patch) | |
tree | 67abb221cf834c3a7766c406aae1e55aa31b6bcf /arch/x86_64/kernel/setup64.c | |
parent | 05b3cbd8bb98736387df8a2e1efe311b1fb4d2ad (diff) |
[PATCH] x86_64: Node local pda take 2 -- cpu_pda preparation
Helper patch to change cpu_pda users to use macros to access cpu_pda
instead of the cpu_pda[] array.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/setup64.c')
-rw-r--r-- | arch/x86_64/kernel/setup64.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index 972f5d4ce82..66325a79ed5 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -30,7 +30,7 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,}; | |||
30 | 30 | ||
31 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; | 31 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; |
32 | 32 | ||
33 | struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; | 33 | struct x8664_pda _cpu_pda[NR_CPUS] __cacheline_aligned; |
34 | 34 | ||
35 | struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; | 35 | struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; |
36 | 36 | ||
@@ -110,18 +110,18 @@ void __init setup_per_cpu_areas(void) | |||
110 | } | 110 | } |
111 | if (!ptr) | 111 | if (!ptr) |
112 | panic("Cannot allocate cpu data for CPU %d\n", i); | 112 | panic("Cannot allocate cpu data for CPU %d\n", i); |
113 | cpu_pda[i].data_offset = ptr - __per_cpu_start; | 113 | cpu_pda(i)->data_offset = ptr - __per_cpu_start; |
114 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); | 114 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | void pda_init(int cpu) | 118 | void pda_init(int cpu) |
119 | { | 119 | { |
120 | struct x8664_pda *pda = &cpu_pda[cpu]; | 120 | struct x8664_pda *pda = cpu_pda(cpu); |
121 | 121 | ||
122 | /* Setup up data that may be needed in __get_free_pages early */ | 122 | /* Setup up data that may be needed in __get_free_pages early */ |
123 | asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); | 123 | asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); |
124 | wrmsrl(MSR_GS_BASE, cpu_pda + cpu); | 124 | wrmsrl(MSR_GS_BASE, pda); |
125 | 125 | ||
126 | pda->cpunumber = cpu; | 126 | pda->cpunumber = cpu; |
127 | pda->irqcount = -1; | 127 | pda->irqcount = -1; |