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 /kernel | |
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 'kernel')
-rw-r--r-- | kernel/module.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c index cf49ca25fcce..4dc4a257545c 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -346,10 +346,10 @@ static void *percpu_modalloc(unsigned long size, unsigned long align, | |||
346 | unsigned int i; | 346 | unsigned int i; |
347 | void *ptr; | 347 | void *ptr; |
348 | 348 | ||
349 | if (align > SMP_CACHE_BYTES) { | 349 | if (align > PAGE_SIZE) { |
350 | printk(KERN_WARNING "%s: per-cpu alignment %li > %i\n", | 350 | printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n", |
351 | name, align, SMP_CACHE_BYTES); | 351 | name, align, PAGE_SIZE); |
352 | align = SMP_CACHE_BYTES; | 352 | align = PAGE_SIZE; |
353 | } | 353 | } |
354 | 354 | ||
355 | ptr = __per_cpu_start; | 355 | ptr = __per_cpu_start; |