linux/arch/powerpc/platforms
Michael Ellerman 11d92156f7 powerpc/pseries: Only register vio drivers if vio bus exists
The vio bus is a fake bus, which we use on pseries LPARs (guests) to
discover devices provided by the hypervisor. There's no need or sense
in creating the vio bus on bare metal systems.

Which is why commit 4336b93378 ("powerpc/pseries: Make vio and
ibmebus initcalls pseries specific") made the initialisation of the
vio bus only happen in LPARs.

However as a result of that commit we now see errors at boot on bare
metal systems:

  Driver 'hvc_console' was unable to register with bus_type 'vio' because the bus was not initialized.
  Driver 'tpm_ibmvtpm' was unable to register with bus_type 'vio' because the bus was not initialized.

This happens because those drivers are built-in, and are calling
vio_register_driver(). It in turn calls driver_register() with a
reference to vio_bus_type, but we haven't registered vio_bus_type with
the driver core.

Fix it by also guarding vio_register_driver() with a check to see if
we are on pseries.

Fixes: 4336b93378 ("powerpc/pseries: Make vio and ibmebus initcalls pseries specific")
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Link: https://lore.kernel.org/r/20210316010938.525657-1-mpe@ellerman.id.au
2021-03-31 14:32:58 +11:00
..
4xx powerpc/4xx: Don't unmap NULL mbase 2020-05-28 23:24:36 +10:00
8xx powerpc: bad_page_fault get registers from regs 2021-02-09 00:02:09 +11:00
40x powerpc: Remove IBM405 Erratum #77 2020-05-28 23:24:36 +10:00
44x powerpc/akebono: Fix unmet dependency errors 2021-02-09 00:10:50 +11:00
52xx powerpc/time: Avoid using get_tbl() 2021-02-11 23:35:13 +11:00
82xx powerpc/82xx/*: Move PHB discovery 2021-02-09 00:02:06 +11:00
83xx powerpc/83xx: Fix build error when CONFIG_PCI=n 2021-02-11 23:28:51 +11:00
85xx powerpc/85xx: Fix declaration made after definition 2020-11-19 14:50:13 +11:00
86xx mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
512x powerpc/512x: Move PHB discovery 2021-02-09 00:02:05 +11:00
amigaone powerpc/amigaone: Make amigaone_discover_phbs() static 2021-02-11 23:28:51 +11:00
cell idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
chrp powerpc/chrp: Make hydra_init() static 2021-03-24 14:09:29 +11:00
embedded6xx powerpc/embedded6xx: Remove CONFIG_MV64X60 2021-03-29 13:22:17 +11:00
maple powerpc/pci: fix warning comparing pointer to 0 2021-03-29 13:22:13 +11:00
pasemi powerpc/pasemi: Move PHB discovery 2021-02-09 00:02:07 +11:00
powermac powerpc/pci: Move PHB discovery for PCI_DN using platforms 2021-02-09 00:01:05 +11:00
powernv powerpc/powernv: Remove unneeded variable: "rc" 2021-03-29 13:22:19 +11:00
ps3 powerpc/ps3: make system bus's remove and shutdown callbacks return void 2020-12-04 01:01:22 +11:00
pseries powerpc/pseries: Only register vio drivers if vio bus exists 2021-03-31 14:32:58 +11:00
fsl_uli1575.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig powerpc: Remove CONFIG_PPC601_SYNC_FIX 2020-10-08 21:17:13 +11:00
Kconfig.cputype powerpc/book3s64/kuap: Move Kconfig varriables to BOOK3S_64 2021-03-29 13:22:15 +11:00
Makefile powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00