Re: [patch 32/39] PCI/MSI: Reorder functions in msi.c

2022-11-16 Thread Bjorn Helgaas
ely non-obvious. > > Reorder everthing so common helpers, MSI and MSI-X specific functions are > grouped together. s/everthing/everything/ > Suggested-by: Thomas Gleixner > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas I assume

Re: [patch 31/39] Documentation: PCI: Add reference to PCI/MSI device driver APIs

2022-11-16 Thread Bjorn Helgaas
cial PCI/MSI howto. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > Documentation/PCI/msi-howto.rst | 10 ++ > 1 file changed, 10 insertions(+) > --- > --- a/Documentation/PCI/msi-howto.rst > +++ b/Docume

Re: [patch 30/39] PCI/MSI: Move pci_msi_restore_state() to api.c

2022-11-16 Thread Bjorn Helgaas
n. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c > index ee9ed5ccd94d..8d1cf6db9bd7 100644 > --- a/drivers/pci/msi/api.c > +++ b/drivers/pci/msi/api.c > @@ -

Re: [patch 29/39] PCI/MSI: Move pci_msi_enabled() to api.c

2022-11-16 Thread Bjorn Helgaas
e. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/api.c | 12 > drivers/pci/msi/msi.c | 14 +- > drivers/pci/msi/msi.h | 3 +++ > 3 files changed, 16 insertions(+), 13 deletions(-)

Re: [patch 27/39] PCI/MSI: Move pci_disable_msix() to api.c

2022-11-16 Thread Bjorn Helgaas
e. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Trivial question below. > --- > drivers/pci/msi/api.c | 24 > drivers/pci/msi/msi.c | 14 +- > drivers/pci/msi/msi.h | 1 + > 3 fil

Re: [patch 26/39] PCI/MSI: Move pci_msix_vec_count() to api.c

2022-11-16 Thread Bjorn Helgaas
e. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/api.c | 20 > drivers/pci/msi/msi.c | 20 > 2 files changed, 20 insertions(+), 20 deletions(-) > --- > dif

Re: [patch 25/39] PCI/MSI: Move pci_free_irq_vectors() to api.c

2022-11-16 Thread Bjorn Helgaas
e. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/api.c | 15 +++ > drivers/pci/msi/msi.c | 13 - > 2 files changed, 15 insertions(+), 13 deletions(-) > --- > diff --git a/

Re: [patch 24/39] PCI/MSI: Move pci_irq_vector() to api.c

2022-11-16 Thread Bjorn Helgaas
file. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/api.c | 23 +++ > drivers/pci/msi/msi.c | 24 > 2 files changed, 23 insertions(+), 24 deletions(-) >

Re: [patch 23/39] PCI/MSI: Move pci_alloc_irq_vectors_affinity() to api.c

2022-11-16 Thread Bjorn Helgaas
rnel-doc reference > pci_alloc_irq_vectors() documentation added in parent commit. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas One question below. > --- > drivers/pci/msi/api.c | 59 ++

Re: [patch 22/39] PCI/MSI: Move pci_alloc_irq_vectors() to api.c

2022-11-16 Thread Bjorn Helgaas
r and add > proper kernel doc to it. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Two nits below. > --- > drivers/pci/msi/api.c | 33 + > include/linux/pci.h | 17 + > 2 fi

Re: [patch 21/39] PCI/MSI: Move pci_enable_msix_range() to api.c

2022-11-16 Thread Bjorn Helgaas
e. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/api.c | 32 > drivers/pci/msi/msi.c | 30 -- > drivers/pci/msi/msi.h | 3 +++ > 3 fil

Re: [patch 20/39] PCI/MSI: Move pci_enable_msi() API to api.c

2022-11-16 Thread Bjorn Helgaas
gt; Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Nit: suggest "disentangle" or "untangle" for "distangle" here and in subsequent patches. > --- > drivers/pci/msi/api.c | 23 +++ > drive

Re: [patch 19/39] PCI/MSI: Move pci_disable_msi() to api.c

2022-11-16 Thread Bjorn Helgaas
ned-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/Makefile | 3 +-- > drivers/pci/msi/api.c| 37 + > drivers/pci/msi/msi.c| 22 +- > drivers/pci/msi

Re: [patch 18/39] PCI/MSI: Move mask and unmask helpers to msi.h

2022-11-16 Thread Bjorn Helgaas
off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c | 61 +-- > drivers/pci/msi/msi.h | 83 > +--- > 2 files changed, 74 inserti

Re: [patch 17/39] PCI/MSI: Get rid of externs in msi.h

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:42PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Follow the style of > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.h |8 > 1

