diff options
Diffstat (limited to 'include/asm-x86/desc.h')
-rw-r--r-- | include/asm-x86/desc.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index a44c4dc70590..ebc307817e98 100644 --- a/include/asm-x86/desc.h +++ b/include/asm-x86/desc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_DESC_H_ | 1 | #ifndef ASM_X86__DESC_H |
2 | #define _ASM_DESC_H_ | 2 | #define ASM_X86__DESC_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #include <asm/desc_defs.h> | 5 | #include <asm/desc_defs.h> |
@@ -24,6 +24,11 @@ static inline void fill_ldt(struct desc_struct *desc, | |||
24 | desc->d = info->seg_32bit; | 24 | desc->d = info->seg_32bit; |
25 | desc->g = info->limit_in_pages; | 25 | desc->g = info->limit_in_pages; |
26 | desc->base2 = (info->base_addr & 0xff000000) >> 24; | 26 | desc->base2 = (info->base_addr & 0xff000000) >> 24; |
27 | /* | ||
28 | * Don't allow setting of the lm bit. It is useless anyway | ||
29 | * because 64bit system calls require __USER_CS: | ||
30 | */ | ||
31 | desc->l = 0; | ||
27 | } | 32 | } |
28 | 33 | ||
29 | extern struct desc_ptr idt_descr; | 34 | extern struct desc_ptr idt_descr; |
@@ -97,7 +102,15 @@ static inline int desc_empty(const void *ptr) | |||
97 | native_write_gdt_entry(dt, entry, desc, type) | 102 | native_write_gdt_entry(dt, entry, desc, type) |
98 | #define write_idt_entry(dt, entry, g) \ | 103 | #define write_idt_entry(dt, entry, g) \ |
99 | native_write_idt_entry(dt, entry, g) | 104 | native_write_idt_entry(dt, entry, g) |
100 | #endif | 105 | |
106 | static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries) | ||
111 | { | ||
112 | } | ||
113 | #endif /* CONFIG_PARAVIRT */ | ||
101 | 114 | ||
102 | static inline void native_write_idt_entry(gate_desc *idt, int entry, | 115 | static inline void native_write_idt_entry(gate_desc *idt, int entry, |
103 | const gate_desc *gate) | 116 | const gate_desc *gate) |
@@ -397,4 +410,4 @@ static inline void set_system_gate_ist(int n, void *addr, unsigned ist) | |||
397 | 410 | ||
398 | #endif /* __ASSEMBLY__ */ | 411 | #endif /* __ASSEMBLY__ */ |
399 | 412 | ||
400 | #endif | 413 | #endif /* ASM_X86__DESC_H */ |