---
 include/asm-x86/percpu_64.h |   27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

Index: linux-2.6/include/asm-x86/percpu_64.h
===================================================================
--- linux-2.6.orig/include/asm-x86/percpu_64.h	2007-11-17 14:40:14.927804417 -0800
+++ linux-2.6/include/asm-x86/percpu_64.h	2007-11-17 14:52:59.320034313 -0800
@@ -18,27 +18,26 @@
 
 /* Separate out the type, so (int[3], foo) works. */
 #define DEFINE_PER_CPU(type, name) \
-    __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
+    __attribute__((__section__(".data.percpu"))) __typeof(type) name
 
 #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)		\
     __attribute__((__section__(".data.percpu.shared_aligned"))) \
-    __typeof__(type) per_cpu__##name				\
-    ____cacheline_internodealigned_in_smp
+    type name ____cacheline_internodealigned_in_smp
 
 #define DEFINE_PER_CPU_FIRST(type, name)			\
     __attribute__((__section__(".data.percpu.first")))		\
-    __typeof__(type) per_cpu__##name
+    type name
 
 /* var is in discarded region: offset to particular copy we want */
 #define per_cpu(var, cpu) (*({				\
 	extern int simple_identifier_##var(void);	\
-	RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)); }))
+	CPU_PTR(&var, cpu); }))
 #define __get_cpu_var(var) (*({				\
 	extern int simple_identifier_##var(void);	\
-	RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); }))
+	THIS_CPU(&var); }))
 #define __raw_get_cpu_var(var) (*({			\
 	extern int simple_identifier_##var(void);	\
-	RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); }))
+	__THIS_CPU(&var); }))
 
 /* A macro to avoid #include hell... */
 #define percpu_modcopy(pcpudst, src, size)			\
@@ -64,10 +63,10 @@ extern void setup_per_cpu_areas(void);
 
 #endif	/* SMP */
 
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+#define DECLARE_PER_CPU(type, name) extern type name
 
-#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
-#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var)
 
 /*
  * Fast per CPU operations
@@ -284,8 +283,8 @@ static inline void __cpu_inc_gs(volatile
 	BUG();
 }
 
-#define cpu_inc_gs(obj, value)\
-	__cpu_inc_gs(&(obj), (unsigned long)value, sizeof(obj))
+#define cpu_inc_gs(obj)\
+	__cpu_inc_gs(&(obj), sizeof(obj))
 
 static inline void __cpu_dec_gs(volatile void *ptr, int size)
 {
@@ -310,8 +309,8 @@ static inline void __cpu_dec_gs(volatile
 	BUG();
 }
 
-#define cpu_dec_gs(obj, value)\
-	__cpu_dec_gs(&(obj), (unsigned long)value, sizeof(obj))
+#define cpu_dec_gs(obj)\
+	__cpu_dec_gs(&(obj), sizeof(obj))
 
 static inline unsigned long __cmpxchg_local_gs(volatile void *ptr,
 			unsigned long old, unsigned long new, int size)