]> git.baikalelectronics.ru Git - kernel.git/commit
x86/idt: Annotate alloc_intr_gate() with __init
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 28 Apr 2020 09:38:23 +0000 (11:38 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 13:14:33 +0000 (15:14 +0200)
commitf5b3abdbf8925dcf5ce6e76ca0025f91bc686c41
tree4122eff80df1091f767a701fdebb655ee8259290
parent0d79b9427c28ff5b09542d9cc32b936e285bfc19
x86/idt: Annotate alloc_intr_gate() with __init

There seems to be no reason to allocate interrupt gates after init. Mark
alloc_intr_gate() as __init and add WARN_ON() checks making sure it is
only used before idt_setup_apic_and_irq_gates() finalizes IDT setup and
maps all un-allocated entries to spurious entries.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200428093824.1451532-3-vkuznets@redhat.com
arch/x86/kernel/idt.c