diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2007-05-02 13:27:12 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:12 -0400 |
commit | b6e3590f8145c77b8fcef3247e2412335221412f (patch) | |
tree | 47fb1a28e41fd9f4e1aef45b5482b69b8d7c154e /arch/sparc64/kernel/smp.c | |
parent | de90c5ce832b1218042316260ff9268b00fdcba3 (diff) |
[PATCH] x86: Allow percpu variables to be page-aligned
Let's allow page-alignment in general for per-cpu data (wanted by Xen, and
Ingo suggested KVM as well).
Because larger alignments can use more room, we increase the max per-cpu
memory to 64k rather than 32k: it's getting a little tight.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index d4f0a70f4845..1fac215252e4 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -1343,11 +1343,11 @@ void __init setup_per_cpu_areas(void) | |||
1343 | /* Copy section for each CPU (we discard the original) */ | 1343 | /* Copy section for each CPU (we discard the original) */ |
1344 | goal = PERCPU_ENOUGH_ROOM; | 1344 | goal = PERCPU_ENOUGH_ROOM; |
1345 | 1345 | ||
1346 | __per_cpu_shift = 0; | 1346 | __per_cpu_shift = PAGE_SHIFT; |
1347 | for (size = 1UL; size < goal; size <<= 1UL) | 1347 | for (size = PAGE_SIZE; size < goal; size <<= 1UL) |
1348 | __per_cpu_shift++; | 1348 | __per_cpu_shift++; |
1349 | 1349 | ||
1350 | ptr = alloc_bootmem(size * NR_CPUS); | 1350 | ptr = alloc_bootmem_pages(size * NR_CPUS); |
1351 | 1351 | ||
1352 | __per_cpu_base = ptr - __per_cpu_start; | 1352 | __per_cpu_base = ptr - __per_cpu_start; |
1353 | 1353 | ||