linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFCv1 0/8] PCI: Slot Support PowerPC PowerNV Platform
@ 2014-11-24 22:49 Gavin Shan
  2014-11-24 22:49 ` [PATCH 1/8] powerpc/pci: Move pcibios_find_pci_bus() around Gavin Shan
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Gavin Shan @ 2014-11-24 22:49 UTC (permalink / raw)
  To: linux-pci; +Cc: linuxppc-dev, Gavin Shan

The series of patches depends on the OPAL firmware changes. Please
don't consider merging it before the OPAL firmware changes get merged!

The series of patches intends to support PCI slots for OPAL firmware
based PPC PowerNV platform. The OPAL firmware exports the capabilities
to check various statuses (e.g. Power, Presence) on the specified PCI
slot via so-called runtime OPAL APIs. Apart from that, the patchset
cleans up the coding style of RPA modules and fixes PCI slots lost
on PPC pSeries platform.

PATCH[1-3]: Necessary code changes to PPC PCI subsystem in order to
            support PCI slots for PPC PowerNV platform.
PATCH[4]  : Coding style cleanup for RPA modules.
PATCH[5]  : Fix the issue that PCI slots are missed on pSeries platform
PATCH[6-8]: PCI slots support for PPC PowerNV platform

Testing
=======
With the series of patches applied, PCI slots apears from sysfs and
hotplug can be completed accordingly on PowerPC PowerNV platform.

# cat /proc/cpuinfo | grep -i powernv
platform	: PowerNV
machine		: PowerNV 8286-41A

# pwd
/sys/bus/pci/slots
# ls
C10  C11  C12  C14  C15  C6  C7  C8  C9

# lspci -s 0003::.
0003:00:00.0 PCI bridge: IBM Device 03dc
0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
# pwd
/sys/bus/pci/slots/C10
# cat address 
0003:09:00
# cat address 
0003:09:00
# cat cur_bus_speed 
5.0 GT/s PCIe
# cat max_bus_speed 
8.0 GT/s PCIe
# cat power 
1
# echo 0 > power 
# lspci -s 0003::.
0003:00:00.0 PCI bridge: IBM Device 03dc
0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
# echo 1 > power
# lspci -s 0003::.
0003:00:00.0 PCI bridge: IBM Device 03dc
0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]

Changelog
=========
N/A

Gavin Shan (8):
  powerpc/pci: Move pcibios_find_pci_bus() around
  powerpc/pci: Don't scan empty slot
  powerpc/powernv: Export functions to retrieve slot status
  PCI/hotplug/rpa: Code cleanup
  PCI/hotplug/rpa: Create PCI slot properly
  PCI/hotplug/rpa: Abstract slot operations
  PCI/hotplug/rpa: Hierarchial slots
  PCI/hotplug/rpa: Support OPAL firmware

 arch/powerpc/include/asm/opal.h                |   6 +-
 arch/powerpc/include/asm/pnv-pci.h             |   3 +
 arch/powerpc/kernel/pci-hotplug.c              |  41 ++-
 arch/powerpc/platforms/powernv/eeh-ioda.c      |  34 +-
 arch/powerpc/platforms/powernv/opal-wrappers.S |   2 +
 arch/powerpc/platforms/powernv/pci.c           |  38 ++
 arch/powerpc/platforms/powernv/pci.h           |   1 +
 arch/powerpc/platforms/pseries/pci_dlpar.c     |  32 --
 drivers/pci/hotplug/Kconfig                    |   4 +-
 drivers/pci/hotplug/Makefile                   |   4 +-
 drivers/pci/hotplug/rpadlpar_core.c            | 102 +++---
 drivers/pci/hotplug/rpaphp.h                   |  93 +++--
 drivers/pci/hotplug/rpaphp_core.c              | 480 ++++++++-----------------
 drivers/pci/hotplug/rpaphp_opal.c              | 241 +++++++++++++
 drivers/pci/hotplug/rpaphp_pci.c               | 135 -------
 drivers/pci/hotplug/rpaphp_rtas.c              | 330 +++++++++++++++++
 drivers/pci/hotplug/rpaphp_slot.c              | 147 --------
 17 files changed, 920 insertions(+), 773 deletions(-)
 create mode 100644 drivers/pci/hotplug/rpaphp_opal.c
 delete mode 100644 drivers/pci/hotplug/rpaphp_pci.c
 create mode 100644 drivers/pci/hotplug/rpaphp_rtas.c
 delete mode 100644 drivers/pci/hotplug/rpaphp_slot.c

-- 
1.8.3.2

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

end of thread, other threads:[~2014-12-04  5:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-24 22:49 [PATCH RFCv1 0/8] PCI: Slot Support PowerPC PowerNV Platform Gavin Shan
2014-11-24 22:49 ` [PATCH 1/8] powerpc/pci: Move pcibios_find_pci_bus() around Gavin Shan
2014-11-25 22:58   ` Benjamin Herrenschmidt
2014-11-26  0:08     ` Gavin Shan
2014-11-26  0:19       ` Benjamin Herrenschmidt
2014-11-24 22:49 ` [PATCH 2/8] powerpc/pci: Don't scan empty slot Gavin Shan
2014-11-25 22:58   ` Benjamin Herrenschmidt
2014-11-25 23:57     ` Gavin Shan
2014-11-24 22:49 ` [PATCH 3/8] powerpc/powernv: Export functions to retrieve slot status Gavin Shan
2014-11-25 23:00   ` Benjamin Herrenschmidt
2014-11-25 23:59     ` Gavin Shan
2014-11-24 22:49 ` [PATCH 4/8] PCI/hotplug/rpa: Code cleanup Gavin Shan
2014-11-25 23:02   ` Benjamin Herrenschmidt
2014-11-26  0:00     ` Gavin Shan
2014-11-24 22:49 ` [PATCH 5/8] PCI/hotplug/rpa: Create PCI slot properly Gavin Shan
2014-11-25 23:04   ` Benjamin Herrenschmidt
2014-12-04  5:24     ` Gavin Shan
2014-11-24 22:49 ` [PATCH 6/8] PCI/hotplug/rpa: Abstract slot operations Gavin Shan
2014-11-25 23:04   ` Benjamin Herrenschmidt
2014-11-26  0:01     ` Gavin Shan
2014-11-24 22:49 ` [PATCH 7/8] PCI/hotplug/rpa: Hierarchial slots Gavin Shan
2014-11-24 22:49 ` [PATCH 8/8] PCI/hotplug/rpa: Support OPAL firmware Gavin Shan

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).