From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org, "Krzysztof Wilczyński" <kw@linux.com>,
"Lukas Wunner" <lukas@wunner.de>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Yazen Ghannam" <yazen.ghannam@amd.com>,
linux-kernel@vger.kernel.org
Cc: "Mahesh J Salgaonkar" <mahesh@linux.ibm.com>,
"Oliver O'Halloran" <oohall@gmail.com>,
linuxppc-dev@lists.ozlabs.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH v8 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem
Date: Wed, 18 Dec 2024 16:37:41 +0200 [thread overview]
Message-ID: <20241218143747.3159-2-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20241218143747.3159-1-ilpo.jarvinen@linux.intel.com>
pcie_read_tlp_log() was exposed by the commit 0a5a46a6a61b ("PCI/AER:
Generalize TLP Header Log reading") but this is now considered a
mistake. No drivers outside of PCI subsystem should build their own
diagnostic logging but should rely on PCI core doing it for them.
There's currently one driver (ixgbe) doing it independently which was
the initial reason why the export was added but it was decided by the
PCI maintainer that it's something that should be eliminated.
Remove the unwanted EXPORT of pcie_read_tlp_log() and remove it from
include/linux/aer.h.
Link: https://lore.kernel.org/all/20240322193011.GA701027@bhelgaas/
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
drivers/pci/pci.c | 1 -
drivers/pci/pci.h | 4 ++++
include/linux/aer.h | 2 --
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 0b29ec6e8e5e..e0fdc9d10f91 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1125,7 +1125,6 @@ int pcie_read_tlp_log(struct pci_dev *dev, int where,
return 0;
}
-EXPORT_SYMBOL_GPL(pcie_read_tlp_log);
/**
* pci_restore_bars - restore a device's BAR values (e.g. after wake-up)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 2e40fc63ba31..8a60fc9e7786 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -4,6 +4,8 @@
#include <linux/pci.h>
+struct pcie_tlp_log;
+
/* Number of possible devfns: 0.0 to 1f.7 inclusive */
#define MAX_NR_DEVFNS 256
@@ -549,6 +551,8 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info);
void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
#endif /* CONFIG_PCIEAER */
+int pcie_read_tlp_log(struct pci_dev *dev, int where, struct pcie_tlp_log *log);
+
#ifdef CONFIG_PCIEPORTBUS
/* Cached RCEC Endpoint Association */
struct rcec_ea {
diff --git a/include/linux/aer.h b/include/linux/aer.h
index 4b97f38f3fcf..190a0a2061cd 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -37,8 +37,6 @@ struct aer_capability_regs {
u16 uncor_err_source;
};
-int pcie_read_tlp_log(struct pci_dev *dev, int where, struct pcie_tlp_log *log);
-
#if defined(CONFIG_PCIEAER)
int pci_aer_clear_nonfatal_status(struct pci_dev *dev);
int pcie_aer_is_native(struct pci_dev *dev);
--
2.39.5
next prev parent reply other threads:[~2024-12-18 14:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 14:37 [PATCH v8 0/7] PCI: Consolidate TLP Log reading and printing Ilpo Järvinen
2024-12-18 14:37 ` Ilpo Järvinen [this message]
2025-01-08 16:05 ` [PATCH v8 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 2/7] PCI: Move TLP Log handling to own file Ilpo Järvinen
2025-01-08 16:26 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 3/7] PCI: Make pcie_read_tlp_log() signature same Ilpo Järvinen
2025-01-08 20:40 ` Yazen Ghannam
2025-01-08 22:13 ` Bjorn Helgaas
2024-12-18 14:37 ` [PATCH v8 4/7] PCI: Use unsigned int i in pcie_read_tlp_log() Ilpo Järvinen
2025-01-03 16:38 ` Jonathan Cameron
2024-12-18 14:37 ` [PATCH v8 5/7] PCI: Store # of supported End-End TLP Prefixes Ilpo Järvinen
2025-01-03 16:36 ` Jonathan Cameron
2025-01-08 20:56 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log() Ilpo Järvinen
2025-01-08 21:33 ` Yazen Ghannam
2025-01-09 9:36 ` Ilpo Järvinen
2025-01-10 14:54 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 7/7] PCI: Create helper to print TLP Header and Prefix Log Ilpo Järvinen
2025-01-08 15:53 ` [PATCH v8 0/7] PCI: Consolidate TLP Log reading and printing Yazen Ghannam
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=20241218143747.3159-2-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukas@wunner.de \
--cc=mahesh@linux.ibm.com \
--cc=oohall@gmail.com \
--cc=yazen.ghannam@amd.com \
/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;
as well as URLs for NNTP newsgroup(s).