x86/idt: Simplify alloc_intr_gate()
authorThomas Gleixner <[email protected]>
Mon, 28 Aug 2017 06:47:58 +0000 (08:47 +0200)
committerIngo Molnar <[email protected]>
Tue, 29 Aug 2017 10:07:28 +0000 (12:07 +0200)
commit4447ac1195a845b18f2f427686f116ab77c5b268
treed92c01ac436ade4fcddf7a7aa77ecd7f4c026272
parentdb18da78f9a8bbab1bdc5968ba47ace788b5061f
x86/idt: Simplify alloc_intr_gate()

The only users of alloc_intr_gate() are hypervisors, which both check the
used_vectors bitmap whether they have allocated the gate already. Move that
check into alloc_intr_gate() and simplify the users.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Reviewed-by: K. Y. Srinivasan <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/mshyperv.c
arch/x86/kernel/idt.c
drivers/xen/events/events_base.c