Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-25 Thread Bjorn Helgaas
On Thu, Sep 24, 2020 at 04:41:39PM +1000, Oliver O'Halloran wrote: > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > wrote: > > > > This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules > > (descriptions taken from Kconfig file) > > > > Signed-off-by: Mamatha Inamdar > > ---

Re: [PATCH v6 04/11] PCI: designware-ep: Modify MSI and MSIX CAP way of finding

2020-09-23 Thread Bjorn Helgaas
s/MSIX/MSI-X/ (subject and below) On Sat, Mar 14, 2020 at 11:30:31AM +0800, Xiaowei Bao wrote: > Each PF of EP device should have it's own MSI or MSIX capabitily > struct, so create a dw_pcie_ep_func struct and remove the msi_cap > and msix_cap to this struct from dw_pcie_ep, and manage the PFs >

Re: [PATCH -next] PCI: rpadlpar: use for_each_child_of_node() and for_each_node_by_name

2020-09-17 Thread Bjorn Helgaas
On Wed, Sep 16, 2020 at 02:21:28PM +0800, Qinglang Miao wrote: > Use for_each_child_of_node() and for_each_node_by_name macro > instead of open coding it. > > Signed-off-by: Qinglang Miao Applied to pci/hotplug for v5.10, thanks! > --- > drivers/pci/hotplug/rpadlpar_core.c | 8 > 1

Re: [PATCH -next] PCI: rpadlpar: Make some functions static