Re: [patch 14/39] PCI/MSI: Let the MSI core free descriptors

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:37PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Let the core do the freeing of descriptors and just keep it around for the > legacy case. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Ac

Re: [patch 13/39] PCI/MSI: Use msi_domain_info::bus_token

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:35PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Set the bus token in the msi_domain_info structure and let the core code > handle the update. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Ac

Re: [patch 15/39] PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN

2022-11-16 Thread Bjorn Helgaas
enables PCI_MSI_IRQ_DOMAIN which in turn selects > GENERIC_MSI_IRQ_DOMAIN. So all the dependencies on PCI_MSI_IRQ_DOMAIN are > just an indirection to PCI_MSI. > > Match the reality and just admit that PCI_MSI requires > GENERIC_MSI_IRQ_DOMAIN. > > Signed-off-by: Thomas Gleixner

Re: [PATCH v3 0/5] PCI: Remove unnecessary includes

2022-11-10 Thread Bjorn Helgaas
On Mon, Oct 31, 2022 at 10:39:49AM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Many host controller drivers #include even though they > don't need it. Remove the unnecessary #includes. > > v2: https://lore.kernel.org/r/20221025185147.665365-1-helg...@kerne

[PATCH v3 5/5] PCI: Remove unnecessary includes

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/cadence/pci-j721e.c | 1 - drivers/pci/controller/dwc/pci-layerscape.c | 1 - drivers/pci/controller/dwc

[PATCH v3 4/5] PCI: xgene-msi: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pci-xgene-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pci-xgene-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch can

[PATCH v3 3/5] PCI: mvebu: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pci-mvebu.c uses irq_domain_add_linear() and related interfaces but relies on but doesn't include it directly; it relies on the fact that includes it. Include directly to remove this implicit dependency. Signed-off-by: Bjorn Helgaas Acked-by: Thomas Petazzoni

[PATCH v3 2/5] PCI: microchip: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-microchip-host.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-microchip-host.c *doesn't* need itself. Include directly to remove this implicit dependency so

[PATCH v3 1/5] PCI: altera-msi: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-altera-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-altera-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch

[PATCH v3 0/5] PCI: Remove unnecessary includes

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. v2: https://lore.kernel.org/r/20221025185147.665365-1-helg...@kernel.org/ v1: https://lore.kernel.org/r/20221019195452.37606-1-helg...@kernel.org/ Changes from v2 to v3

[PATCH v2 4/4] PCI: Remove unnecessary includes

2022-10-25 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/cadence/pci-j721e.c | 1 - drivers/pci/controller/dwc/pci-layerscape.c | 1 - drivers/pci/controller/dwc

[PATCH v2 3/4] PCI: mvebu: Include explicitly

2022-10-25 Thread Bjorn Helgaas
From: Bjorn Helgaas pci-mvebu.c uses irq_domain_add_linear() and related interfaces but relies on but doesn't include it directly; it relies on the fact that includes it. Include directly to remove this implicit dependency. Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/pci

[PATCH v2 2/4] PCI: microchip: Include explicitly

2022-10-25 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-microchip-host.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-microchip-host.c *doesn't* need itself. Include directly to remove this implicit dependency so

[PATCH v2 0/4] PCI: Remove unnecessary includes

2022-10-25 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. v1: https://lore.kernel.org/all/20221019195452.37606-1-helg...@kernel.org/ Changes from v1 to v2: - Include explicitly in altera-msi and microchip, which don't

[PATCH v2 1/4] PCI: altera-msi: Include explicitly

2022-10-25 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-altera-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-altera-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch

Re: [PATCH] PCI: Remove unnecessary of_irq.h includes

2022-10-20 Thread Bjorn Helgaas
-20221020] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commi

Re: [PATCH] PCI: Remove unnecessary of_irq.h includes

2022-10-20 Thread Bjorn Helgaas
On Thu, Oct 20, 2022 at 08:41:01AM -0500, Bjorn Helgaas wrote: > On Thu, Oct 20, 2022 at 04:09:37PM +0800, kernel test robot wrote: > > Hi Bjorn, > > > > I love your patch! Yet something to improve: > > > > [auto build test ERROR on helgaas-pci/next] > >

Re: [PATCH] PCI: Remove unnecessary of_irq.h includes

2022-10-20 Thread Bjorn Helgaas
[+cc Pali, heads-up for trivial addition of to pci-mvebu.c] On Thu, Oct 20, 2022 at 08:20:25AM +0100, Conor Dooley wrote: > On Thu, Oct 20, 2022 at 03:08:50PM +0800, kernel test robot wrote: > > Hi Bjorn, > > > > I love your patch! Yet something to improve: > > > > >>

Re: [PATCH] PCI: Remove unnecessary of_irq.h includes

