]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
percpu: make PER_CPU_BASE_SECTION overridable by arches
authorBrian Gerst <brgerst@gmail.com>
Sun, 8 Feb 2009 14:58:38 +0000 (09:58 -0500)
committerIngo Molnar <mingo@elte.hu>
Mon, 9 Feb 2009 09:30:29 +0000 (10:30 +0100)
Impact: bug fix

IA-64 needs to put percpu data in the seperate section even on UP.
Fixes regression caused by "percpu: refactor percpu.h"

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/ia64/include/asm/percpu.h
include/linux/percpu.h

index 77f30b664b4eade81ca0985be35d97825fe0a3a8..30cf46534dd23f1aa386d0168cbcc0022cbecf6d 100644 (file)
@@ -27,12 +27,12 @@ extern void *per_cpu_init(void);
 
 #else /* ! SMP */
 
-#define PER_CPU_ATTRIBUTES     __attribute__((__section__(".data.percpu")))
-
 #define per_cpu_init()                         (__phys_per_cpu_start)
 
 #endif /* SMP */
 
+#define PER_CPU_BASE_SECTION ".data.percpu"
+
 /*
  * Be extremely careful when taking the address of this variable!  Due to virtual
  * remapping, it is different from the canonical address returned by __get_cpu_var(var)!
index 0e24202b5a4ea4909340d4732776651779412303..3577ffd90d45f6fc284571834614a199f4076dc0 100644 (file)
@@ -8,8 +8,15 @@
 
 #include <asm/percpu.h>
 
+#ifndef PER_CPU_BASE_SECTION
 #ifdef CONFIG_SMP
 #define PER_CPU_BASE_SECTION ".data.percpu"
+#else
+#define PER_CPU_BASE_SECTION ".data"
+#endif
+#endif
+
+#ifdef CONFIG_SMP
 
 #ifdef MODULE
 #define PER_CPU_SHARED_ALIGNED_SECTION ""
@@ -20,7 +27,6 @@
 
 #else
 
-#define PER_CPU_BASE_SECTION ".data"
 #define PER_CPU_SHARED_ALIGNED_SECTION ""
 #define PER_CPU_FIRST_SECTION ""