2020-07-30 Thread Bjorn Helgaas
On Tue, Jul 21, 2020 at 11:17:35PM +0800, Wei Yongjun wrote: > The sparse tool report build warnings as follows: > > drivers/pci/hotplug/rpadlpar_core.c:355:5: warning: > symbol 'dlpar_remove_pci_slot' was not declared. Should it be static? > drivers/pci/hotplug/rpadlpar_core.c:461:12: warning:

Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-15 Thread Bjorn Helgaas
On Wed, Jul 15, 2020 at 02:38:29PM +, David Laight wrote: > From: Oliver O'Halloran > > Sent: 15 July 2020 05:19 > > > > On Wed, Jul 15, 2020 at 8:03 AM Arnd Bergmann wrote: > ... > > > - config space accesses are very rare compared to memory > > > space access and on the hardware side the

Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-15 Thread Bjorn Helgaas
On Wed, Jul 15, 2020 at 02:24:21PM +, David Laight wrote: > From: Arnd Bergmann > > Sent: 15 July 2020 07:47 > > On Wed, Jul 15, 2020 at 1:46 AM Bjorn Helgaas wrote: > > > > So something like: > > > > > > void pci_read_config_

Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-14 Thread Bjorn Helgaas
[+cc Kjetil] On Wed, Jul 15, 2020 at 12:01:56AM +0200, Arnd Bergmann wrote: > On Tue, Jul 14, 2020 at 8:45 PM Bjorn Helgaas wrote: > > On Mon, Jul 13, 2020 at 05:08:10PM +0200, Arnd Bergmann wrote: > > > On Mon, Jul 13, 2020 at 3:22 PM Saheed O. Bolarinwa > > >

Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-14 Thread Bjorn Helgaas
[trimmed the cc list; it's still too large but maybe arch folks care] On Mon, Jul 13, 2020 at 05:08:10PM +0200, Arnd Bergmann wrote: > On Mon, Jul 13, 2020 at 3:22 PM Saheed O. Bolarinwa > wrote: > > This goal of these series is to move the definition of *all* > > PCIBIOS* from

Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-13 Thread Bjorn Helgaas
On Mon, Jul 13, 2020 at 02:22:12PM +0200, Saheed O. Bolarinwa wrote: > This goal of these series is to move the definition of *all* PCIBIOS* from > include/linux/pci.h to arch/x86 and limit their use within there. > All other tree specific definition will be left for intact. Maybe they can > be

Re: [PATCH 2/2] PCI/AER: Log correctable errors as warning, not error

2020-07-09 Thread Bjorn Helgaas
On Tue, Jul 07, 2020 at 07:14:01PM -0500, Bjorn Helgaas wrote: > From: Matt Jolly > > PCIe correctable errors are recovered by hardware with no need for software > intervention (PCIe r5.0, sec 6.2.2.1). > > Reduce the log level of correctable errors from KERN_ERR to KERN_WAR

[PATCH 2/2] PCI/AER: Log correctable errors as warning, not error

2020-07-07 Thread Bjorn Helgaas
-Kangie@footclan.ninja Signed-off-by: Matt Jolly Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/aer.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 9176c8a968b9..ca886bf91fd9 100644 --- a/drivers

[PATCH 1/2] PCI/AER: Simplify __aer_print_error()

2020-07-07 Thread Bjorn Helgaas
From: Bjorn Helgaas aer_correctable_error_string[] and aer_uncorrectable_error_string[] have descriptions of AER error status bits. Add NULL entries to these tables so all entries for bits 0-31 are defined. Then we don't have to check for ARRAY_SIZE() when decoding a status word, which

Re: [PATCH] pci: pcie: AER: Fix logging of Correctable errors

2020-07-07 Thread Bjorn Helgaas
On Fri, Jun 19, 2020 at 01:55:11AM +1000, Matt Jolly wrote: > The AER documentation indicates that correctable (severity=Corrected) > errors should be output as a warning so that users can filter these > errors if they choose to; This functionality does not appear to have been > implemented. > >

Re: [PATCH 0/8 v2] PCI: Align return values of PCIe capability and PCI accessors

2020-06-26 Thread Bjorn Helgaas
rd pcie_capability_clear_and_set_word pcie_capability_clear_and_set_dword that check the return code for anything other than zero. [bhelgaas: commit log, squash together] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20200615073225.24061-1-refactormy

Re: [PATCH v3 0/2] PCI/ERR: Allow Native AER/DPC using _OSC

2020-05-22 Thread Bjorn Helgaas
On Fri, May 22, 2020 at 05:23:31PM +, Derrick, Jonathan wrote: > On Fri, 2020-05-01 at 11:35 -0600, Jonathan Derrick wrote: > > On Fri, 2020-05-01 at 12:16 -0500, Bjorn Helgaas wrote: > > > On Thu, Apr 30, 2020 at 12:46:07PM -0600, Jon Derrick wrote: > > &

Re: [PATCH v3 0/2] PCI/ERR: Allow Native AER/DPC using _OSC

2020-05-01 Thread Bjorn Helgaas
On Thu, Apr 30, 2020 at 12:46:07PM -0600, Jon Derrick wrote: > Hi Bjorn & Kuppuswamy, > > I see a problem in the DPC ECN [1] to _OSC in that it doesn't give us a way to > determine if firmware supports _OSC DPC negotation, and therefore how to > handle > DPC. > > Here is the wording of the ECN

Re: [PATCH v4] pci: Make return value of pcie_capability_read*() consistent

2020-04-28 Thread Bjorn Helgaas
On Tue, Apr 28, 2020 at 10:19:08AM +0800, Yicong Yang wrote: > On 2020/4/28 2:13, Bjorn Helgaas wrote: > > > > I'm starting to think we're approaching this backwards. I searched > > for PCIBIOS_FUNC_NOT_SUPPORTED, PCIBIOS_BAD_VENDOR_ID, and the other > > erro

Re: [PATCH v2 1/2] PCI/AER: Allow Native AER Host Bridges to use AER

2020-04-27 Thread Bjorn Helgaas
On Mon, Apr 27, 2020 at 04:11:07PM +, Derrick, Jonathan wrote: > On Fri, 2020-04-24 at 18:30 -0500, Bjorn Helgaas wrote: > > I'm glad you raised this because I think the way we handle > > FIRMWARE_FIRST is really screwed up. > > > > On Mon, Apr 20, 2020 at 03:37:09

Re: [PATCH v4] pci: Make return value of pcie_capability_read*() consistent

2020-04-27 Thread Bjorn Helgaas
MIPS and powerpc folks to CC: just as FYI because you're the biggest users of PCIBIOS_*. The intent is that this would be zero functional change. ] On Sun, Apr 26, 2020 at 11:51:30AM +0200, Saheed Bolarinwa wrote: > On 4/25/20 12:30 AM, Bjorn Helgaas wrote: > > On Fri, Apr 24, 2020 at 0

Re: [PATCH v2 1/2] PCI/AER: Allow Native AER Host Bridges to use AER

2020-04-24 Thread Bjorn Helgaas
Hi Jon, I'm glad you raised this because I think the way we handle FIRMWARE_FIRST is really screwed up. On Mon, Apr 20, 2020 at 03:37:09PM -0600, Jon Derrick wrote: > Some platforms have a mix of ports whose capabilities can be negotiated > by _OSC, and some ports which are not described by ACPI

Re: [PATCH] PCI: Use of_node_name_eq for node name comparisons

2020-04-24 Thread Bjorn Helgaas
On Thu, Apr 16, 2020 at 04:51:14PM -0500, Rob Herring wrote: > Convert string compares of DT node names to use of_node_name_eq helper > instead. This removes direct access to the node name pointer. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman &

Re: [patch V2 02/15] pci/switchtec: Replace completion wait queue usage for poll

2020-03-18 Thread Bjorn Helgaas
d-off-by: Sebastian Andrzej Siewior > Acked-by: Peter Zijlstra (Intel) > Cc: Kurt Schwemmer > Cc: Logan Gunthorpe > Cc: Bjorn Helgaas > Cc: linux-...@vger.kernel.org Acked-by: Bjorn Helgaas But please tweak the subject so it matches the other: - pci/switchtec: Replace completion

Re: [patch V2 01/15] PCI/switchtec: Fix init_completion race condition with poll_wait()

2020-03-18 Thread Bjorn Helgaas
ff-by: Thomas Gleixner > Link: https://lkml.kernel.org/r/20200313183608.2646-1-log...@deltatee.com Acked-by: Bjorn Helgaas Not because I understand and have reviewed this, but because I trust you to do the right thing and it belongs with the rest of the series. > --- > drivers/pci/sw

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Bjorn Helgaas
On Thu, Mar 12, 2020 at 09:38:02AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: > > drivers/pci/hotplug/rp

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Bjorn Helgaas
ut-set-variable] > > Reported-by: Hulk Robot > Signed-off-by: Chen Zhou Michael, if you want this: Acked-by: Bjorn Helgaas If you don't mind, edit the subject to follow the convention, e.g., PCI: rpaphp: Remove unused variable 'value' Apparently simple_strtoul() is deprecated a

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-14 Thread Bjorn Helgaas
On Fri, Nov 15, 2019 at 12:34:50AM +1100, Oliver O'Halloran wrote: > On Thu, Nov 14, 2019 at 1:31 AM Bjorn Helgaas wrote: > > > > This is fine, but it feels like sort of a blunt instrument. Is there > > any practical way to clear pci_host_bridge.native_pcie_hotplu

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-13 Thread Bjorn Helgaas
On Wed, Nov 13, 2019 at 08:40:35PM +1100, Oliver O'Halloran wrote: > On PowerNV the PCIe topology is (currently) managed the powernv platform > code in cooperation with firmware. The PCIe-native service drivers bypass > both and this can cause problems. > > Historically this hasn't been a big