2022-10-20 Thread Bjorn Helgaas
-20221020] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commi

[PATCH] PCI: Remove unnecessary of_irq.h includes

2022-10-19 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/cadence/pci-j721e.c | 1 - drivers/pci/controller/dwc/pci-layerscape.c | 1 - drivers/pci/controller/dwc

Re: [PATCH 2/3] PCI/AER: Disable AER service on suspend when IRQ is shared with PME

2022-09-28 Thread Bjorn Helgaas
On Wed, Jul 27, 2022 at 09:32:51AM +0800, Kai-Heng Feng wrote: > PCIe service that shares IRQ with PME may cause spurious wakeup on > system suspend. > > PCIe Base Spec 5.0, section 5.2 "Link State Power Management" states > that TLP and DLLP transmission is disabled for a Link in L2/L3 Ready >

Re: [PATCH 3/3] PCI/DPC: Disable DPC service on suspend when IRQ is shared with PME

2022-09-28 Thread Bjorn Helgaas
On Wed, Jul 27, 2022 at 09:32:52AM +0800, Kai-Heng Feng wrote: > PCIe service that shares IRQ with PME may cause spurious wakeup on > system suspend. > > Since AER is conditionally disabled in previous patch, also apply the > same condition to disable DPC which depends on AER to work. > > PCIe

Re: [PATCH 2/3] PCI/ERR: Clear fatal status in pcie_do_recovery()

2022-09-26 Thread Bjorn Helgaas
On Mon, Sep 26, 2022 at 10:01:55PM +0800, Zhuo Chen wrote: > On 9/23/22 5:08 AM, Bjorn Helgaas wrote: > > On Fri, Sep 02, 2022 at 02:16:33AM +0800, Zhuo Chen wrote: > > > When state is pci_channel_io_frozen in pcie_do_recovery(), > > > the severity is fatal and fat

Re: [PATCH 3/3] PCI/AER: Use pci_aer_raw_clear_status() to clear root port's AER error status

2022-09-26 Thread Bjorn Helgaas
On Mon, Sep 26, 2022 at 10:16:23PM +0800, Zhuo Chen wrote: > On 9/23/22 5:50 AM, Bjorn Helgaas wrote: > > On Fri, Sep 02, 2022 at 02:16:34AM +0800, Zhuo Chen wrote: > > > Statements clearing AER error status in aer_enable_rootport() has the > > > same function as pci_ae

Re: [PATCH 1/3] PCI/AER: Use pci_aer_clear_uncorrect_error_status() to clear uncorrectable error status

2022-09-26 Thread Bjorn Helgaas
On Mon, Sep 26, 2022 at 09:30:48PM +0800, Zhuo Chen wrote: > On 9/23/22 4:02 AM, Bjorn Helgaas wrote: > > On Mon, Sep 12, 2022 at 01:09:05AM +0800, Zhuo Chen wrote: > > > On 9/12/22 12:22 AM, Serge Semin wrote: > > > > On Fri, Sep 02, 2022 at 02:

Re: [PATCH 3/3] PCI/AER: Use pci_aer_raw_clear_status() to clear root port's AER error status

2022-09-22 Thread Bjorn Helgaas
On Fri, Sep 02, 2022 at 02:16:34AM +0800, Zhuo Chen wrote: > Statements clearing AER error status in aer_enable_rootport() has the > same function as pci_aer_raw_clear_status(). So we replace them, which > has no functional changes. > > Signed-off-by: Zhuo Chen > --- > drivers/pci/pcie/aer.c |

Re: [PATCH 2/3] PCI/ERR: Clear fatal status in pcie_do_recovery()

2022-09-22 Thread Bjorn Helgaas
On Fri, Sep 02, 2022 at 02:16:33AM +0800, Zhuo Chen wrote: > When state is pci_channel_io_frozen in pcie_do_recovery(), > the severity is fatal and fatal status should be cleared. > So we add pci_aer_clear_fatal_status(). Seems sensible to me. Did you find this by code inspection or by debugging

Re: [External] Re: [PATCH 1/3] PCI/AER: Use pci_aer_clear_uncorrect_error_status() to clear uncorrectable error status

2022-09-22 Thread Bjorn Helgaas
On Mon, Sep 12, 2022 at 01:09:05AM +0800, Zhuo Chen wrote: > On 9/12/22 12:22 AM, Serge Semin wrote: > > On Fri, Sep 02, 2022 at 02:16:32AM +0800, Zhuo Chen wrote: > > > Status bits for ERR_NONFATAL errors only are cleared in > > > pci_aer_clear_nonfatal_status(), but we want clear uncorrectable >

Re: [PATCH] MAINTAINERS: Remove myself as EEH maintainer

