diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/desc_defs.h | 25 | ||||
-rw-r--r-- | include/asm-x86/lguest.h | 4 | ||||
-rw-r--r-- | include/asm-x86/processor_32.h | 5 |
3 files changed, 20 insertions, 14 deletions
diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h index 08900407009..de47eb0a23a 100644 --- a/include/asm-x86/desc_defs.h +++ b/include/asm-x86/desc_defs.h @@ -11,17 +11,26 @@ #include <linux/types.h> +/* + * FIXME: Acessing the desc_struct through its fields is more elegant, + * and should be the one valid thing to do. However, a lot of open code + * still touches the a and b acessors, and doing this allow us to do it + * incrementally. We keep the signature as a struct, rather than an union, + * so we can get rid of it transparently in the future -- glommer + */ // 8 byte segment descriptor struct desc_struct { - u16 limit0; - u16 base0; - unsigned base1 : 8, type : 4, s : 1, dpl : 2, p : 1; - unsigned limit : 4, avl : 1, l : 1, d : 1, g : 1, base2 : 8; -} __attribute__((packed)); + union { + struct { unsigned int a, b; }; + struct { + u16 limit0; + u16 base0; + unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1; + unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8; + }; -struct n_desc_struct { - unsigned int a,b; -}; + }; +} __attribute__((packed)); enum { GATE_INTERRUPT = 0xE, diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h index ccd33846081..17c908c0ef1 100644 --- a/include/asm-x86/lguest.h +++ b/include/asm-x86/lguest.h @@ -78,8 +78,8 @@ static inline void lguest_set_ts(void) } /* Full 4G segment descriptors, suitable for CS and DS. */ -#define FULL_EXEC_SEGMENT ((struct desc_struct){0x0000ffff, 0x00cf9b00}) -#define FULL_SEGMENT ((struct desc_struct){0x0000ffff, 0x00cf9300}) +#define FULL_EXEC_SEGMENT ((struct desc_struct){ { {0x0000ffff, 0x00cf9b00} } }) +#define FULL_SEGMENT ((struct desc_struct){ { {0x0000ffff, 0x00cf9300} } }) #endif /* __ASSEMBLY__ */ diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h index 9c0ab7f26bd..bc48ad64de4 100644 --- a/include/asm-x86/processor_32.h +++ b/include/asm-x86/processor_32.h @@ -20,14 +20,11 @@ #include <linux/cpumask.h> #include <linux/init.h> #include <asm/processor-flags.h> +#include <asm/desc_defs.h> /* flag for disabling the tsc */ extern int tsc_disable; -struct desc_struct { - unsigned long a,b; -}; - static inline int desc_empty(const void *ptr) { const u32 *desc = ptr; |