diff options
-rw-r--r-- | arch/x86/include/asm/desc.h | 3 | ||||
-rwxr-xr-x | arch/x86/kernel/cpu/cpu_debug.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index dc27705f5443..5623c50d67b2 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h | |||
@@ -91,7 +91,6 @@ static inline int desc_empty(const void *ptr) | |||
91 | #define store_gdt(dtr) native_store_gdt(dtr) | 91 | #define store_gdt(dtr) native_store_gdt(dtr) |
92 | #define store_idt(dtr) native_store_idt(dtr) | 92 | #define store_idt(dtr) native_store_idt(dtr) |
93 | #define store_tr(tr) (tr = native_store_tr()) | 93 | #define store_tr(tr) (tr = native_store_tr()) |
94 | #define store_ldt(ldt) asm("sldt %0":"=m" (ldt)) | ||
95 | 94 | ||
96 | #define load_TLS(t, cpu) native_load_tls(t, cpu) | 95 | #define load_TLS(t, cpu) native_load_tls(t, cpu) |
97 | #define set_ldt native_set_ldt | 96 | #define set_ldt native_set_ldt |
@@ -112,6 +111,8 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries) | |||
112 | } | 111 | } |
113 | #endif /* CONFIG_PARAVIRT */ | 112 | #endif /* CONFIG_PARAVIRT */ |
114 | 113 | ||
114 | #define store_ldt(ldt) asm("sldt %0" : "=m"(ldt)) | ||
115 | |||
115 | static inline void native_write_idt_entry(gate_desc *idt, int entry, | 116 | static inline void native_write_idt_entry(gate_desc *idt, int entry, |
116 | const gate_desc *gate) | 117 | const gate_desc *gate) |
117 | { | 118 | { |
diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c index 0bdf4daba205..9abbcbd933cc 100755 --- a/arch/x86/kernel/cpu/cpu_debug.c +++ b/arch/x86/kernel/cpu/cpu_debug.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | 24 | ||
25 | #include <asm/cpu_debug.h> | 25 | #include <asm/cpu_debug.h> |
26 | #include <asm/paravirt.h> | ||
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <asm/traps.h> | 28 | #include <asm/traps.h> |
28 | #include <asm/apic.h> | 29 | #include <asm/apic.h> |
@@ -427,7 +428,7 @@ static void print_tss(void *arg) | |||
427 | seq_printf(seq, " CS\t: %04x\n", seg); | 428 | seq_printf(seq, " CS\t: %04x\n", seg); |
428 | asm("movl %%ds,%0" : "=r" (seg)); | 429 | asm("movl %%ds,%0" : "=r" (seg)); |
429 | seq_printf(seq, " DS\t: %04x\n", seg); | 430 | seq_printf(seq, " DS\t: %04x\n", seg); |
430 | seq_printf(seq, " SS\t: %04lx\n", regs->ss); | 431 | seq_printf(seq, " SS\t: %04lx\n", regs->ss & 0xffff); |
431 | asm("movl %%es,%0" : "=r" (seg)); | 432 | asm("movl %%es,%0" : "=r" (seg)); |
432 | seq_printf(seq, " ES\t: %04x\n", seg); | 433 | seq_printf(seq, " ES\t: %04x\n", seg); |
433 | asm("movl %%fs,%0" : "=r" (seg)); | 434 | asm("movl %%fs,%0" : "=r" (seg)); |