2022-08-25 Thread Bjorn Helgaas
On Sat, Aug 20, 2022 at 10:17:41AM +1000, Michael Ellerman wrote: > Bjorn Helgaas writes: > > On Sat, Aug 06, 2022 at 06:53:01PM +1000, Russell Currey wrote: > >> I haven't touched EEH in a long time I don't have much knowledge of the > >> subsystem at this point

Re: [PATCH] MAINTAINERS: Remove myself as EEH maintainer

2022-08-19 Thread Bjorn Helgaas
6085301.25142-1-rus...@russell.cc Signed-off-by: Russell Currey Signed-off-by: Bjorn Helgaas diff --git a/MAINTAINERS b/MAINTAINERS index f60dfac7661c..51def5ac9462 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15696,8 +15696,8 @@ F: drivers/pci/endpoint/ F: tools/pci/ PCI ENHANCED

Re: [PATCH v6 1/4] PCI: Remove pci_get_legacy_ide_irq and asm-generic/pci.h

2022-07-23 Thread Bjorn Helgaas
On Sat, Jul 23, 2022 at 06:49:41AM +0900, Stafford Horne wrote: > The definition of the pci header function pci_get_legacy_ide_irq is only > used in platforms that support PNP. So many of the architecutres where > it is defined do not use it. This also means we can remove > asm-generic/pci.h as

Re: [PATCH] PCI/AER: Iterate over error counters instead of error strings

