Received: by 10.223.185.116 with SMTP id b49csp4910643wrg; Wed, 7 Mar 2018 03:14:31 -0800 (PST) X-Google-Smtp-Source: AG47ELtKZdVv9RcW0lo4yAM4FOWq84r3ZA3yXrnFd9v1JK2uzNSn1CkJxH+8z3cD3VrhFxpMScIv X-Received: by 10.99.191.78 with SMTP id i14mr17154607pgo.95.1520421271693; Wed, 07 Mar 2018 03:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520421271; cv=none; d=google.com; s=arc-20160816; b=adHFOp9r+iA9dSHTpqSRVQB7QlwsiBC59cyGB63r8rFPhCmPp34UZTWfzgymf2HguO qBA9epof65YYVfTGYkxVUbe5KKinBWvzlGGAWF+RoVheKd5HIjS4SRSJW6/HCqzryBRW o0mJWUdjhMPgotXgLXfF9kO4/7yRNm/z2Jh8gve2BaE54/8+mipcoZ97AcErm/xofDPl L4EsbiJyHsjx4fQ2Ffvxu464ISmggvYXLSr+QcH0M6C48xrCI0/QzmuqID3U+WEKD5ux acbyhFl7sQtNyfjTp0vfM/AkS0m55YDq6kSJMrCP5rQcqOerIA8nxGEPK6SspPjt+/xk FObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=OeTx7HOIjg3ziLUS8jKYf1L09mZefFfF0dgMPwq7tRs=; b=zdo/RWgDK6T0+Leg9jwJz6wQrpDE71yU5E9cqbuFeD5/bKrzaAcU48Kn5oSzOBO8EW ppjrB8R2zCjfcFAcqOVgvGaBeDElh/qrxl+G8CNLujvTnXl4YPQ5IkKxBQqU2CX6a3Eu kXEjFe9Aqj6A/Vvl9sVgLpnJh/oBecGCM8MYm1EMveRoTF9dlDsZ+M1mjL4+0A/zN3dK b84Rkk3Y/WQOZKXf73r5wVPn8sRGHXn92M//TA9UZ1bLy6VcWVHlhcASwLUct99UQ12n 7zELNwDIcxzlqUj8q0BX0sr8Rc/BIQrjp2ZO7F2qtNyM+Rd/nnw2hmjtOiFnPAhcg4kl WKwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f69si13729869pfd.196.2018.03.07.03.14.17; Wed, 07 Mar 2018 03:14:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754298AbeCGLNI (ORCPT + 99 others); Wed, 7 Mar 2018 06:13:08 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:63171 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbeCGLNF (ORCPT ); Wed, 7 Mar 2018 06:13:05 -0500 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id fbda1b9c44f3603f; Wed, 7 Mar 2018 12:13:03 +0100 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Keith Busch , Sinan Kaya , Lukas Wunner Subject: Re: [PATCH v1 9/9] PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter Date: Wed, 07 Mar 2018 12:13:47 +0100 Message-ID: <1605705.SjLI87HLIV@aspire.rjw.lan> In-Reply-To: <152040325332.240786.929303502030362231.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152040297576.240786.1532465558381209070.stgit@bhelgaas-glaptop.roam.corp.google.com> <152040325332.240786.929303502030362231.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, March 7, 2018 7:14:13 AM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > 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 > CC: MUNEDA Takahiro > CC: Kenji Kaneshige > CC: Prarit Bhargava > --- > Documentation/admin-guide/kernel-parameters.txt | 4 ---- > drivers/pci/pcie/portdrv.h | 12 ------------ > drivers/pci/pcie/portdrv_core.c | 20 +++----------------- > 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 @@ > force Enable ASPM even on devices that claim not to support it. > WARNING: Forcing ASPM on may cause system lockups. > > - pcie_hp= [PCIE] PCI Express Hotplug driver options: > - nomsi Do not use MSI for PCI Express Native Hotplug (this > - makes all PCIe ports use INTx for hotplug services). > - > pcie_ports= [PCIE] PCIe ports handling: > auto Ask the BIOS whether or not to use native PCIe services > associated with PCIe ports (PME, hot-plug, AER). Use > diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h > index 2c19cf9ffea2..87a87cb9f42d 100644 > --- a/drivers/pci/pcie/portdrv.h > +++ b/drivers/pci/pcie/portdrv.h > @@ -34,18 +34,6 @@ void pcie_port_bus_unregister(void); > > struct pci_dev; > > -#ifdef CONFIG_HOTPLUG_PCI_PCIE > -extern bool pciehp_msi_disabled; > - > -static inline bool pciehp_no_msi(void) > -{ > - return pciehp_msi_disabled; > -} > - > -#else /* !CONFIG_HOTPLUG_PCI_PCIE */ > -static inline bool pciehp_no_msi(void) { return false; } > -#endif /* !CONFIG_HOTPLUG_PCI_PCIE */ > - > #ifdef CONFIG_PCIE_PME > extern bool pcie_pme_msi_disabled; > > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c > index 29210e9bfbd3..bf9c5c885957 100644 > --- a/drivers/pci/pcie/portdrv_core.c > +++ b/drivers/pci/pcie/portdrv_core.c > @@ -21,17 +21,6 @@ > #include "../pci.h" > #include "portdrv.h" > > -bool pciehp_msi_disabled; > - > -static int __init pciehp_setup(char *str) > -{ > - if (!strncmp(str, "nomsi", 5)) > - pciehp_msi_disabled = true; > - > - return 1; > -} > -__setup("pcie_hp=", pciehp_setup); > - > /** > * release_pcie_device - free PCI Express port service device structure > * @dev: Port service device to release > @@ -169,16 +158,13 @@ static int pcie_init_service_irqs(struct pci_dev *dev, int *irqs, int mask) > irqs[i] = -1; > > /* > - * If we support PME or hotplug, but we can't use MSI/MSI-X for > - * them, we have to fall back to INTx or other interrupts, e.g., a > - * system shared interrupt. > + * If we support PME but can't use MSI/MSI-X for it, we have to > + * fall back to INTx or other interrupts, e.g., a system shared > + * interrupt. > */ > if ((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) > goto legacy_irq; > > - if ((mask & PCIE_PORT_SERVICE_HP) && pciehp_no_msi()) > - goto legacy_irq; > - > /* Try to use MSI-X or MSI if supported */ > if (pcie_port_enable_irq_vec(dev, irqs, mask) == 0) > return 0; > > Reviewed-by: Rafael J. Wysocki