Re: [PATCH v2 0/9] Fixes and Enablement of ibm,drc-info property

2019-11-11 Thread Bjorn Helgaas
| 2 +- > arch/powerpc/platforms/pseries/hotplug-cpu.c| 127 > +--- > arch/powerpc/platforms/pseries/of_helpers.c | 8 +- > arch/powerpc/platforms/pseries/pseries_energy.c | 23 ++--- > drivers/pci/hotplug/rpaphp_core.c | 127 > +

Re: [PATCH v2 0/2] Enabling MSI for Microblaze

2019-10-25 Thread Bjorn Helgaas
On Fri, Oct 25, 2019 at 08:10:36AM +0200, Michal Simek wrote: > Hi, > > these two patches come from discussion with Christoph, Bjorn, Palmer and > Waiman. The first patch was suggestion by Christoph here > https://lore.kernel.org/linux-riscv/20191008154604.ga7...@infradead.org/ > The second part

Re: Oxford Semiconductor Ltd OX16PCI954 - weird dmesg

2019-10-25 Thread Bjorn Helgaas
On Fri, Oct 25, 2019 at 04:33:13PM +0200, Carlo Pisani wrote: > pci_bus :00: root bus resource [mem 0x5000-0x5fff] > pci_bus :00: root bus resource [io 0x1880-0x188f] > pci_bus :00: root bus resource [??? 0x flags 0x0] > pci_bus :00: No busn resource found

Re: [PATCH v5 03/23] PCI: hotplug: Add a flag for the movable BARs feature

2019-10-16 Thread Bjorn Helgaas
On Wed, Oct 16, 2019 at 06:50:30PM +0300, Sergey Miroshnichenko wrote: > On 10/16/19 1:14 AM, Bjorn Helgaas wrote: > > On Mon, Sep 30, 2019 at 03:59:25PM +0300, Sergey Miroshnichenko wrote: > > > On 9/28/19 1:02 AM, Bjorn Helgaas wrote: > > > > It's possib

Re: [PATCH v5 03/23] PCI: hotplug: Add a flag for the movable BARs feature

2019-10-15 Thread Bjorn Helgaas
On Mon, Sep 30, 2019 at 03:59:25PM +0300, Sergey Miroshnichenko wrote: > Hello Bjorn, > > On 9/28/19 1:02 AM, Bjorn Helgaas wrote: > > On Fri, Aug 16, 2019 at 07:50:41PM +0300, Sergey Miroshnichenko wrote: > > > When hot-adding a device, the bridge may hav

Re: [RFC PATCH 0/9] Fixes and Enablement of ibm,drc-info property

2019-10-01 Thread Bjorn Helgaas
On Tue, Oct 01, 2019 at 01:12:05AM -0500, Tyrel Datwyler wrote: > There was an initial previous effort yo add support for the PAPR > architected ibm,drc-info property. This property provides a more > memory compact representation of a paritions Dynamic Reconfig > Connectors (DRC). These can

Re: [PATCH 1/3] powernv/iov: Ensure the pdn for VFs always contains a valid PE number

2019-09-30 Thread Bjorn Helgaas
On Mon, Sep 30, 2019 at 12:08:46PM +1000, Oliver O'Halloran wrote: This is all powerpc, so I assume Michael will handle this. Just random things I noticed; ignore if they don't make sense: > On PowerNV we use the pcibios_sriov_enable() hook to do two things: > > 1. Create a pci_dn structure

Re: [PATCH v5 03/23] PCI: hotplug: Add a flag for the movable BARs feature

2019-09-27 Thread Bjorn Helgaas
On Fri, Aug 16, 2019 at 07:50:41PM +0300, Sergey Miroshnichenko wrote: > When hot-adding a device, the bridge may have windows not big enough (or > fragmented too much) for newly requested BARs to fit in. And expanding > these bridge windows may be impossible because blocked by "neighboring" >

Re: [PATCH v5 02/23] PCI: Enable bridge's I/O and MEM access for hotplugged devices

2019-09-27 Thread Bjorn Helgaas
On Fri, Aug 16, 2019 at 07:50:40PM +0300, Sergey Miroshnichenko wrote: > The PCI_COMMAND_IO and PCI_COMMAND_MEMORY bits of the bridge must be > updated not only when enabling the bridge for the first time, but also if a > hotplugged device requests these types of resources. Yeah, this assumption

Re: [PATCH v5 01/23] PCI: Fix race condition in pci_enable/disable_device()

