diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-08-28 08:47:18 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-29 11:42:21 +0200 |
commit | 05161b9cbe553c41cf775ac41bb5120d94347e5c (patch) | |
tree | 577b974abdd922779721a2b98d0c80ae82cb8722 /arch/x86/include/asm/desc.h | |
parent | fa4ab5774dfe58fd5e99462f625253659d41df09 (diff) | |
download | linux-stable-05161b9cbe553c41cf775ac41bb5120d94347e5c.tar.gz linux-stable-05161b9cbe553c41cf775ac41bb5120d94347e5c.tar.bz2 linux-stable-05161b9cbe553c41cf775ac41bb5120d94347e5c.zip |
x86/irq: Get rid of the 'first_system_vector' indirection bogosity
This variable is beyond pointless. Nothing allocates a vector via
alloc_gate() below FIRST_SYSTEM_VECTOR. So nothing can change
first_system_vector.
If there is a need for a gate below FIRST_SYSTEM_VECTOR then it can be
added to the vector defines and FIRST_SYSTEM_VECTOR can be adjusted
accordingly.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
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/20170828064956.357109735@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 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index d0a21b12dd58..a7f36ab1c07d 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -5,6 +5,7 @@ #include <asm/ldt.h> #include <asm/mmu.h> #include <asm/fixmap.h> +#include <asm/irq_vectors.h> #include <linux/smp.h> #include <linux/percpu.h> @@ -482,16 +483,14 @@ static inline void _set_gate(int gate, unsigned type, void *addr, 0, 0, __KERNEL_CS); \ } while (0) -extern int first_system_vector; /* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ 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); - if (first_system_vector > vector) - first_system_vector = vector; } else { BUG(); } |