]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] adjust per_cpu definition in non-SMP case
authorJan Beulich <JBeulich@novell.com>
Thu, 23 Jun 2005 07:09:59 +0000 (00:09 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:28 +0000 (09:45 -0700)
Fix (in the architectures I'm actually building for) the UP definition of
per_cpu so that the cpu specified may be any expression, not just an
identifier or a suffix expression.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-generic/percpu.h
include/asm-ia64/percpu.h
include/asm-x86_64/percpu.h

index 3b709b84934f4db134327d00538989e601b57e87..9044aeb3782887d33d4b65abfb27f20cf593b1e0 100644 (file)
@@ -29,7 +29,7 @@ do {                                                          \
 #define DEFINE_PER_CPU(type, name) \
     __typeof__(type) per_cpu__##name
 
-#define per_cpu(var, cpu)                      (*((void)cpu, &per_cpu__##var))
+#define per_cpu(var, cpu)                      (*((void)(cpu), &per_cpu__##var))
 #define __get_cpu_var(var)                     per_cpu__##var
 
 #endif /* SMP */
index 1e87f19dad5608c19a3d2ad063d89a04c9d1e4c6..2b14dee29ce7af3ba52cbfcb777eefd5bc506720 100644 (file)
@@ -50,7 +50,7 @@ extern void *per_cpu_init(void);
 
 #else /* ! SMP */
 
-#define per_cpu(var, cpu)                      (*((void)cpu, &per_cpu__##var))
+#define per_cpu(var, cpu)                      (*((void)(cpu), &per_cpu__##var))
 #define __get_cpu_var(var)                     per_cpu__##var
 #define per_cpu_init()                         (__phys_per_cpu_start)
 
index 415d73f3c8ef8f0b5b8593e75d71d23580c7afcc..9c71855736fb90d98fc2ddb5a20793f4ce41b593 100644 (file)
@@ -39,7 +39,7 @@ extern void setup_per_cpu_areas(void);
 #define DEFINE_PER_CPU(type, name) \
     __typeof__(type) per_cpu__##name
 
-#define per_cpu(var, cpu)                      (*((void)cpu, &per_cpu__##var))
+#define per_cpu(var, cpu)                      (*((void)(cpu), &per_cpu__##var))
 #define __get_cpu_var(var)                     per_cpu__##var
 
 #endif /* SMP */