2019-09-27 Thread Bjorn Helgaas
On Fri, Aug 16, 2019 at 07:50:39PM +0300, Sergey Miroshnichenko wrote: > This is a yet another approach to fix an old [1-2] concurrency issue, when: > - two or more devices are being hot-added into a bridge which was >initially empty; > - a bridge with two or more devices is being hot-added;

Re: [PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-09-27 Thread Bjorn Helgaas
On Tue, Aug 27, 2019 at 06:18:22PM +0300, Andy Shevchenko wrote: > This simplifies and standardizes slot manipulation code > by using for_each_set_bit() library function. > > Signed-off-by: Andy Shevchenko > --- > drivers/pci/pcie/aer.c | 19 --- > 1 file changed, 8

Re: [PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-09-27 Thread Bjorn Helgaas
On Tue, Aug 27, 2019 at 06:18:22PM +0300, Andy Shevchenko wrote: > This simplifies and standardizes slot manipulation code > by using for_each_set_bit() library function. > > Signed-off-by: Andy Shevchenko Applied both with Kuppuswamy's reviewed-by to pci/aer for v5.5, thanks! > --- >

Re: [PATCH] PCI: hotplug: Remove surplus return from a void function

2019-08-27 Thread Bjorn Helgaas
On Mon, Aug 26, 2019 at 11:51:43AM +0200, Krzysztof Wilczynski wrote: > Remove unnecessary empty return statement at the end of a void > function in the following: > > - drivers/pci/hotplug/cpci_hotplug_core.c: cleanup_slots() > - drivers/pci/hotplug/cpqphp_core.c: pci_print_IRQ_route() > -

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-08-01 Thread Bjorn Helgaas
On Mon, Jul 22, 2019 at 02:05:12PM +1000, Michael Ellerman wrote: > Nathan Chancellor writes: > > On Mon, Jun 03, 2019 at 03:11:58PM -0700, Nathan Chancellor wrote: > >> When building with -Wsometimes-uninitialized, clang warns: > >> > >> drivers/pci/hotplug/rpaphp_core.c:243:14: warning:

Re: [PATCH v2 0/5] PCI: Convert pci_resource_to_user() to a weak function

2019-07-30 Thread Bjorn Helgaas
On Mon, Jul 29, 2019 at 01:13:56PM +0300, Denis Efremov wrote: > Architectures currently define HAVE_ARCH_PCI_RESOURCE_TO_USER if they want > to provide their own pci_resource_to_user() implementation. This could be > simplified if we make the generic version a weak function. Thus, > architecture

Re: [PATCHv2 2/2] PCI: layerscape: EP and RC drivers are compiled separately

2019-06-26 Thread Bjorn Helgaas
If you post another revision for any reason, please change the subject so it's worded as a command and mentions the new config options, e.g., PCI: layerscape: Add CONFIG_PCI_LAYERSCAPE_EP to build EP/RC separately On Wed, Jun 26, 2019 at 07:11:39PM +0800, Xiaowei Bao wrote: > Compile the EP

Re: [PATCH v4 19/28] docs: powerpc: convert docs to ReST and rename to *.rst

2019-06-14 Thread Bjorn Helgaas
On Fri, Jun 14, 2019 at 02:36:35PM -0600, Jonathan Corbet wrote: > On Wed, 12 Jun 2019 14:52:55 -0300 > Mauro Carvalho Chehab wrote: > > > Convert docs to ReST and add them to the arch-specific > > book. > > > > The conversion here was trivial, as almost every file there > > was already using

Re: [PATCH v3 3/3] powerpc/pseries: Allow user-specified PCI resource alignment after init

2019-05-29 Thread Bjorn Helgaas
On Mon, May 27, 2019 at 11:03:13PM -0500, Shawn Anastasio wrote: > On pseries, custom PCI resource alignment specified with the commandline > argument pci=resource_alignment is disabled due to PCI resources being > managed by the firmware. However, in the case of PCI hotplug the > resources are

Re: [PATCH v3 1/3] PCI: Introduce pcibios_ignore_alignment_request

2019-05-29 Thread Bjorn Helgaas
On Tue, May 28, 2019 at 03:36:34PM +1000, Oliver wrote: > On Tue, May 28, 2019 at 2:03 PM Shawn Anastasio wrote: > > > > Introduce a new pcibios function pcibios_ignore_alignment_request > > which allows the PCI core to defer to platform-specific code to > > determine whether or not to ignore

Re: [PATCH v4 00/63] Include linux ACPI/PCI/X86 docs into Sphinx TOC tree

2019-04-23 Thread Bjorn Helgaas
On Tue, Apr 23, 2019 at 06:39:47PM +0200, Rafael J. Wysocki wrote: > On Tue, Apr 23, 2019 at 6:30 PM Changbin Du wrote: > > Hi Corbet and All, > > The kernel now uses Sphinx to generate intelligent and beautiful > > documentation from reStructuredText files. I converted all of the Linux > >

Re: [PATCH 1/2] pci: rpadlpar: fix leaked device_node references in add/remove paths

2019-04-05 Thread Bjorn Helgaas
On Fri, Mar 22, 2019 at 01:27:21PM -0500, Tyrel Datwyler wrote: > The find_dlpar_node() helper returns a device node with its reference > incremented. Both the add and remove paths use this helper for find the > appropriate node, but fail to release the reference when done. > > Annotate the

Re: [PATCH v5 0/8] powerpc/powernv/pci: Make hotplug self-sufficient, independent of FW and DT

2019-03-27 Thread Bjorn Helgaas
Hi Sergey, Since this doesn't touch drivers/pci, I assume powerpc folks will handle this series. Let me know if otherwise. On Mon, Mar 11, 2019 at 02:52:25PM +0300, Sergey Miroshnichenko wrote: > This patchset allows switching from the pnv_php module to the standard > pciehp driver for PCIe

Re: [PATCH RFC v4 20/21] PCI: pciehp: Add support for the movable BARs feature

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:21PM +0300, Sergey Miroshnichenko wrote: > With movable BARs, adding a hotplugged device may affect all the PCIe > domain starting from the root, so use a pci_rescan_bus() function which > handles the rearrangement of existing BARs and bridge windows. > >

Re: [PATCH RFC v4 17/21] PCI: Calculate boundaries for bridge windows

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:18PM +0300, Sergey Miroshnichenko wrote: > If a bridge window contains fixed areas (there are PCIe devices with > immovable BARs located on this bus), I think what you mean by "immovable BARs" is "drivers that don't support moving BARs". I want to keep the concept

Re: [PATCH RFC v4 15/21] PCI: Allow the failed resources to be reassigned later

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:16PM +0300, Sergey Miroshnichenko wrote: > Don't lose the size of the requested EP's BAR if it can't be fit > in a current trial, so this can be retried. s/EP/device/, since this applies equally to conventional PCI. > But a failed bridge window must be dropped and

Re: [PATCH RFC v4 14/21] PCI: Don't reserve memory for hotplug when enabled movable BARs

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:15PM +0300, Sergey Miroshnichenko wrote: > pbus_size_mem() returns a precise amount of memory required to fit > all the requested BARs and windows of children bridges. Please make the commit log complete in itself, without requiring the subject. > Signed-off-by:

Re: [PATCH RFC v4 12/21] PCI: Don't allow hotplugged devices to steal resources

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:13PM +0300, Sergey Miroshnichenko wrote: > When movable BARs are enabled, the PCI subsystem at first releases > all the bridge windows and then performs an attempt to assign new > requested resources and re-assign the existing ones. s/performs an attempt/attempts/ I

Re: [PATCH RFC v4 11/21] PCI: Release and reassign the root bridge resources during rescan

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:12PM +0300, Sergey Miroshnichenko wrote: > When the movable BARs feature is enabled, don't rely on the memory gaps > reserved by the BIOS/bootloader/firmware, but instead rearrange the BARs > and bridge windows starting from the root. > > Endpoint device's BARs,

Re: [PATCH RFC v4 10/21] PCI: Fix assigning of fixed prefetchable resources

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:11PM +0300, Sergey Miroshnichenko wrote: > Allow matching them to non-prefetchable windows, as it is done for movable > resources. Please make the commit log complete in itself, without requiring the subject. It's OK if you have to repeat the subject. IIUC, this is

Re: [PATCH RFC v4 09/21] PCI: Mark immovable BARs with PCI_FIXED

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:10PM +0300, Sergey Miroshnichenko wrote: > If a PCIe device driver doesn't yet have support for movable BARs, > mark device's BARs with IORESOURCE_PCI_FIXED. I'm hesitant about using IORESOURCE_PCI_FIXED for this purpose. That was originally added to describe

Re: [PATCH RFC v4 08/21] nvme-pci: Handle movable BARs

2019-03-26 Thread Bjorn Helgaas
[+cc Keith, Jens, Christoph, Sagi, linux-nvme, LKML] On Mon, Mar 11, 2019 at 04:31:09PM +0300, Sergey Miroshnichenko wrote: > Hotplugged devices can affect the existing ones by moving their BARs. > PCI subsystem will inform the NVME driver about this by invoking > reset_prepare()+reset_done(),

Re: [PATCH RFC v4 07/21] PCI: Wake up bridges during rescan when movable BARs enabled

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:08PM +0300, Sergey Miroshnichenko wrote: > Use the PM runtime methods to wake up the bridges before accessing > their config space. > > Signed-off-by: Sergey Miroshnichenko > --- > drivers/pci/probe.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [PATCH RFC v4 05/21] PCI: hotplug: Add a flag for the movable BARs feature

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:06PM +0300, Sergey Miroshnichenko wrote: > If a new PCIe device has been hot-plugged between the two active ones > without big enough gap between their BARs, Just to speak precisely here, a hot-added device is not "between" two active ones because the new device has

Re: [PATCH RFC v4 03/21] PCI: Enable bridge's I/O and MEM access for hotplugged devices

2019-03-26 Thread Bjorn Helgaas
On Mon, Mar 11, 2019 at 04:31:04PM +0300, Sergey Miroshnichenko wrote: > After updating the bridge window resources, the PCI_COMMAND_IO and > PCI_COMMAND_MEMORY bits of the bridge must be addressed as well. > > Signed-off-by: Sergey Miroshnichenko > --- > drivers/pci/pci.c | 8 > 1

Re: [PATCH RFC v4 02/21] PCI: Fix race condition in pci_enable/disable_device()

2019-03-26 Thread Bjorn Helgaas
[+cc Srinath, Marta, LKML] On Mon, Mar 11, 2019 at 04:31:03PM +0300, Sergey Miroshnichenko wrote: > CPU0 CPU1 > > pci_enable_device_mem() pci_enable_device_mem() >pci_enable_bridge() pci_enable_bridge() >

Re: [PATCH RFC v4 01/21] PCI: Fix writing invalid BARs during pci_restore_state()

2019-03-26 Thread Bjorn Helgaas
Hi Sergey, Thanks for all your work here. This is a long-standing problem, and I'm glad you're working on it. On Mon, Mar 11, 2019 at 04:31:02PM +0300, Sergey Miroshnichenko wrote: > If BAR movement has happened (due to PCIe hotplug) after pci_save_state(), > the saved addresses will become

Re: [PATCH] hotplug/drc-info: ininitialize fndit to zero

2019-03-20 Thread Bjorn Helgaas
[+cc Michael B (original author)] On Sat, Mar 16, 2019 at 09:40:16PM +, Colin King wrote: > From: Colin Ian King > > Currently variable fndit is not initialized and contains a > garbage value, later it is set to 1 if a drc entry is found. > Ensure fndit is not containing garbage by

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2019-03-05 Thread Bjorn Helgaas
On Thu, Nov 15, 2018 at 05:16:01PM -0600, Alexandru Gagniuc wrote: > Thanks to Keith for pointing out that it doesn't make sense to disable > AER services when only one device has a FIRMWARE_FIRST HEST. > > AER ownership is an interesting issue brought in by FFS (firmware-first) > model. In a

Re: [PATCH v1] PCI/AER: use match_string() helper to simplify the code

2019-01-29 Thread Bjorn Helgaas
On Mon, Jan 28, 2019 at 01:57:28PM +0200, Andy Shevchenko wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded implementation. > > Signed-off-by: Andy Shevchenko Applied to pci/aer for v5.1, thanks! > --- >

Re: [PATCH] PCI: Use of_node_name_eq for node name comparisons

2019-01-22 Thread Bjorn Helgaas
ael Ellerman > Cc: Bjorn Helgaas > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-...@vger.kernel.org > Signed-off-by: Rob Herring I applied the pci/of.c change to pci/misc for v5.1, thanks! I dropped the rpaphp_core.c part because there's another patch in-flight [1] that touch

Re: [RFC 5/6] powerpc/pci/hotplug: Use common drcinfo parsing

2019-01-22 Thread Bjorn Helgaas
On Mon, Jan 14, 2019 at 06:28:57PM -0600, Bjorn Helgaas wrote: > On Fri, Dec 14, 2018 at 02:51:31PM -0600, Michael Bringmann wrote: > > The implementation of the pseries-specific drc info properties > > is currently implemented in pseries-specific and non-pseries-specific > &g

Re: [RFC 5/6] powerpc/pci/hotplug: Use common drcinfo parsing

2019-01-14 Thread Bjorn Helgaas
On Fri, Dec 14, 2018 at 02:51:31PM -0600, Michael Bringmann wrote: > The implementation of the pseries-specific drc info properties > is currently implemented in pseries-specific and non-pseries-specific > files. This patch set uses a new implementation of the device-tree > parsing code for the

Kconfig label updates

2019-01-08 Thread Bjorn Helgaas
Hi, I want to update the PCI Kconfig labels so they're more consistent and useful to users, something like the patch below. IIUC, the items below are all IBM-related; please correct me if not. I'd also like to expand (or remove) "RPA" because Google doesn't find anything about "IBM RPA", except

Re: [PATCH 1/2] PCI/IOV: provide flag to skip VF scanning

2019-01-01 Thread Bjorn Helgaas
On Fri, Dec 21, 2018 at 03:19:49PM +0100, Sebastian Ott wrote: > Hello Bjorn, > > On Thu, 20 Dec 2018, Bjorn Helgaas wrote: > > I think the strategy is fine, but can you restructure the patches > > like this: > > > > 1) Factor out sriov_add_vfs()

Re: [PATCH 1/2] PCI/IOV: provide flag to skip VF scanning

2018-12-20 Thread Bjorn Helgaas
Hi Sebastian, On Tue, Dec 18, 2018 at 11:16:49AM +0100, Sebastian Ott wrote: > Provide a flag to skip scanning for new VFs after SRIOV enablement. > This can be set by implementations for which the VFs are already > reported by other means. > > Signed-off-by: Sebastian Ott > --- >

Re: [PATCH] PCI/AER: only insert one element into kfifo

2018-12-14 Thread Bjorn Helgaas
On Wed, Dec 12, 2018 at 04:32:30PM +0800, Yanjiang Jin wrote: > 'commit ecae65e133f2 ("PCI/AER: Use kfifo_in_spinlocked() to > insert locked elements")' replace kfifo_put() with kfifo_in_spinlocked(). > > But as "kfifo_in(fifo, buf, n)" describes: > " * @n: number of elements to be added". > >

Re: [PATCH 0/2] sriov enablement on s390

2018-12-12 Thread Bjorn Helgaas
On Wed, Dec 05, 2018 at 02:45:14PM +0100, Sebastian Ott wrote: > Hello Bjorn, > > On Wed, 10 Oct 2018, Bjorn Helgaas wrote: > > On Wed, Oct 10, 2018 at 02:55:07PM +0200, Sebastian Ott wrote: > > > On Wed, 12 Sep 2018, Bjorn Helgaas wrote: > > > > On W

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-11 Thread Bjorn Helgaas
On Tue, Dec 11, 2018 at 6:38 PM David Gibson wrote: > > On Tue, Dec 11, 2018 at 08:01:43AM -0600, Bjorn Helgaas wrote: > > Hi David, > > > > I see you're still working on this, but if you do end up going this > > direction eventually, would you mind splitting this i

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-11 Thread Bjorn Helgaas
Hi David, I see you're still working on this, but if you do end up going this direction eventually, would you mind splitting this into two patches: 1) rename the quirk to make it more generic (but not changing any behavior), and 2) add the ConnectX devices to the quirk. That way the ConnectX

Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected

2018-11-14 Thread Bjorn Helgaas
On Wed, Nov 14, 2018 at 07:22:04PM +, alex_gagn...@dellteam.com wrote: > On 11/14/2018 12:00 AM, Bjorn Helgaas wrote: > > On Tue, Nov 13, 2018 at 10:39:15PM +, alex_gagn...@dellteam.com wrote: > >> On 11/12/2018 11:02 PM, Bjorn Helgaas wrote: > >> ... > &

Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected

2018-11-13 Thread Bjorn Helgaas
On Tue, Nov 13, 2018 at 10:39:15PM +, alex_gagn...@dellteam.com wrote: > On 11/12/2018 11:02 PM, Bjorn Helgaas wrote: > > > > [EXTERNAL EMAIL] > > Please report any suspicious attachments, links, or requests for sensitive > > information. It looks like Dell's

Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected

2018-11-12 Thread Bjorn Helgaas
[+cc Jon, for related VMD firmware-first error enable issue] On Mon, Nov 12, 2018 at 08:05:41PM +, alex_gagn...@dellteam.com wrote: > On 11/11/2018 11:50 PM, Oliver O'Halloran wrote: > > On Thu, 2018-11-08 at 23:06 +, alex_gagn...@dellteam.com wrote: > >> But it's not the firmware that

Re: [PATCH 6/9] PCI: consolidate PCI config entry in drivers/pci

2018-11-08 Thread Bjorn Helgaas
gt; not compile without PCI enabled. On other architectures with limited > PCI support that wasn't as complicated I've left the selection as-is. > > Signed-off-by: Christoph Hellwig > Acked-by: Max Filippov > Acked-by: Thomas Gleixner > Acked-by: Bjorn Helgaas Sounds like Ma

Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected

2018-11-08 Thread Bjorn Helgaas
[+cc Jonathan, Greg, Lukas, Russell, Sam, Oliver for discussion about PCI error recovery in general] On Wed, Nov 07, 2018 at 05:42:57PM -0600, Bjorn Helgaas wrote: > On Tue, Sep 18, 2018 at 05:15:00PM -0500, Alexandru Gagniuc wrote: > > When a PCI device is gone, we don't want t

Re: [PATCH 4/8] pci: consolidate PCI config entry in drivers/pci

2018-10-15 Thread Bjorn Helgaas
, and a lot of code does > not compile without PCI enabled. On other architectures with limited > PCI support that wasn't as complicated I've left the selection as-is. Thanks for doing this. It's a great cleanup. I know you have a few things you're cleaning up, but add my: Acked-by: Bjorn Helgaas when you do that.

Re: [PATCH 1/8] aha152x: rename the PCMCIA define

2018-10-15 Thread Bjorn Helgaas
On Sat, Oct 13, 2018 at 05:10:09PM +0200, Christoph Hellwig wrote: > We plan to enable building the pcmcia core and drivers, and the > non-prefixed PCMCIA name clashes with some arch headers. In the followup PCMCIA patch, you capitalized "PCMCIA core".

Re: [PATCH 0/2] sriov enablement on s390

2018-10-10 Thread Bjorn Helgaas
On Wed, Oct 10, 2018 at 02:55:07PM +0200, Sebastian Ott wrote: > Hello Bjorn, > > On Wed, 12 Sep 2018, Bjorn Helgaas wrote: > > On Wed, Sep 12, 2018 at 02:34:09PM +0200, Sebastian Ott wrote: > > > On s390 we currently handle SRIOV within firmware. Which means > > &

Re: [linux-next][bisected e3fbcc7c] build error at drivers/pci/pcie/aer_inject.c:444:6: error: ‘struct pt_regs’ has no member named ‘ip

2018-10-09 Thread Bjorn Helgaas
On Tue, Oct 9, 2018 at 5:40 AM Abdul Haleem wrote: > > On Tue, 2018-10-09 at 20:47 +1100, Michael Ellerman wrote: > > Abdul Haleem writes: > > > Greeting's > > > > > > Today's linux-next fails to build on ppc with below error > > > > > > drivers/pci/pcie/aer_inject.c: In function

Re: [RFC 00/15] PCI: turn some __weak functions into callbacks

2018-10-02 Thread Bjorn Helgaas
On Fri, Aug 17, 2018 at 12:26:30PM +0200, Arnd Bergmann wrote: > Hi Bjorn and others, > > Triggered by Christoph's patches, I had another go at converting > all of the remaining pci host bridge implementations to be based > on pci_alloc_host_bridge and a separate registration function. > > This

Re: [PATCH -next] PCI: hotplug: Use kmemdup rather than duplicating its implementation in pnv_php_add_devtree()

2018-09-28 Thread Bjorn Helgaas
On Thu, Sep 27, 2018 at 06:52:21AM +, YueHaibing wrote: > Use kmemdup rather than duplicating its implementation > > Signed-off-by: YueHaibing Applied with Michael's ack to pci/hotplug for v4.20, thanks! > --- > drivers/pci/hotplug/pnv_php.c | 3 +-- > 1 file changed, 1 insertion(+), 2

Re: [PATCH -next] PCI/AER: Remove duplicated include from err.c

2018-09-26 Thread Bjorn Helgaas
On Wed, Sep 26, 2018 at 11:00:10AM +, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing Applied to pci/hotplug for v4.20, thanks! > --- > drivers/pci/pcie/err.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/pci/pcie/err.c

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-19 Thread Bjorn Helgaas
On Wed, Sep 19, 2018 at 11:49:26AM +1000, Russell Currey wrote: > On Tue, 2018-09-18 at 16:58 -0500, Bjorn Helgaas wrote: > > On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > The original PCI error recove

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-18 Thread Bjorn Helgaas
On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The original PCI error recovery functionality was for the powerpc-specific > IBM EEH feature. PCIe subsequently added some similar features, including > AER and DPC, that can be used on a

Re: [PATCH RFC 1/4] PCI: hotplug: Add parameter to put devices to reset during rescan

2018-09-18 Thread Bjorn Helgaas
On Tue, Sep 18, 2018 at 05:01:48PM +0300, Sergey Miroshnichenko wrote: > On 9/18/18 1:59 AM, Bjorn Helgaas wrote: > > On Mon, Sep 17, 2018 at 11:55:43PM +0300, Sergey Miroshnichenko wrote: > >> On 9/17/18 8:28 AM, Sam Bobroff wrote: > >>> On Fri, Sep 14, 20

Re: [PATCH RFC 1/4] PCI: hotplug: Add parameter to put devices to reset during rescan

2018-09-17 Thread Bjorn Helgaas
[+cc Russell, Ben, Oliver, linuxppc-dev] On Mon, Sep 17, 2018 at 11:55:43PM +0300, Sergey Miroshnichenko wrote: > Hello Sam, > > On 9/17/18 8:28 AM, Sam Bobroff wrote: > > Hi Sergey, > > > > On Fri, Sep 14, 2018 at 07:14:01PM +0300, Sergey Miroshnichenko wrote: > >> Introduce a new command line

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-12 Thread Bjorn Helgaas
On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The original PCI error recovery functionality was for the powerpc-specific > IBM EEH feature. PCIe subsequently added some similar features, including > AER and DPC, that can be used on a

[PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-12 Thread Bjorn Helgaas
From: Bjorn Helgaas The original PCI error recovery functionality was for the powerpc-specific IBM EEH feature. PCIe subsequently added some similar features, including AER and DPC, that can be used on any architecture. We want the generic PCI core error handling support to work with all

Re: [PATCH 0/2] sriov enablement on s390

2018-09-12 Thread Bjorn Helgaas
[+cc Arnd, powerpc folks] On Wed, Sep 12, 2018 at 02:34:09PM +0200, Sebastian Ott wrote: > Hello Bjorn, > > On s390 we currently handle SRIOV within firmware. Which means > that the PF is under firmware control and not visible to operating > systems. SRIOV enablement happens within firmware and

Re: [PATCH] MAINTAINERS: add maintainer entries for RPA pci hotplug drivers

2018-09-06 Thread Bjorn Helgaas
On Mon, Aug 20, 2018 at 06:20:31PM -0700, Tyrel Datwyler wrote: > Adding myself as maintiner of the IBM RPA hotplug modules located in > drivers/pci/hotplug directory. These modules provide kernel interfaces > for support of Dynamic Logical Partitioning (DLPAR) of Logical and > Physical IO slots,

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Bjorn Helgaas
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > There is nothing arch specific about PCI or dma-debug, so move this > call to common code just after registering the bus type. > > Signed-off-by: Christoph Hellwig Applied with acks from Thomas and Michael to pci/misc for

Re: [PATCH v3 1/1] powerpc/pseries: fix EEH recovery of some IOV devices

2018-07-30 Thread Bjorn Helgaas
This is a fix to allow EEH recovery to succeed in a specific situation, > which I've tried to explain in the commit message. > > As with the RFC version, the IOV BARs are disabled by setting the resource > flags to 0 but the other fields are now left as-is because that is what is &

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-30 Thread Bjorn Helgaas
[+cc Joerg] On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > There is nothing arch specific about PCI or dma-debug, so move this > call to common code just after registering the bus type. I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y we only got PCI

Re: [PATCH v3] PCI: Data corruption happening due to race condition

2018-07-27 Thread Bjorn Helgaas
On Thu, Jul 19, 2018 at 02:18:09PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2018-07-18 at 18:29 -0500, Bjorn Helgaas wrote: > > [+cc Paul, Michael, linuxppc-dev] > > > >/... > > > > Debugging revealed a race condition between pcie core d

  1   2   3   4   5   6   7   >