Commit 9197979b518573999d52d9e85bce1680682ed85c

Authored by Stefan Assmann
Committed by Ingo Molnar
1 parent a9322f6488

x86, pci: introduce pci=ioapicreroute kernel cmdline option

Introduce pci=ioapicreroute kernel cmdline option to enable rerouting of boot
interrupts to the primary io-apic.

Signed-off-by: Stefan Assmann <sassmann@suse.de>
Signed-off-by: Olaf Dabrunz <od@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 4 changed files with 14 additions and 0 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -1521,6 +1521,10 @@
1521 1521 noioapicquirk [APIC] Disable all boot interrupt quirks.
1522 1522 Safety option to keep boot IRQs enabled. This
1523 1523 should never be necessary.
  1524 + ioapicreroute [APIC] Enable rerouting of boot IRQs to the
  1525 + primary IO-APIC for bridges that cannot disable
  1526 + boot IRQs. This fixes a source of spurious IRQs
  1527 + when the system masks IRQs.
1524 1528 biosirq [X86-32] Use PCI BIOS calls to get the interrupt
1525 1529 routing table. These calls are known to be buggy
1526 1530 on several machines and they hang the machine
arch/x86/pci/common.c
... ... @@ -23,6 +23,7 @@
23 23 static int pci_bf_sort;
24 24 int pci_routeirq;
25 25 int noioapicquirk;
  26 +int noioapicreroute = 1;
26 27 int pcibios_last_bus = -1;
27 28 unsigned long pirq_table_addr;
28 29 struct pci_bus *pci_root_bus;
... ... @@ -498,6 +499,10 @@
498 499 return NULL;
499 500 } else if (!strcmp(str, "noioapicquirk")) {
500 501 noioapicquirk = 1;
  502 + return NULL;
  503 + } else if (!strcmp(str, "ioapicreroute")) {
  504 + if (noioapicreroute != -1)
  505 + noioapicreroute = 0;
501 506 return NULL;
502 507 }
503 508 return str;
include/asm-x86/io_apic.h
... ... @@ -160,12 +160,16 @@
160 160 /* 1 if "noapic" boot option passed */
161 161 extern int noioapicquirk;
162 162  
  163 +/* -1 if "noapic" boot option passed */
  164 +extern int noioapicreroute;
  165 +
163 166 /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
164 167 extern int timer_through_8259;
165 168  
166 169 static inline void disable_ioapic_setup(void)
167 170 {
168 171 noioapicquirk = 1;
  172 + noioapicreroute = -1;
169 173 skip_ioapic_setup = 1;
170 174 }
171 175  
include/asm-x86/pci.h
... ... @@ -20,6 +20,7 @@
20 20  
21 21 extern int pci_routeirq;
22 22 extern int noioapicquirk;
  23 +extern int ioapicreroute;
23 24  
24 25 /* scan a bus after allocating a pci_sysdata for it */
25 26 extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,