diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-05-29 23:27:37 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 15:15:23 +0200 |
commit | f9912ada82862df341b3e86864cbd532d0d24b84 (patch) | |
tree | 4f66fac62be28d505c49dd4b974f7660d4c23c25 /arch/x86/include/asm/desc.h | |
parent | 84b6a3491567a540f955e18d8e615493afa36df0 (diff) | |
download | lwn-f9912ada82862df341b3e86864cbd532d0d24b84.tar.gz lwn-f9912ada82862df341b3e86864cbd532d0d24b84.zip |
x86/entry: Remove debug IDT frobbing
This is all unused now.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200529213321.245019500@infradead.org
Diffstat (limited to 'arch/x86/include/asm/desc.h')
-rw-r--r-- | arch/x86/include/asm/desc.h | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index d6c3d346c63a..07632f31147a 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -42,8 +42,6 @@ static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *in extern struct desc_ptr idt_descr; extern gate_desc idt_table[]; -extern const struct desc_ptr debug_idt_descr; -extern gate_desc debug_idt_table[]; struct gdt_page { struct desc_struct gdt[GDT_ENTRIES]; @@ -390,31 +388,6 @@ void alloc_intr_gate(unsigned int n, const void *addr); extern unsigned long system_vectors[]; -#ifdef CONFIG_X86_64 -DECLARE_PER_CPU(u32, debug_idt_ctr); -static __always_inline bool is_debug_idt_enabled(void) -{ - if (this_cpu_read(debug_idt_ctr)) - return true; - - return false; -} - -static __always_inline void load_debug_idt(void) -{ - load_idt((const struct desc_ptr *)&debug_idt_descr); -} -#else -static inline bool is_debug_idt_enabled(void) -{ - return false; -} - -static inline void load_debug_idt(void) -{ -} -#endif - /* * The load_current_idt() must be called with interrupts disabled * to avoid races. That way the IDT will always be set back to the expected @@ -424,10 +397,7 @@ static inline void load_debug_idt(void) */ static __always_inline void load_current_idt(void) { - if (is_debug_idt_enabled()) - load_debug_idt(); - else - load_idt((const struct desc_ptr *)&idt_descr); + load_idt((const struct desc_ptr *)&idt_descr); } extern void idt_setup_early_handler(void); @@ -438,11 +408,9 @@ extern void idt_setup_apic_and_irq_gates(void); #ifdef CONFIG_X86_64 extern void idt_setup_early_pf(void); extern void idt_setup_ist_traps(void); -extern void idt_setup_debugidt_traps(void); #else static inline void idt_setup_early_pf(void) { } static inline void idt_setup_ist_traps(void) { } -static inline void idt_setup_debugidt_traps(void) { } #endif extern void idt_invalidate(void *addr); |