linux/arch/powerpc
Oliver O'Halloran fbbefb3202 powerpc/pci: Move PHB discovery for PCI_DN using platforms
Make powernv, pseries, powermac and maple use ppc_mc.discover_phbs.
These platforms need to be done together because they all depend on
pci_dn's being created from the DT. The pci_dn contains a pointer to
the relevant pci_controller so they need to be created after the
pci_controller structures are available, but before PCI devices are
scanned. Currently this ordering is provided by initcalls and the
sequence is:

  1. PHBs are discovered (setup_arch) (early boot, pre-initcalls)
  2. pci_dn are created from the unflattended DT (core initcall)
  3. PHBs are scanned pcibios_init() (subsys initcall)

The new ppc_md.discover_phbs() function is also a core_initcall so we
can't guarantee ordering between the creation of pci_controllers and
the creation of pci_dn's which require a pci_controller. We could use
the postcore, or core_sync initcall levels, but it's cleaner to just
move the pci_dn setup into the per-PHB inits which occur inside of
.discover_phb() for these platforms. This brings the boot-time path in
line with the PHB hotplug path that is used for pseries DLPAR
operations too.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[mpe: Squash powermac & maple in to avoid breakage those platforms,
      convert memblock allocs to use kmalloc to avoid warnings]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201103043523.916109-2-oohall@gmail.com
2021-02-09 00:01:05 +11:00
..
boot powerpc/boot: Fix build of dts/fsl 2020-12-21 22:06:09 +11:00
configs powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
crypto crypto: powerpc/sha256-spe - Fix sparse endianness warning 2020-11-27 17:13:41 +11:00
include powerpc/pci: Add ppc_md.discover_phbs() 2021-02-03 09:46:36 +11:00
kernel powerpc/pci: Move PHB discovery for PCI_DN using platforms 2021-02-09 00:01:05 +11:00
kexec arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
kvm powerpc/kvm: Force selection of CONFIG_PPC_FPU 2021-01-30 11:39:32 +11:00
lib powerpc/sstep: Fix incorrect return from analyze_instr() 2021-01-30 11:40:04 +11:00
math-emu
mm powerpc/32s: Only build hash code when CONFIG_PPC_BOOK3S_604 is selected 2021-01-31 22:35:50 +11:00
net bpf, powerpc: Fix misuse of fallthrough in bpf_jit_comp() 2020-09-29 16:39:11 +02:00
oprofile powerpc/oprofile: fix spelling mistake "contex" -> "context" 2020-08-25 01:31:33 +10:00
perf powerpc/perf/hv-24x7: Dont create sysfs event files for dummy events 2021-01-30 11:39:25 +11:00
platforms powerpc/pci: Move PHB discovery for PCI_DN using platforms 2021-02-09 00:01:05 +11:00
purgatory powerpc/kexec_file: Enable early kernel OPAL calls 2020-07-29 23:47:55 +10:00
sysdev powerpc/xive: Improve error reporting of OPAL calls 2020-12-11 09:53:11 +11:00
tools powerpc/tools: Remove 90 line limit in checkpatch script 2020-09-08 22:57:11 +10:00
xmon powerpc/xmon: Enable breakpoints on 8xx 2021-01-31 22:35:51 +11:00
Kbuild
Kconfig powerpc/44x: Remove STDBINUTILS kconfig option 2021-01-30 11:39:33 +11:00
Kconfig.debug powerpc/xmon: Select CONSOLE_POLL for the 8xx 2021-01-31 22:35:51 +11:00
Makefile powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00