OSDN Git Service

ppc/pnv: set root port chassis and slot using Bus properties
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Thu, 11 Aug 2022 16:39:42 +0000 (13:39 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 31 Aug 2022 17:08:05 +0000 (14:08 -0300)
commitc2f3f78af5fd664f95748ebc918ae86463690249
treeed024bda763cc0375055e130570bd62a4a7e3b05
parentb7c1750dc440bb46ddc38dd0c391d6394db7bdb1
ppc/pnv: set root port chassis and slot using Bus properties

For default root ports we have a way of accessing chassis and slot,
before root_port_realize(), via pnv_phb_attach_root_port(). For the
future user created root ports this won't be the case: we can't use
this helper because we don't have access to the PHB phb-id/chip-id
values.

In earlier patches we've added phb-id and chip-id to pnv-phb-root-bus
objects. We're now able to use the bus to retrieve them. The bus is
reachable for both user created and default devices, so we're changing
all the code paths. This also allow us to validate these changes with
the existing default devices.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20220811163950.578927-4-danielhb413@gmail.com>
hw/pci-host/pnv_phb.c