summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-07-03 21:30:09 +0200
committerStephen Rothwell <sfr@canb.auug.org.au>2008-07-04 19:28:10 +1000
commit9f86adb3345fc69e871c0dff7d995273957a983b (patch)
tree2f963aba9eecea4792f45e31bfdb3fa4ebf23dee
parent47eaddbc64a48d145417d13b289c294ef1b728b8 (diff)
linux-next: zero based percpu build error on s390
The patch: "Zero based percpu: infrastructure to rebase the per cpu area to zero" causes this build error on !CONFIG_SMP on linux-next / s390: CC arch/s390/kernel/asm-offsets.s In file included from include/asm/percpu.h:35, from include/linux/percpu.h:9, from include/linux/rcupdate.h:39, from include/linux/pid.h:4, from include/linux/sched.h:74, from arch/s390/kernel/asm-offsets.c:7: include/asm-generic/percpu.h:78:1: warning: "SHIFT_PERCPU_PTR" redefined In file included from include/linux/percpu.h:9, from include/linux/rcupdate.h:39, from include/linux/pid.h:4, from include/linux/sched.h:74, from arch/s390/kernel/asm-offsets.c:7: include/asm/percpu.h:25:1: warning: this is the location of the previous definition Fix below. Please merge with original patch. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--include/asm-generic/percpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 36d188f47c98..1c02250353ee 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -75,7 +75,9 @@ extern void setup_per_cpu_areas(void);
#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))
#define __get_cpu_var(var) per_cpu_var(var)
#define __raw_get_cpu_var(var) per_cpu_var(var)
-#define SHIFT_PERCPU_PTR(__p, __offset) (__p)
+#ifndef SHIFT_PERCPU_PTR
+# define SHIFT_PERCPU_PTR(__p, __offset) (__p)
+#endif
#define per_cpu_offset(x) 0L
#endif /* SMP */