public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] percpu: Make PER_CPU_BASE_SECTION overridable by arches
@ 2009-02-08 14:58 Brian Gerst
  2009-02-08 14:58 ` [PATCH 2/3] x86: Use linker to offset symbols by __per_cpu_load Brian Gerst
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Brian Gerst @ 2009-02-08 14:58 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Ingo Molnar, linux-kernel

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>
---
 arch/ia64/include/asm/percpu.h |    4 ++--
 include/linux/percpu.h         |    8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/include/asm/percpu.h b/arch/ia64/include/asm/percpu.h
index 77f30b6..30cf465 100644
--- a/arch/ia64/include/asm/percpu.h
+++ b/arch/ia64/include/asm/percpu.h
@@ -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)!
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 0e24202..3577ffd 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -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 ""
 
-- 
1.6.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-11 22:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-08 14:58 [PATCH 1/3] percpu: Make PER_CPU_BASE_SECTION overridable by arches Brian Gerst
2009-02-08 14:58 ` [PATCH 2/3] x86: Use linker to offset symbols by __per_cpu_load Brian Gerst
2009-02-09  9:29   ` Ingo Molnar
2009-02-11 22:53     ` Jiri Slaby
2009-02-08 14:58 ` [PATCH 3/3] x86: Fix abuse of per_cpu_offset Brian Gerst
2009-02-09  9:31   ` Ingo Molnar
2009-02-09  9:29 ` [PATCH 1/3] percpu: Make PER_CPU_BASE_SECTION overridable by arches Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox