]> git.baikalelectronics.ru Git - kernel.git/commit
x86/idt: Simplify the idt_setup_apic_and_irq_gates()
authorDou Liyang <douly.fnst@cn.fujitsu.com>
Wed, 23 May 2018 02:35:55 +0000 (10:35 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 6 Jun 2018 11:38:01 +0000 (13:38 +0200)
commit3aeabdb431ca8f913dd70a5a44593c8a21df6966
tree172d0a021897995579b33c5a8a3f11f89d15a9c4
parent3367545b856fe83dd03c275f1a8acf3275d3e951
x86/idt: Simplify the idt_setup_apic_and_irq_gates()

The idt_setup_apic_and_irq_gates() sets the gates from
FIRST_EXTERNAL_VECTOR up to FIRST_SYSTEM_VECTOR first. then secondly, from
FIRST_SYSTEM_VECTOR to NR_VECTORS, it takes both APIC=y and APIC=n into
account.

But for APIC=n, the FIRST_SYSTEM_VECTOR is equal to NR_VECTORS, all
vectors has been set at the first step.

Simplify the second step, make it just work for APIC=y.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20180523023555.2933-1-douly.fnst@cn.fujitsu.com
arch/x86/kernel/idt.c