linux-uconsole/arch/powerpc
Oliver O'Halloran cd85fa3367 powerpc/powernv: Disable native PCIe port management
commit 9d72dcef89 upstream.

On PowerNV the PCIe topology is (currently) managed by the powernv platform
code in Linux in cooperation with the platform firmware. Linux's native
PCIe port service drivers operate independently of both and this can cause
problems.

The main issue is that the portbus driver will conflict with the platform
specific hotplug driver (pnv_php) over ownership of the MSI used to notify
the host when a hotplug event occurs. The portbus driver claims this MSI on
behalf of the individual port services because the same interrupt is used
for hotplug events, PMEs (on root ports), and link bandwidth change
notifications. The portbus driver will always claim the interrupt even if
the individual port service drivers, such as pciehp, are compiled out.

The second, bigger, problem is that the hotplug port service driver
fundamentally does not work on PowerNV. The platform assumes that all
PCI devices have a corresponding arch-specific handle derived from the DT
node for the device (pci_dn) and without one the platform will not allow
a PCI device to be enabled. This problem is largely due to historical
baggage, but it can't be resolved without significant re-factoring of the
platform PCI support.

We can fix these problems in the interim by setting the
"pcie_ports_disabled" flag during platform initialisation. The flag
indicates the platform owns the PCIe ports which stops the portbus driver
from being registered.

This does have the side effect of disabling all port services drivers
that is: AER, PME, BW notifications, hotplug, and DPC. However, this is
not a huge disadvantage on PowerNV since these services are either unused
or handled through other means.

Fixes: 66725152fb ("PCI/hotplug: PowerPC PowerNV PCI hotplug driver")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191118065553.30362-1-oohall@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:47:09 +01:00
..
boot libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h 2020-01-04 19:13:15 +01:00
configs powerpc/mm/radix: Make Radix require HUGETLB_PAGE 2019-05-02 09:58:55 +02:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include powerpc/spinlocks: Include correct header for static key 2020-01-12 12:17:23 +01:00
kernel KVM: PPC: Book3S HV: use smp_mb() when setting/clearing host_ipi flag 2020-01-09 10:19:08 +01:00
kvm KVM: PPC: Book3S HV: use smp_mb() when setting/clearing host_ipi flag 2020-01-09 10:19:08 +01:00
lib powerpc/64: Fix memcmp reading past the end of src/dest 2019-04-03 06:26:29 +02:00
math-emu
mm powerpc: Ensure that swiotlb buffer is allocated from low memory 2020-01-12 12:17:14 +01:00
net powerpc/bpf: Fix tail call implementation 2019-12-05 09:19:39 +01:00
oprofile treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
perf powerpc/perf: Fix unit_sel/cache_sel checks 2019-12-05 09:20:41 +01:00
platforms powerpc/powernv: Disable native PCIe port management 2020-01-17 19:47:09 +01:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev KVM: PPC: Book3S HV: use smp_mb() when setting/clearing host_ipi flag 2020-01-09 10:19:08 +01:00
tools powerpc/tools: Don't quote $objdump in scripts 2020-01-04 19:12:42 +01:00
xmon powerpc: Avoid clang warnings around setjmp and longjmp 2019-12-17 20:35:40 +01:00
Kconfig powerpc: disable support for relative ksymtab references 2018-08-29 16:12:07 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile powerpc: Don't add -mabi= flags when building with Clang 2020-01-04 19:13:10 +01:00
Makefile.postlink