]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-i386/pda.h
[PATCH] i386: Page-align the GDT
[linux-2.6-omap-h63xx.git] / include / asm-i386 / pda.h
index f90fde22566db00f2f18791cd0a515624f8d99a1..aef7f732f77ee72f26cbf9ab693ba3601fe07ccf 100644 (file)
@@ -7,18 +7,20 @@
 #define _I386_PDA_H
 
 #include <linux/stddef.h>
+#include <linux/types.h>
+#include <asm/percpu.h>
 
 struct i386_pda
 {
        struct i386_pda *_pda;          /* pointer to self */
 
        int cpu_number;
+       struct task_struct *pcurrent;   /* current process */
+       struct pt_regs *irq_regs;
 };
 
-extern struct i386_pda *_cpu_pda[];
-
-#define cpu_pda(i)     (_cpu_pda[i])
-
+DECLARE_PER_CPU(struct i386_pda, _cpu_pda);
+#define cpu_pda(i)     (&per_cpu(_cpu_pda, (i)))
 #define pda_offset(field) offsetof(struct i386_pda, field)
 
 extern void __bad_pda_field(void);
@@ -36,19 +38,19 @@ extern struct i386_pda _proxy_pda;
                if (0) { T__ tmp__; tmp__ = (val); }                    \
                switch (sizeof(_proxy_pda.field)) {                     \
                case 1:                                                 \
-                       asm(op "b %1,%%gs:%c2"                          \
+                       asm(op "b %1,%%fs:%c2"                          \
                            : "+m" (_proxy_pda.field)                   \
                            :"ri" ((T__)val),                           \
                             "i"(pda_offset(field)));                   \
                        break;                                          \
                case 2:                                                 \
-                       asm(op "w %1,%%gs:%c2"                          \
+                       asm(op "w %1,%%fs:%c2"                          \
                            : "+m" (_proxy_pda.field)                   \
                            :"ri" ((T__)val),                           \
                             "i"(pda_offset(field)));                   \
                        break;                                          \
                case 4:                                                 \
-                       asm(op "l %1,%%gs:%c2"                          \
+                       asm(op "l %1,%%fs:%c2"                          \
                            : "+m" (_proxy_pda.field)                   \
                            :"ri" ((T__)val),                           \
                             "i"(pda_offset(field)));                   \
@@ -62,19 +64,19 @@ extern struct i386_pda _proxy_pda;
                typeof(_proxy_pda.field) ret__;                         \
                switch (sizeof(_proxy_pda.field)) {                     \
                case 1:                                                 \
-                       asm(op "b %%gs:%c1,%0"                          \
+                       asm(op "b %%fs:%c1,%0"                          \
                            : "=r" (ret__)                              \
                            : "i" (pda_offset(field)),                  \
                              "m" (_proxy_pda.field));                  \
                        break;                                          \
                case 2:                                                 \
-                       asm(op "w %%gs:%c1,%0"                          \
+                       asm(op "w %%fs:%c1,%0"                          \
                            : "=r" (ret__)                              \
                            : "i" (pda_offset(field)),                  \
                              "m" (_proxy_pda.field));                  \
                        break;                                          \
                case 4:                                                 \
-                       asm(op "l %%gs:%c1,%0"                          \
+                       asm(op "l %%fs:%c1,%0"                          \
                            : "=r" (ret__)                              \
                            : "i" (pda_offset(field)),                  \
                              "m" (_proxy_pda.field));                  \