Linux Power Management development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, Keith Busch <keith.busch@intel.com>,
	Sinan Kaya <okaya@codeaurora.org>, Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH v1 9/9] PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter
Date: Wed, 07 Mar 2018 12:13:47 +0100	[thread overview]
Message-ID: <1605705.SjLI87HLIV@aspire.rjw.lan> (raw)
In-Reply-To: <152040325332.240786.929303502030362231.stgit@bhelgaas-glaptop.roam.corp.google.com>

On Wednesday, March 7, 2018 7:14:13 AM CET Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> 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>
> CC: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
> CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> CC: Prarit Bhargava <prarit@redhat.com>
> ---
>  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 <rafael.j.wysocki@intel.com>

      reply	other threads:[~2018-03-07 11:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  6:13 [PATCH v1 0/9] PCI: Simplify PCIe port driver Bjorn Helgaas
2018-03-07  6:13 ` [PATCH v1 1/9] PCI/PM: Move pcie_clear_root_pme_status() to core Bjorn Helgaas
2018-03-07 10:24   ` Rafael J. Wysocki
2018-03-07  6:13 ` [PATCH v1 2/9] PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver Bjorn Helgaas
2018-03-07 10:27   ` Rafael J. Wysocki
2018-03-08  8:03   ` Lukas Wunner
2018-03-08  9:13     ` Rafael J. Wysocki
2018-03-07  6:13 ` [PATCH v1 3/9] PCI/PM: Clear PCIe PME Status bit for Root Complex Event Collectors Bjorn Helgaas
2018-03-07 10:27   ` Rafael J. Wysocki
2018-03-07  6:13 ` [PATCH v1 4/9] PCI/portdrv: Disable port driver in compat mode Bjorn Helgaas
2018-03-07 10:29   ` Rafael J. Wysocki
2018-03-07  6:13 ` [PATCH v1 5/9] PCI/portdrv: Remove pcie_port_bus_type link order dependency Bjorn Helgaas
2018-03-07 10:33   ` Rafael J. Wysocki
2018-03-07  6:13 ` [PATCH v1 6/9] PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC Bjorn Helgaas
2018-03-07 10:34   ` Rafael J. Wysocki
2018-03-07  6:14 ` [PATCH v1 7/9] PCI/portdrv: Simplify PCIe feature permission checking Bjorn Helgaas
2018-03-07 11:12   ` Rafael J. Wysocki
2018-03-07  6:14 ` [PATCH v1 8/9] PCI/portdrv: Remove unnecessary include of <linux/pci-aspm.h> Bjorn Helgaas
2018-03-07 11:12   ` Rafael J. Wysocki
2018-03-07  6:14 ` [PATCH v1 9/9] PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter Bjorn Helgaas
2018-03-07 11:13   ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1605705.SjLI87HLIV@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=helgaas@kernel.org \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=okaya@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox