aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 17:27:58 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 17:27:58 -0500
commitab6e14b712e2d8e0c4dd3cf1a72083b52104853a (patch)
tree61482c08249c4cc242c4f18600be99177e137611 /include
parent18fbef9e5242e146fe0264cf719a498785102841 (diff)
ia64: on UP percpu variables are not small memory model
Tony says: | The CONFIG_SMP=n path in ia64 makes quite radical changes ... rather | than putting all the per-cpu stuff into the top 64K of address space | and providing a per-cpu TLB mapping for that range to a different | physical address ... it just makes all the per-cpu stuff link as ordinary | variables in .data. the new generic percpu code got confused about this as PER_CPU_ATTRIBUTES was defined even on UP, so it picked up that small memory model - which was not possible to get linked. The right fix is to only define that on SMP. This resolved the build failures in my cross-compiling environment. also link these variables into the .percpu section even on UP - some assembly code has offset dependencies. (such as GET_IA64_MCA_DATA() in arch/ia64/kernel/mca_asm.S) Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/percpu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h
index 26404b77f007..77f30b664b4e 100644
--- a/include/asm-ia64/percpu.h
+++ b/include/asm-ia64/percpu.h
@@ -15,18 +15,20 @@
15 15
16#include <linux/threads.h> 16#include <linux/threads.h>
17 17
18#ifdef CONFIG_SMP
19
18#ifdef HAVE_MODEL_SMALL_ATTRIBUTE 20#ifdef HAVE_MODEL_SMALL_ATTRIBUTE
19# define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__))) 21# define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__)))
20#endif 22#endif
21 23
22#ifdef CONFIG_SMP
23
24#define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset) 24#define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset)
25 25
26extern void *per_cpu_init(void); 26extern void *per_cpu_init(void);
27 27
28#else /* ! SMP */ 28#else /* ! SMP */
29 29
30#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
31
30#define per_cpu_init() (__phys_per_cpu_start) 32#define per_cpu_init() (__phys_per_cpu_start)
31 33
32#endif /* SMP */ 34#endif /* SMP */