]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86_64/percpu.h
[MIPS] Au1xx0: fix prom_getenv() to handle YAMON style environment
[linux-2.6-omap-h63xx.git] / include / asm-x86_64 / percpu.h
index 9c71855736fb90d98fc2ddb5a20793f4ce41b593..7f33aaf9f7b1870c1b58d9de974712c004809182 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <asm/pda.h>
 
-#define __per_cpu_offset(cpu) (cpu_pda[cpu].data_offset)
+#define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset)
 #define __my_cpu_offset() read_pda(data_offset)
 
 /* Separate out the type, so (int[3], foo) works. */
 #define percpu_modcopy(pcpudst, src, size)                     \
 do {                                                           \
        unsigned int __i;                                       \
-       for (__i = 0; __i < NR_CPUS; __i++)                     \
-               if (cpu_possible(__i))                          \
-                       memcpy((pcpudst)+__per_cpu_offset(__i), \
-                              (src), (size));                  \
+       for_each_possible_cpu(__i)                              \
+               memcpy((pcpudst)+__per_cpu_offset(__i),         \
+                      (src), (size));                          \
 } while (0)
 
 extern void setup_per_cpu_areas(void);