Commit a46f5c89 authored by Thomas Gleixner's avatar Thomas Gleixner

x86/ioapic: Add proper checks to setp/enable_IO_APIC()

No point to have the same checks at every call site. Add them to the
functions, so they can be called unconditionally.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarBorislav Petkov <bp@alien8.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/20150115211703.490719938@linutronix.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 86866083
...@@ -1507,7 +1507,10 @@ void __init enable_IO_APIC(void) ...@@ -1507,7 +1507,10 @@ void __init enable_IO_APIC(void)
int i8259_apic, i8259_pin; int i8259_apic, i8259_pin;
int apic, pin; int apic, pin;
if (!nr_legacy_irqs()) if (skip_ioapic_setup)
nr_ioapics = 0;
if (!nr_legacy_irqs() || !nr_ioapics)
return; return;
for_each_ioapic_pin(apic, pin) { for_each_ioapic_pin(apic, pin) {
...@@ -2373,9 +2376,9 @@ void __init setup_IO_APIC(void) ...@@ -2373,9 +2376,9 @@ void __init setup_IO_APIC(void)
{ {
int ioapic; int ioapic;
/* if (skip_ioapic_setup || !nr_ioapics)
* calling enable_IO_APIC() is moved to setup_local_APIC for BP return;
*/
io_apic_irqs = nr_legacy_irqs() ? ~PIC_IRQS : ~0UL; io_apic_irqs = nr_legacy_irqs() ? ~PIC_IRQS : ~0UL;
apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n"); apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment