mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2025-03-03 02:46:14 +00:00
x86: cpu architecture debug code, build fix, cleanup
move store_ldt outside the CONFIG_PARAVIRT section and also clean up the code a bit. Signed-off-by: Jaswinder Singh Rajput <jaswinder@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
9b779edf4b
commit
8229d75438
@ -91,7 +91,6 @@ static inline int desc_empty(const void *ptr)
|
|||||||
#define store_gdt(dtr) native_store_gdt(dtr)
|
#define store_gdt(dtr) native_store_gdt(dtr)
|
||||||
#define store_idt(dtr) native_store_idt(dtr)
|
#define store_idt(dtr) native_store_idt(dtr)
|
||||||
#define store_tr(tr) (tr = native_store_tr())
|
#define store_tr(tr) (tr = native_store_tr())
|
||||||
#define store_ldt(ldt) asm("sldt %0":"=m" (ldt))
|
|
||||||
|
|
||||||
#define load_TLS(t, cpu) native_load_tls(t, cpu)
|
#define load_TLS(t, cpu) native_load_tls(t, cpu)
|
||||||
#define set_ldt native_set_ldt
|
#define set_ldt native_set_ldt
|
||||||
@ -112,6 +111,8 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_PARAVIRT */
|
#endif /* CONFIG_PARAVIRT */
|
||||||
|
|
||||||
|
#define store_ldt(ldt) asm("sldt %0" : "=m"(ldt))
|
||||||
|
|
||||||
static inline void native_write_idt_entry(gate_desc *idt, int entry,
|
static inline void native_write_idt_entry(gate_desc *idt, int entry,
|
||||||
const gate_desc *gate)
|
const gate_desc *gate)
|
||||||
{
|
{
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
|
|
||||||
#include <asm/cpu_debug.h>
|
#include <asm/cpu_debug.h>
|
||||||
|
#include <asm/paravirt.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/apic.h>
|
#include <asm/apic.h>
|
||||||
@ -427,7 +428,7 @@ static void print_tss(void *arg)
|
|||||||
seq_printf(seq, " CS\t: %04x\n", seg);
|
seq_printf(seq, " CS\t: %04x\n", seg);
|
||||||
asm("movl %%ds,%0" : "=r" (seg));
|
asm("movl %%ds,%0" : "=r" (seg));
|
||||||
seq_printf(seq, " DS\t: %04x\n", seg);
|
seq_printf(seq, " DS\t: %04x\n", seg);
|
||||||
seq_printf(seq, " SS\t: %04lx\n", regs->ss);
|
seq_printf(seq, " SS\t: %04lx\n", regs->ss & 0xffff);
|
||||||
asm("movl %%es,%0" : "=r" (seg));
|
asm("movl %%es,%0" : "=r" (seg));
|
||||||
seq_printf(seq, " ES\t: %04x\n", seg);
|
seq_printf(seq, " ES\t: %04x\n", seg);
|
||||||
asm("movl %%fs,%0" : "=r" (seg));
|
asm("movl %%fs,%0" : "=r" (seg));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user