diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-08-28 09:47:57 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-29 13:07:28 +0300 |
commit | db18da78f9a8bbab1bdc5968ba47ace788b5061f (patch) | |
tree | 52cb2a64b00c992d5f857fac031a76d108464c64 /arch/x86/include/asm/desc.h | |
parent | 485fa57bd73a0b79987d144e15bdc582f926701d (diff) | |
download | linux-db18da78f9a8bbab1bdc5968ba47ace788b5061f.tar.xz |
x86/idt: Deinline setup functions
None of this is performance sensitive in any way - so debloat the kernel.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170828064959.502052875@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/desc.h')
-rw-r--r-- | arch/x86/include/asm/desc.h | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index cbd36dd7993e..33f84f29a724 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -390,44 +390,11 @@ static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit) desc->limit1 = (limit >> 16) & 0xf; } -static inline void _set_gate(int gate, unsigned type, const void *addr, - unsigned dpl, unsigned ist, unsigned seg) -{ - gate_desc s; - - pack_gate(&s, type, (unsigned long)addr, dpl, ist, seg); - /* - * does not need to be atomic because it is only done once at - * setup time - */ - write_idt_entry(idt_table, gate, &s); -} - -static inline void set_intr_gate(unsigned int n, const void *addr) -{ - BUG_ON(n > 0xFF); - _set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS); -} +void set_intr_gate(unsigned int n, const void *addr); +void alloc_intr_gate(unsigned int n, const void *addr); extern unsigned long used_vectors[]; -static inline void alloc_system_vector(int vector) -{ - BUG_ON(vector < FIRST_SYSTEM_VECTOR); - if (!test_bit(vector, used_vectors)) { - set_bit(vector, used_vectors); - } else { - BUG(); - } -} - -#define alloc_intr_gate(n, addr) \ - do { \ - alloc_system_vector(n); \ - set_intr_gate(n, addr); \ - } while (0) - - #ifdef CONFIG_X86_64 DECLARE_PER_CPU(u32, debug_idt_ctr); static inline bool is_debug_idt_enabled(void) |