[PATCH] i386: Define per_cpu_offset
authorJeremy Fitzhardinge <jeremy@goop.org>
Wed, 2 May 2007 17:27:16 +0000 (19:27 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 2 May 2007 17:27:16 +0000 (19:27 +0200)
Define per_cpu_offset in asm-i386/percpu.h when SMP defined, like
asm-generic/percpu.h does for UP.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
include/asm-i386/percpu.h

index cdcb63db30a90f29135c0460b1272b2e6b74d917..f54830b5d5ac299c38c496e65ed17d699c8c895f 100644 (file)
@@ -47,6 +47,8 @@
 /* This is used for other cpus to find our section. */
 extern unsigned long __per_cpu_offset[];
 
+#define per_cpu_offset(x) (__per_cpu_offset[x])
+
 /* Separate out the type, so (int[3], foo) works. */
 #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
 #define DEFINE_PER_CPU(type, name) \