All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC v4 0/9] powerpc/powernv/pci: Make hotplug self-sufficient, independent of FW and DT
@ 2019-03-01 16:04 Sergey Miroshnichenko
  2019-03-01 16:04 ` [PATCH RFC v4 1/9] powerpc/pci: Access PCI config space directly w/o pci_dn Sergey Miroshnichenko
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Sergey Miroshnichenko @ 2019-03-01 16:04 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Stewart Smith, Alexey Kardashevskiy, Sergey Miroshnichenko,
	linux, Oliver O'Halloran

This patchset allows switching from the pnv_php module to the standard
pciehp driver for PCIe hotplug functionality, if the platform supports it:
PowerNV working on on top of the skiboot with the "core/pci: Sync VFs and
the changes of bdfns between the firmware and the OS" patch serie applied.

The feature is activated by the "pci=realloc" command line argument.

The goal is ability to hotplug bridges full of devices in the future. The
"Movable BARs" [1] is a platform-independent part of our work in this. The
final part will be movable bus numbers to support inserting a bridge in the
middle of an existing PCIe tree.

Tested on POWER8 PowerNV+PHB3 ppc64le (our Vesnin server) with:
 - the pciehp driver active;
 - the pnv_php driver disabled;
 - The "pci=realloc" argument is passed;
 - surprise hotplug of an NVME disk works;
 - controlled hotplug of a network card with SR-IOV works;
 - activating of SR-IOV on a network card works;
 - [with extra patches] manually initiated (via sysfs) rescan has found
   and turned on a hotplugged bridge;
 - Without "pci=realloc" works just as before.

Changes since v3 [2]:
 - Subject changed;
 - Don't disable EEH during rescan anymore - instead just unfreeze the
   target buses deliberately;
 - Add synchronization with the firmware when changing the PCIe topology;
 - Fixed for VFs;
 - Code cleanup.

Changes since v2:
 - Don't reassign bus numbers on PowerNV by default (to retain the default
   behavior), but only when pci=realloc is passed;
 - Less code affected;
 - pci_add_device_node_info is refactored with add_one_dev_pci_data;
 - Minor code cleanup.

Changes since v1:
 - Fixed build for ppc64le and ppc64be when CONFIG_PCI_IOV is disabled;
 - Fixed build for ppc64e when CONFIG_EEH is disabled;
 - Fixed code style warnings.

[1] https://www.spinics.net/lists/linux-pci/msg79995.html
[2] https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-September/178053.html

Sergey Miroshnichenko (9):
  powerpc/pci: Access PCI config space directly w/o pci_dn
  powerpc/powernv/pci: Suppress an EEH error when reading an empty slot
  powerpc/pci: Create pci_dn on demand
  powerpc/pci: Reduce code duplication in pci_add_device_node_info
  powerpc/powernv/ioda: Fix using uninitialized IOMMU group
  powerpc/pci/IOV: Add support for runtime enabling the VFs
  powerpc/pci: Don't rely on DT is the PCI_REASSIGN_ALL_BUS is set
  powerpc/powernv/pci: Hook up the writes to PCI_SECONDARY_BUS register
  powerpc/powernv/pci: Enable reassigning the bus numbers

 arch/powerpc/include/asm/pci-bridge.h        |   2 +-
 arch/powerpc/include/asm/ppc-pci.h           |   1 +
 arch/powerpc/kernel/pci_dn.c                 | 164 +++++++++++----
 arch/powerpc/kernel/rtas_pci.c               |  97 ++++++---
 arch/powerpc/platforms/powernv/eeh-powernv.c |   2 +-
 arch/powerpc/platforms/powernv/pci-ioda.c    |   5 +-
 arch/powerpc/platforms/powernv/pci.c         | 208 +++++++++++++++++--
 arch/powerpc/platforms/pseries/pci.c         |   2 +-
 8 files changed, 381 insertions(+), 100 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-03-05 16:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 16:04 [PATCH RFC v4 0/9] powerpc/powernv/pci: Make hotplug self-sufficient, independent of FW and DT Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 1/9] powerpc/pci: Access PCI config space directly w/o pci_dn Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 2/9] powerpc/powernv/pci: Suppress an EEH error when reading an empty slot Sergey Miroshnichenko
2019-03-05  6:14   ` Oliver
2019-03-05 15:13     ` Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 3/9] powerpc/pci: Create pci_dn on demand Sergey Miroshnichenko
2019-03-05  8:04   ` Oliver
2019-03-05 16:50     ` Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 4/9] powerpc/pci: Reduce code duplication in pci_add_device_node_info Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 5/9] powerpc/powernv/ioda: Fix using uninitialized IOMMU group Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 6/9] powerpc/pci/IOV: Add support for runtime enabling the VFs Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 7/9] powerpc/pci: Don't rely on DT is the PCI_REASSIGN_ALL_BUS is set Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 8/9] powerpc/powernv/pci: Hook up the writes to PCI_SECONDARY_BUS register Sergey Miroshnichenko
2019-03-01 16:04 ` [PATCH RFC v4 9/9] powerpc/powernv/pci: Enable reassigning the bus numbers Sergey Miroshnichenko
2019-03-04 11:38 ` [PATCH RFC v4 0/9] powerpc/powernv/pci: Make hotplug self-sufficient, independent of FW and DT Oliver

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.