]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SPARC64]: Mirror x86_64's PERCPU_ENOUGH_ROOM definition.
authorDavid S. Miller <davem@sunset.davemloft.net>
Fri, 15 Dec 2006 07:40:57 +0000 (23:40 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 17 Dec 2006 22:06:59 +0000 (14:06 -0800)
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/smp.c
include/asm-sparc64/percpu.h

index cc09d826641452998efbaa2df0ee8bb359cac524..0a4958536bcd3af5086c12d6e723c0bd1b1ad0e4 100644 (file)
@@ -1447,11 +1447,8 @@ void __init setup_per_cpu_areas(void)
        char *ptr;
 
        /* Copy section for each CPU (we discard the original) */
-       goal = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
-#ifdef CONFIG_MODULES
-       if (goal < PERCPU_ENOUGH_ROOM)
-               goal = PERCPU_ENOUGH_ROOM;
-#endif
+       goal = PERCPU_ENOUGH_ROOM;
+
        __per_cpu_shift = 0;
        for (size = 1UL; size < goal; size <<= 1UL)
                __per_cpu_shift++;
index ced8cbde046dab27cc505aea639fc43e25914b4f..0d3df76aa47fdc093fd0f270542b205e69cc3822 100644 (file)
@@ -5,6 +5,16 @@
 
 #ifdef CONFIG_SMP
 
+#ifdef CONFIG_MODULES
+# define PERCPU_MODULE_RESERVE 8192
+#else
+# define PERCPU_MODULE_RESERVE 0
+#endif
+
+#define PERCPU_ENOUGH_ROOM \
+       (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
+        PERCPU_MODULE_RESERVE)
+
 extern void setup_per_cpu_areas(void);
 
 extern unsigned long __per_cpu_base;