* [PATCH] PCI: Remove pci_lost_interrupt
@ 2020-07-28 21:03 Heiner Kallweit
2020-07-29 19:26 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2020-07-28 21:03 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, James Bottomley
388c8c16abaf ("PCI: add routines for debugging and handling lost
interrupts") added pci_lost_interrupt() that apparently never has
had a single user. So remove it.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/pci/irq.c | 50 ---------------------------------------------
include/linux/pci.h | 7 -------
2 files changed, 57 deletions(-)
diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c
index a1de501a2..12ecd0aaa 100644
--- a/drivers/pci/irq.c
+++ b/drivers/pci/irq.c
@@ -6,61 +6,11 @@
* Copyright (C) 2017 Christoph Hellwig.
*/
-#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/pci.h>
-static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason)
-{
- struct pci_dev *parent = to_pci_dev(pdev->dev.parent);
-
- pci_err(pdev, "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
- dev_name(&parent->dev), parent->vendor, parent->device);
- pci_err(pdev, "%s\n", reason);
- pci_err(pdev, "Please report to linux-kernel@vger.kernel.org\n");
- WARN_ON(1);
-}
-
-/**
- * pci_lost_interrupt - reports a lost PCI interrupt
- * @pdev: device whose interrupt is lost
- *
- * The primary function of this routine is to report a lost interrupt
- * in a standard way which users can recognise (instead of blaming the
- * driver).
- *
- * Returns:
- * a suggestion for fixing it (although the driver is not required to
- * act on this).
- */
-enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev)
-{
- if (pdev->msi_enabled || pdev->msix_enabled) {
- enum pci_lost_interrupt_reason ret;
-
- if (pdev->msix_enabled) {
- pci_note_irq_problem(pdev, "MSIX routing failure");
- ret = PCI_LOST_IRQ_DISABLE_MSIX;
- } else {
- pci_note_irq_problem(pdev, "MSI routing failure");
- ret = PCI_LOST_IRQ_DISABLE_MSI;
- }
- return ret;
- }
-#ifdef CONFIG_ACPI
- if (!(acpi_disabled || acpi_noirq)) {
- pci_note_irq_problem(pdev, "Potential ACPI misrouting please reboot with acpi=noirq");
- /* currently no way to fix acpi on the fly */
- return PCI_LOST_IRQ_DISABLE_ACPI;
- }
-#endif
- pci_note_irq_problem(pdev, "unknown cause (not MSI or ACPI)");
- return PCI_LOST_IRQ_NO_INFORMATION;
-}
-EXPORT_SYMBOL(pci_lost_interrupt);
-
/**
* pci_request_irq - allocate an interrupt line for a PCI device
* @dev: PCI device to operate on
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 2a2d00e9d..814d652f2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1053,13 +1053,6 @@ void pci_sort_breadthfirst(void);
/* Generic PCI functions exported to card drivers */
-enum pci_lost_interrupt_reason {
- PCI_LOST_IRQ_NO_INFORMATION = 0,
- PCI_LOST_IRQ_DISABLE_MSI,
- PCI_LOST_IRQ_DISABLE_MSIX,
- PCI_LOST_IRQ_DISABLE_ACPI,
-};
-enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
int pci_find_capability(struct pci_dev *dev, int cap);
int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
int pci_find_ext_capability(struct pci_dev *dev, int cap);
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: Remove pci_lost_interrupt
2020-07-28 21:03 [PATCH] PCI: Remove pci_lost_interrupt Heiner Kallweit
@ 2020-07-29 19:26 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-07-29 19:26 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Bjorn Helgaas, linux-pci, James Bottomley
On Tue, Jul 28, 2020 at 11:03:41PM +0200, Heiner Kallweit wrote:
> 388c8c16abaf ("PCI: add routines for debugging and handling lost
> interrupts") added pci_lost_interrupt() that apparently never has
> had a single user. So remove it.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied to pci/misc for v5.9, thanks!
> ---
> drivers/pci/irq.c | 50 ---------------------------------------------
> include/linux/pci.h | 7 -------
> 2 files changed, 57 deletions(-)
>
> diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c
> index a1de501a2..12ecd0aaa 100644
> --- a/drivers/pci/irq.c
> +++ b/drivers/pci/irq.c
> @@ -6,61 +6,11 @@
> * Copyright (C) 2017 Christoph Hellwig.
> */
>
> -#include <linux/acpi.h>
> #include <linux/device.h>
> #include <linux/kernel.h>
> #include <linux/export.h>
> #include <linux/pci.h>
>
> -static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason)
> -{
> - struct pci_dev *parent = to_pci_dev(pdev->dev.parent);
> -
> - pci_err(pdev, "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
> - dev_name(&parent->dev), parent->vendor, parent->device);
> - pci_err(pdev, "%s\n", reason);
> - pci_err(pdev, "Please report to linux-kernel@vger.kernel.org\n");
> - WARN_ON(1);
> -}
> -
> -/**
> - * pci_lost_interrupt - reports a lost PCI interrupt
> - * @pdev: device whose interrupt is lost
> - *
> - * The primary function of this routine is to report a lost interrupt
> - * in a standard way which users can recognise (instead of blaming the
> - * driver).
> - *
> - * Returns:
> - * a suggestion for fixing it (although the driver is not required to
> - * act on this).
> - */
> -enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev)
> -{
> - if (pdev->msi_enabled || pdev->msix_enabled) {
> - enum pci_lost_interrupt_reason ret;
> -
> - if (pdev->msix_enabled) {
> - pci_note_irq_problem(pdev, "MSIX routing failure");
> - ret = PCI_LOST_IRQ_DISABLE_MSIX;
> - } else {
> - pci_note_irq_problem(pdev, "MSI routing failure");
> - ret = PCI_LOST_IRQ_DISABLE_MSI;
> - }
> - return ret;
> - }
> -#ifdef CONFIG_ACPI
> - if (!(acpi_disabled || acpi_noirq)) {
> - pci_note_irq_problem(pdev, "Potential ACPI misrouting please reboot with acpi=noirq");
> - /* currently no way to fix acpi on the fly */
> - return PCI_LOST_IRQ_DISABLE_ACPI;
> - }
> -#endif
> - pci_note_irq_problem(pdev, "unknown cause (not MSI or ACPI)");
> - return PCI_LOST_IRQ_NO_INFORMATION;
> -}
> -EXPORT_SYMBOL(pci_lost_interrupt);
> -
> /**
> * pci_request_irq - allocate an interrupt line for a PCI device
> * @dev: PCI device to operate on
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 2a2d00e9d..814d652f2 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1053,13 +1053,6 @@ void pci_sort_breadthfirst(void);
>
> /* Generic PCI functions exported to card drivers */
>
> -enum pci_lost_interrupt_reason {
> - PCI_LOST_IRQ_NO_INFORMATION = 0,
> - PCI_LOST_IRQ_DISABLE_MSI,
> - PCI_LOST_IRQ_DISABLE_MSIX,
> - PCI_LOST_IRQ_DISABLE_ACPI,
> -};
> -enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
> int pci_find_capability(struct pci_dev *dev, int cap);
> int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
> int pci_find_ext_capability(struct pci_dev *dev, int cap);
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-29 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 21:03 [PATCH] PCI: Remove pci_lost_interrupt Heiner Kallweit
2020-07-29 19:26 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).