2022-07-11 Thread Bjorn Helgaas
On Mon, May 09, 2022 at 06:14:41PM +, Mohamed Khalfella wrote: > PCI AER stats counters sysfs attributes need to iterate over > stats counters instead of stats names. Also, added a build > time check to make sure all counters have entries in strings > array. > > Fixes: 0678e3109a3c ("PCI/AER:

Re: [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code

2022-07-11 Thread Bjorn Helgaas
On Wed, Jul 06, 2022 at 12:43:04PM +0200, Pali Rohár wrote: > Function pci_device_from_OF_node() is used only in powermac code. > So hide it from all other platforms as it is unsed. s/unsed/unused/ (same typo in 3/5 patch) These are for the powerpc folks, so I'm just kibbitzing here. >

Re: [PATCH v4 2/2] PCI/DPC: Disable DPC service when link is in L2/L3 ready, L2 and L3 state

2022-06-23 Thread Bjorn Helgaas
On Tue, Jun 21, 2022 at 10:27:31AM +0800, Kai-Heng Feng wrote: > On Mon, Apr 18, 2022 at 10:41 AM Sathyanarayanan Kuppuswamy > wrote: > > On 4/8/22 8:31 AM, Kai-Heng Feng wrote: > > > On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause > > > some errors reported by AER: > > > [

Re: [PATCH v3 2/5] of: remove __of_node_dup() allocflags parameter

2022-06-21 Thread Bjorn Helgaas
On Mon, Jun 20, 2022 at 12:41:20PM +0200, Clément Léger wrote: > The alloclags are always set to GFP_KERNEL so remove this specific flag. > Moreover, this function is going to be based on one that does not > provides passing gfp flags, so be prepared for this. s/alloclags/allocflags/ s/provides

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-06-09 Thread Bjorn Helgaas
On Thu, Jun 09, 2022 at 08:05:26PM +0200, Pali Rohár wrote: > On Thursday 09 June 2022 12:10:22 Bjorn Helgaas wrote: > > On Thu, Jun 09, 2022 at 06:27:25PM +0200, Pali Rohár wrote: > > > On Thursday 09 June 2022 11:22:55 Bjorn Helgaas wrote: > > > > [+cc G

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-06-09 Thread Bjorn Helgaas
On Thu, Jun 09, 2022 at 06:27:25PM +0200, Pali Rohár wrote: > On Thursday 09 June 2022 11:22:55 Bjorn Helgaas wrote: > > [+cc Guilherme, Michael, Ben (author of 63a72284b159 and PPC folks), thread: > > https://lore.kernel.org/r/20220504175718.29011-1-p...@kernel.org] > > >

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-06-09 Thread Bjorn Helgaas
[+cc Guilherme, Michael, Ben (author of 63a72284b159 and PPC folks), thread: https://lore.kernel.org/r/20220504175718.29011-1-p...@kernel.org] On Fri, May 06, 2022 at 12:33:02AM +0200, Pali Rohár wrote: > On Thursday 05 May 2022 15:10:01 Tyrel Datwyler wrote: > > On 5/5/22 02:31, Pali Rohár

Re: [PATCH] PCI/ERR: handle disconnected devices in report_error_detected

2022-06-08 Thread Bjorn Helgaas
On Wed, Jun 01, 2022 at 09:40:24AM +0200, Christoph Hellwig wrote: > When a device is already unplugged by pciehp by the time that the AER > handler is invoked, the PCIe device will lready be in the > pci_channel_io_perm_failure state. In that case we should simply > return

Re: [PATCH] PCI/AER: Iterate over error counters instead of error

2022-06-03 Thread Bjorn Helgaas
On Fri, Jun 03, 2022 at 10:12:47PM +, Mohamed Khalfella wrote: > Is there any chance for this to land in 5.19? Too late for v5.19, since the merge window will end in a couple days. Remind me again if you don't see it in -next by v5.20-rc5 or so. > On 5/10/22 14:17, Mohamed Khalfella wrote: >

Re: [PATCH v3] PCI/AER: Handle Multi UnCorrectable/Correctable errors properly

2022-05-17 Thread Bjorn Helgaas
On Wed, May 11, 2022 at 05:29:45PM -0700, Sathyanarayanan Kuppuswamy wrote: > > > On 5/11/22 4:40 PM, Bjorn Helgaas wrote: > > On Mon, Apr 18, 2022 at 03:02:37PM +, Kuppuswamy Sathyanarayanan wrote: > > > Currently the aer_irq() handler returns IRQ_NON

Re: [PATCH v3] PCI/AER: Handle Multi UnCorrectable/Correctable errors properly

2022-05-11 Thread Bjorn Helgaas
On Mon, Apr 18, 2022 at 03:02:37PM +, Kuppuswamy Sathyanarayanan wrote: > Currently the aer_irq() handler returns IRQ_NONE for cases without bits > PCI_ERR_ROOT_UNCOR_RCV or PCI_ERR_ROOT_COR_RCV are set. But this > assumption is incorrect. > > Consider a scenario where aer_irq() is triggered

Re: [PATCH v3] PCI/AER: Handle Multi UnCorrectable/Correctable errors properly

2022-05-11 Thread Bjorn Helgaas
On Mon, Apr 18, 2022 at 03:02:37PM +, Kuppuswamy Sathyanarayanan wrote: > Currently the aer_irq() handler returns IRQ_NONE for cases without bits > PCI_ERR_ROOT_UNCOR_RCV or PCI_ERR_ROOT_COR_RCV are set. But this > assumption is incorrect. > > Consider a scenario where aer_irq() is triggered

Re: [PATCH] PCI/AER: Iterate over error counters instead of error strings

2022-05-10 Thread Bjorn Helgaas
[+cc Rajat] On Mon, May 09, 2022 at 06:14:41PM +, Mohamed Khalfella wrote: > PCI AER stats counters sysfs attributes need to iterate over > stats counters instead of stats names. Thanks for catching this; it definitely looks like a real issue! I guess you're probably seeing junk in the

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-05 Thread Bjorn Helgaas
On Thu, May 05, 2022 at 07:39:42PM +0200, Arnd Bergmann wrote: > On Thu, May 5, 2022 at 6:10 PM Bjorn Helgaas wrote: > > On Wed, May 04, 2022 at 11:31:28PM +0200, Arnd Bergmann wrote: > > > > > > The main goal is to avoid c), which is what happens on s390, but >

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-05 Thread Bjorn Helgaas
On Wed, May 04, 2022 at 11:31:28PM +0200, Arnd Bergmann wrote: > On Wed, May 4, 2022 at 11:08 PM Bjorn Helgaas wrote: > > On Fri, Apr 29, 2022 at 03:49:59PM +0200, Niklas Schnelle wrote: > > > We introduce a new HAS_IOPORT Kconfig option to indicate support for > > > I

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-04 Thread Bjorn Helgaas
On Fri, Apr 29, 2022 at 03:49:59PM +0200, Niklas Schnelle wrote: > We introduce a new HAS_IOPORT Kconfig option to indicate support for > I/O Port access. In a future patch HAS_IOPORT=n will disable compilation > of the I/O accessor functions inb()/outb() and friends on architectures > which can

Re: [PATCH v6] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-04-29 Thread Bjorn Helgaas
On Thu, Apr 28, 2022 at 05:31:38PM -0500, Nathan Lynch wrote: > Bjorn Helgaas writes: > > On Tue, Apr 26, 2022 at 11:07:39PM +0530, Mahesh Salgaonkar wrote: > >> +/* > >> + * RTAS call get-sensor-state(DR_ENTITY_SENSE) return values as per PAPR: > >> + *

Re: [PATCH v6] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-04-28 Thread Bjorn Helgaas
On Tue, Apr 26, 2022 at 11:07:39PM +0530, Mahesh Salgaonkar wrote: > When certain PHB HW failure causes phyp to recover PHB, it marks the PE > state as temporarily unavailable until recovery is complete. This also > triggers an EEH handler in Linux which needs to notify drivers, and perform >

Re: [PATCH v4 2/2] PCI/PM: Fix pci_pm_suspend_noirq() to disable PTM

2022-04-26 Thread Bjorn Helgaas
On Mon, Apr 25, 2022 at 11:32:54AM -0700, David E. Box wrote: > On Sat, 2022-04-23 at 10:01 -0500, Bjorn Helgaas wrote: > > On Sat, Apr 23, 2022 at 12:43:14AM +, Jingar, Rajvi wrote: > > > > -Original Message- > > > > From: Bjorn Helgaas > >

Re: [PATCH 0/7] Remove unused SLOW_DOWN_IO

2022-04-25 Thread Bjorn Helgaas
On Fri, Apr 22, 2022 at 10:48:28AM -0700, Jakub Kicinski wrote: > On Fri, 15 Apr 2022 14:08:10 -0500 Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > Only alpha, ia64, powerpc, and sh define SLOW_DOWN_IO, and there are no > > actual uses of it. The few referen

Re: [PATCH v4 2/2] PCI/PM: Fix pci_pm_suspend_noirq() to disable PTM

2022-04-23 Thread Bjorn Helgaas
On Sat, Apr 23, 2022 at 12:43:14AM +, Jingar, Rajvi wrote: > > -Original Message- > > From: Bjorn Helgaas > > On Thu, Apr 14, 2022 at 07:54:02PM +0200, Rafael J. Wysocki wrote: > > > On 3/25/2022 8:50 PM, Rajvi Jingar wrote: > > > > For the

Re: [PATCH v4 1/2] PCI/AER: Disable AER service when link is in L2/L3 ready, L2 and L3 state

2022-04-22 Thread Bjorn Helgaas
[+cc Rafael, linux-pm; sorry forgot this last time] On Fri, Apr 22, 2022 at 05:24:36PM -0500, Bjorn Helgaas wrote: > On Fri, Apr 08, 2022 at 11:31:58PM +0800, Kai-Heng Feng wrote: > > On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause > > some errors

Re: [PATCH v4 2/2] PCI/PM: Fix pci_pm_suspend_noirq() to disable PTM

2022-04-22 Thread Bjorn Helgaas
[+cc other folks interested in PTM from https://lore.kernel.org/r/20220408153159.106741-1-kai.heng.f...@canonical.com] On Thu, Apr 14, 2022 at 07:54:02PM +0200, Rafael J. Wysocki wrote: > On 3/25/2022 8:50 PM, Rajvi Jingar wrote: > > For the PCIe devices (like nvme) that do not go into D3 state

Re: [PATCH v4 1/2] PCI/AER: Disable AER service when link is in L2/L3 ready, L2 and L3 state

2022-04-22 Thread Bjorn Helgaas
[+cc Rajvi, David] On Fri, Apr 08, 2022 at 11:31:58PM +0800, Kai-Heng Feng wrote: > On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause > some errors reported by AER: > [ 30.100211] pcieport :00:1d.0: AER: Uncorrected (Non-Fatal) error > received: :00:1d.0 > [

[PATCH 7/7] alpha: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Signed-off-by: Bjorn Helgaas --- arch/alpha/include/asm/io.h | 4 1 file changed, 4 deletions(-) diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index c9cb554fbe54..338dd24400bd 100644

[PATCH 6/7] ia64: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Signed-off-by: Bjorn Helgaas --- arch/ia64/include/asm/io.h | 4 1 file changed, 4 deletions(-) diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index 6d93b923b379..1069e1730b2e 100644

[PATCH 5/7] powerpc: Remove unused SLOW_DOWN_IO definition

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused SLOW_DOWN_IO definition. Signed-off-by: Bjorn Helgaas --- arch/powerpc/include/asm/io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index fee979d3a1aa..c5a5f7c9b231 100644 --- a/arch

[PATCH 3/7] net: remove comments that mention obsolete __SLOW_DOWN_IO

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Signed-off-by: Bjorn Helgaas --- drivers/atm/nicstarmac.c | 5 - drivers/net/ethernet/dec/tulip/winbond-840.c | 2 -- drivers/net/ethernet/natsemi/natsemi.c | 2 -- 3 files changed, 9 deletions(-) diff --git a/drivers/atm/nicstarmac.c b

[PATCH 4/7] sh: remove unused SLOW_DOWN_IO

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas io.h defines SLOW_DOWN_IO only when CONF_SLOWDOWN_IO is defined, but CONF_SLOWDOWN_IO is never defined and is in fact explicitly undefined. Remove SLOW_DOWN_IO and related code. N.B. 37b7a97884ba ("sh: machvec IO death.") went to some trouble to add CONF_S

[PATCH 1/7] net: wan: atp: remove unused eeprom_delay()

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas atp.h is included only by atp.c, which does not use eeprom_delay(). Remove the unused definition. Signed-off-by: Bjorn Helgaas --- drivers/net/ethernet/realtek/atp.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/realtek/atp.h b/drivers/net

[PATCH 2/7] net: wan: lmc: remove unused DELAY()

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas lmc_var.h is included only by files in drivers/net/wan/lmc/, and none of them uses DELAY(). Remove the unused definition and related comments. Signed-off-by: Bjorn Helgaas --- drivers/net/wan/lmc/lmc_main.c | 8 drivers/net/wan/lmc/lmc_var.h | 8 2

[PATCH 0/7] Remove unused SLOW_DOWN_IO

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Only alpha, ia64, powerpc, and sh define SLOW_DOWN_IO, and there are no actual uses of it. The few references to it are in situations that are themselves unused. Remove them all. It should be safe to apply these independently and in any order. The only place SLOW_DOWN_IO

Re: [PATCH] pci: hotplug: Prepare cleanup of powerpc's asm/prom.h

2022-04-05 Thread Bjorn Helgaas
On Sat, Apr 02, 2022 at 12:11:56PM +0200, Christophe Leroy wrote: > powerpc's asm/prom.h brings some headers that it doesn't > need itself. > > In order to clean it up, first add missing headers in > users of asm/prom.h > > Signed-off-by: Christophe Leroy I tidied the subject line to match

Re: [PATCH 2/2] powerpc/eeh: Use pcie_reset_state_t type in function arguments

2022-03-24 Thread Bjorn Helgaas
On Thu, Mar 10, 2022 at 09:51:13AM +0100, Christophe Leroy wrote: > Le 13/07/2021 à 02:25, Krzysztof Wilczyński a écrit : > > The pcie_reset_state_t type has been introduced in the commit > > f7bdd12d234d ("pci: New PCI-E reset API") along with the enum > > pcie_reset_state, but it has never been

Re: [PATCH v1] PCI/AER: Handle Multi UnCorrectable/Correctable errors properly

2022-03-17 Thread Bjorn Helgaas
On Mon, Mar 14, 2022 at 09:21:46AM -0700, Eric Badger wrote: > On Sun, Mar 13, 2022 at 02:43:14PM -0700, Raj, Ashok wrote: > > On Sun, Mar 13, 2022 at 02:52:20PM -0500, Bjorn Helgaas wrote: > > > On Fri, Mar 11, 2022 at 02:58:07AM +, Kuppuswamy Sathyanarayanan > > &g

Re: [PATCH v1] PCI/AER: Handle Multi UnCorrectable/Correctable errors properly

2022-03-13 Thread Bjorn Helgaas
On Fri, Mar 11, 2022 at 02:58:07AM +, Kuppuswamy Sathyanarayanan wrote: > Currently the aer_irq() handler returns IRQ_NONE for cases without bits > PCI_ERR_ROOT_UNCOR_RCV or PCI_ERR_ROOT_COR_RCV are set. But this > assumption is incorrect. > > Consider a scenario where aer_irq() is triggered

Re: [PATCH v8 01/14] sizes.h: Add SZ_1T macro

2022-03-10 Thread Bjorn Helgaas
On Thu, Mar 10, 2022 at 06:09:51PM +, Christophe Leroy wrote: > > > Le 10/03/2022 à 17:52, Bjorn Helgaas a écrit : > > On Wed, Mar 09, 2022 at 06:44:35PM +0100, Christophe Leroy wrote: > >> Today drivers/pci/controller/pci-xgene.c defines SZ_1T > >> &

Re: [PATCH v8 01/14] sizes.h: Add SZ_1T macro

2022-03-10 Thread Bjorn Helgaas
33942bf.1642752946.git.christophe.le...@csgroup.eu > Signed-off-by: Christophe Leroy > Signed-off-by: Lorenzo Pieralisi > Reviewed-by: Krzysztof Wilczyński > Acked-by: Bjorn Helgaas > Cc: Toan Le > Cc: linux-...@vger.kernel.org > --- > This patch is already in linux-next but not

Re: [PATCH 1/2] sizes.h: Add SZ_1T macro

2021-12-15 Thread Bjorn Helgaas
I guess this needs to go with the [2/2] patch, since it also uses SZ_1T. Acked-by: Bjorn Helgaas > --- > drivers/pci/controller/pci-xgene.c | 1 - > include/linux/sizes.h | 2 ++ > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/

Re: [PATCH] PCI/AER: potential dereference of null pointer

2021-12-13 Thread Bjorn Helgaas
On Mon, Dec 13, 2021 at 11:57:52AM -0800, Rajat Jain wrote: > Hello > > On Sat, Dec 11, 2021 at 9:54 AM Bjorn Helgaas wrote: > > > > [+cc Rajat, author of aer_stats: > > db89ccbe52c7 ("PCI/AER: Define aer_stats structure for AER capable devices" > > 8

Re: [PATCH] PCI/AER: potential dereference of null pointer

2021-12-11 Thread Bjorn Helgaas
[+cc Rajat, author of aer_stats: db89ccbe52c7 ("PCI/AER: Define aer_stats structure for AER capable devices" 81aa5206f9a7 ("PCI/AER: Add sysfs attributes to provide AER stats and breakdown"] On Thu, Dec 09, 2021 at 05:45:56PM +0800, Jiasheng Jiang wrote: > he return value of kzalloc() needs to

Re: [patch V2 23/23] PCI/MSI: Move descriptor counting on allocation fail to the legacy code

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:28:00PM +0100, Thomas Gleixner wrote: > The irqdomain code already returns the information. Move the loop to the > legacy code. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas

Re: [patch V2 22/23] genirq/msi: Handle PCI/MSI allocation fail in core code

2021-12-07 Thread Bjorn Helgaas
oss > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas# PCI > --- > drivers/pci/msi/irqdomain.c | 13 - > include/linux/msi.h |5 + > kernel/irq/msi.c| 29 + > 3 files changed, 26 insertions(+), 21 de

Re: [patch V2 21/23] PCI/MSI: Make pci_msi_domain_check_cap() static

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:57PM +0100, Thomas Gleixner wrote: > No users outside of that file. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c |5 +++-- &

Re: [patch V2 20/23] PCI/MSI: Move msi_lock to struct pci_dev

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:56PM +0100, Thomas Gleixner wrote: > It's only required for PCI/MSI. So no point in having it in every struct > device. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: New patch > --- > drivers/base/core.c|

Re: [patch V2 19/23] PCI/MSI: Sanitize MSIX table map handling

2021-12-07 Thread Bjorn Helgaas
esciptors/descriptors/ > Store the mapping in struct pci_dev and free it after freeing the MSI-X > descriptors. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c | 18

Re: [patch V2 18/23] PCI/MSI: Split out irqdomain code

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:52PM +0100, Thomas Gleixner wrote: > Move the irqdomain specific code into it's own file. s/it's/its/ > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/

Re: [patch V2 17/23] PCI/MSI: Split out !IRQDOMAIN code

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:51PM +0100, Thomas Gleixner wrote: > Split out the non irqdomain code into its own file. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > V2: Add proper includes

Re: [patch V2 16/23] PCI/MSI: Split out CONFIG_PCI_MSI independent part

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:49PM +0100, Thomas Gleixner wrote: > These functions are required even when CONFIG_PCI_MSI is not set. Move them > to their own file. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked

Re: [patch V2 15/23] PCI/MSI: Move code into a separate directory

2021-12-07 Thread Bjorn Helgaas
nthorpe Acked-by: Bjorn Helgaas > --- > Documentation/driver-api/pci/pci.rst |2 > drivers/pci/Makefile |3 > drivers/pci/msi.c| 1532 > --- > drivers/pci/msi/Makefile

Re: [patch V2 14/23] PCI/MSI: Make msix_update_entries() smarter

2021-12-07 Thread Bjorn Helgaas
Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -642,8 +642,8 @@ static void msix_update_entries(struct p > { > struct msi_de

Re: [patch V2 13/23] PCI/MSI: Cleanup include zoo

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:44PM +0100, Thomas Gleixner wrote: > Get rid of the pile of unneeded includes which accumulated over time. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Nice, thanks! >

Re: [patch V2 12/23] PCI/MSI: Make arch_restore_msi_irqs() less horrible.

2021-12-07 Thread Bjorn Helgaas
-by: Juergen Gross > Reviewed-by: Jason Gunthorpe > Cc: x...@kernel.org > Cc: xen-de...@lists.xenproject.org > Cc: Christian Borntraeger > Cc: Heiko Carstens Acked-by: Bjorn Helgaas# PCI > --- > arch/s390/pci/pci_irq.c |4 +- > arch/x86/include/a

Re: [patch V2 08/23] PCI/sysfs: Use pci_irq_vector()

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:36PM +0100, Thomas Gleixner wrote: > instead of fiddling with msi descriptors. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas s/msi/MSI/ above if you have a chance. Nice

<    1   2   3   4   5   6   7   8   9   >