aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-03-09 12:21:27 -0500
committerBjorn Helgaas <helgaas@kernel.org>2018-03-30 18:26:56 -0400
commit1e447c57ae367c030e7b424f55a91470ae7604ca (patch)
tree62c63bd47fff39ae4fabce7a994ac86404f49317
parent1b64cb87cf0013cdd04b7e1665072a00f92b830f (diff)
PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter
7570a333d8b0 ("PCI: Add pcie_hp=nomsi to disable MSI/MSI-X for pciehp driver") added the "pcie_hp=nomsi" kernel parameter to work around this error on shutdown: irq 16: nobody cared (try booting with the "irqpoll" option) Pid: 1081, comm: reboot Not tainted 3.2.0 #1 ... Disabling IRQ #16 This happened on an unspecified system (possibly involving the Integrated Device Technology, Inc. Device 807f bridge) where "an un-wanted interrupt is generated when PCI driver switches from MSI/MSI-X to INTx while shutting down the device." The implication was that the device was buggy, but it is normal for a device to use INTx after MSI/MSI-X have been disabled. The only problem was that the driver was still attached and it wasn't prepared for INTx interrupts. Prarit Bhargava fixed this issue with fda78d7a0ead ("PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()"). There is no automated way to set this parameter, so it's not very useful for distributions or end users. It's really only useful for debugging, and we have "pci=nomsi" for that purpose. Revert 7570a333d8b0 to remove the "pcie_hp=nomsi" parameter. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> CC: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com> CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> CC: Prarit Bhargava <prarit@redhat.com>
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt4
-rw-r--r--drivers/pci/pcie/portdrv.h12
-rw-r--r--drivers/pci/pcie/portdrv_core.c20
3 files changed, 3 insertions, 33 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 1d1d53f85ddd..761749562165 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3130,10 +3130,6 @@
3130 force Enable ASPM even on devices that claim not to support it. 3130 force Enable ASPM even on devices that claim not to support it.
3131 WARNING: Forcing ASPM on may cause system lockups. 3131 WARNING: Forcing ASPM on may cause system lockups.
3132 3132
3133 pcie_hp= [PCIE] PCI Express Hotplug driver options:
3134 nomsi Do not use MSI for PCI Express Native Hotplug (this
3135 makes all PCIe ports use INTx for hotplug services).
3136
3137 pcie_ports= [PCIE] PCIe ports handling: 3133 pcie_ports= [PCIE] PCIe ports handling:
3138 auto Ask the BIOS whether or not to use native PCIe services 3134 auto Ask the BIOS whether or not to use native PCIe services
3139 associated with PCIe ports (PME, hot-plug, AER). Use 3135 associated with PCIe ports (PME, hot-plug, AER). Use
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h
index ed84e767085f..86368f9341d7 100644
--- a/drivers/pci/pcie/portdrv.h
+++ b/drivers/pci/pcie/portdrv.h
@@ -91,18 +91,6 @@ void pcie_port_bus_unregister(void);
91 91
92struct pci_dev; 92struct pci_dev;
93 93
94#ifdef CONFIG_HOTPLUG_PCI_PCIE
95extern bool pciehp_msi_disabled;
96
97static inline bool pciehp_no_msi(void)
98{
99 return pciehp_msi_disabled;
100}
101
102#else /* !CONFIG_HOTPLUG_PCI_PCIE */
103static inline bool pciehp_no_msi(void) { return false; }
104#endif /* !CONFIG_HOTPLUG_PCI_PCIE */
105
106#ifdef CONFIG_PCIE_PME 94#ifdef CONFIG_PCIE_PME
107extern bool pcie_pme_msi_disabled; 95extern bool pcie_pme_msi_disabled;
108 96
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 5c25761cd05e..6ed67cbf6148 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -20,17 +20,6 @@
20#include "../pci.h" 20#include "../pci.h"
21#include "portdrv.h" 21#include "portdrv.h"
22 22
23bool pciehp_msi_disabled;
24
25static int __init pciehp_setup(char *str)
26{
27 if (!strncmp(str, "nomsi", 5))
28 pciehp_msi_disabled = true;
29
30 return 1;
31}
32__setup("pcie_hp=", pciehp_setup);
33
34/** 23/**
35 * release_pcie_device - free PCI Express port service device structure 24 * release_pcie_device - free PCI Express port service device structure
36 * @dev: Port service device to release 25 * @dev: Port service device to release
@@ -168,16 +157,13 @@ static int pcie_init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
168 irqs[i] = -1; 157 irqs[i] = -1;
169 158
170 /* 159 /*
171 * If we support PME or hotplug, but we can't use MSI/MSI-X for 160 * If we support PME but can't use MSI/MSI-X for it, we have to
172 * them, we have to fall back to INTx or other interrupts, e.g., a 161 * fall back to INTx or other interrupts, e.g., a system shared
173 * system shared interrupt. 162 * interrupt.
174 */ 163 */
175 if ((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) 164 if ((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi())
176 goto legacy_irq; 165 goto legacy_irq;
177 166
178 if ((mask & PCIE_PORT_SERVICE_HP) && pciehp_no_msi())
179 goto legacy_irq;
180
181 /* Try to use MSI-X or MSI if supported */ 167 /* Try to use MSI-X or MSI if supported */
182 if (pcie_port_enable_irq_vec(dev, irqs, mask) == 0) 168 if (pcie_port_enable_irq_vec(dev, irqs, mask) == 0)
183 return 0; 169 return 0;