]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86, pci: introduce config option for pci reroute quirks (was: [PATCH 0/3] Boot IRQ...
authorStefan Assmann <sassmann@suse.de>
Tue, 15 Jul 2008 11:48:55 +0000 (13:48 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 18 Jul 2008 17:31:19 +0000 (19:31 +0200)
This is against linux-2.6-tip, branch pci-ioapic-boot-irq-quirks.

From: Stefan Assmann <sassmann@suse.de>
Subject: Introduce config option for pci reroute quirks

The config option X86_REROUTE_FOR_BROKEN_BOOT_IRQS is introduced to
enable (or disable) the redirection of the interrupt handler to the boot
interrupt line by default. Depending on the existence of interrupt
masking / threaded interrupt handling in the kernel (vanilla, rt, ...)
and the maturity of the rerouting patch, users can enable or disable the
redirection by default.

This means that the reroute quirk can be applied to any kernel without
changing it.

Interrupt sharing could be increased if this option is enabled. However this
option is vital for threaded interrupt handling, as done by the RT kernel.
It should simplify the consolidation with the RT kernel.

The option can be overridden by either pci=ioapicreroute or
pci=noioapicreroute.

Signed-off-by: Stefan Assmann <sassmann@suse.de>
Signed-off-by: Olaf Dabrunz <od@suse.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jon Masters <jonathan@jonmasters.org>
Cc: Ihno Krumreich <ihno@suse.de>
Cc: Sven Dietrich <sdietrich@suse.de>
Cc: Daniel Gollub <dgollub@suse.de>
Cc: Felix Foerster <ffoerster@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/kernel-parameters.txt
arch/x86/Kconfig
arch/x86/pci/common.c
drivers/pci/quirks.c
include/asm-x86/pci.h

index f5662b7a34d12b2b53e37a294bdb7e31b656648e..62b6e8067a5b54d7d6c3de39655dfd998fb46696 100644 (file)
@@ -1536,6 +1536,10 @@ and is between 256 and 4096 characters. It is defined in the file
                                primary IO-APIC for bridges that cannot disable
                                boot IRQs. This fixes a source of spurious IRQs
                                when the system masks IRQs.
+               noioapicreroute [APIC] Disable workaround that uses the
+                               boot IRQ equivalent of an IRQ that connects to
+                               a chipset where boot IRQs cannot be disabled.
+                               The opposite of ioapicreroute.
                biosirq         [X86-32] Use PCI BIOS calls to get the interrupt
                                routing table. These calls are known to be buggy
                                on several machines and they hang the machine
index 96e0c2ebc3885713a5d6290f5e8eb959d0d0d36e..09521332636b1e1d98f47dac146d3a7539854851 100644 (file)
@@ -665,6 +665,30 @@ config X86_VISWS_APIC
        def_bool y
        depends on X86_32 && X86_VISWS
 
+config X86_REROUTE_FOR_BROKEN_BOOT_IRQS
+       bool "Reroute for broken boot IRQs"
+       default n
+       depends on X86_IO_APIC
+       help
+         This option enables a workaround that fixes a source of
+         spurious interrupts. This is recommended when threaded
+         interrupt handling is used on systems where the generation of
+         superfluous "boot interrupts" cannot be disabled.
+
+         Some chipsets generate a legacy INTx "boot IRQ" when the IRQ
+         entry in the chipset's IO-APIC is masked (as, e.g. the RT
+         kernel does during interrupt handling). On chipsets where this
+         boot IRQ generation cannot be disabled, this workaround keeps
+         the original IRQ line masked so that only the equivalent "boot
+         IRQ" is delivered to the CPUs. The workaround also tells the
+         kernel to set up the IRQ handler on the boot IRQ line. In this
+         way only one interrupt is delivered to the kernel. Otherwise
+         the spurious second interrupt may cause the kernel to bring
+         down (vital) interrupt lines.
+
+         Only affects "broken" chipsets. Interrupt sharing may be
+         increased on these systems.
+
 config X86_MCE
        bool "Machine Check Exception"
        depends on !X86_VOYAGER
index 1485a26ddcef11a47d0029f3ccecbb2fb196d4e9..bb1a01f089e29c817432907a820ca7a06f727347 100644 (file)
@@ -24,7 +24,11 @@ unsigned int pci_early_dump_regs;
 static int pci_bf_sort;
 int pci_routeirq;
 int noioapicquirk;
+#ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
+int noioapicreroute = 0;
+#else
 int noioapicreroute = 1;
+#endif
 int pcibios_last_bus = -1;
 unsigned long pirq_table_addr;
 struct pci_bus *pci_root_bus;
@@ -528,6 +532,10 @@ char * __devinit  pcibios_setup(char *str)
                if (noioapicreroute != -1)
                        noioapicreroute = 0;
                return NULL;
+       } else if (!strcmp(str, "noioapicreroute")) {
+               if (noioapicreroute != -1)
+                       noioapicreroute = 1;
+               return NULL;
        }
        return str;
 }
index 0911b0c60b647aa5e1e222d53ed2912ece5ca5f7..c880dd0bbfb5f51169562970e3c814b4e87f00ea 100644 (file)
@@ -1397,7 +1397,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,      0x260b, quirk_intel_pcie_pm);
  */
 static void quirk_reroute_to_boot_interrupts_intel(struct pci_dev *dev)
 {
-       if (noioapicquirk)
+       if (noioapicquirk || noioapicreroute)
                return;
 
        dev->irq_reroute_variant = INTEL_IRQ_REROUTE_VARIANT;
index 52a29f7668efd5228e397fed91d0d48a40776bb2..9584d6d5eb9338389badce5d2650748def649dc0 100644 (file)
@@ -20,7 +20,7 @@ struct pci_sysdata {
 
 extern int pci_routeirq;
 extern int noioapicquirk;
-extern int ioapicreroute;
+extern int noioapicreroute;
 
 /* scan a bus after allocating a pci_sysdata for it */
 extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,