diff options
author | Greg Kurz | 2020-12-18 11:33:57 +0100 |
---|---|---|
committer | David Gibson | 2021-01-06 01:09:59 +0100 |
commit | babb819f945a0f279e021e3fc09283080bace61d (patch) | |
tree | c2fb8e8f992700bd765420041fafa110bc2fa13f /include/hw/ppc | |
parent | spapr: Fix reset of transient DR connectors (diff) | |
download | qemu-babb819f945a0f279e021e3fc09283080bace61d.tar.gz qemu-babb819f945a0f279e021e3fc09283080bace61d.tar.xz qemu-babb819f945a0f279e021e3fc09283080bace61d.zip |
spapr: Introduce spapr_drc_reset_all()
No need to expose the way DRCs are traversed outside of spapr_drc.c.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20201218103400.689660-4-groug@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc')
-rw-r--r-- | include/hw/ppc/spapr_drc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index 5d80019f82..8982927d5c 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -245,6 +245,12 @@ int spapr_dt_drc(void *fdt, int offset, Object *owner, uint32_t drc_type_mask); void spapr_drc_attach(SpaprDrc *drc, DeviceState *d); void spapr_drc_detach(SpaprDrc *drc); +/* + * Reset all DRCs, causing pending hot-plug/unplug requests to complete. + * Safely handles potential DRC removal (eg. PHBs or PCI bridges). + */ +void spapr_drc_reset_all(struct SpaprMachineState *spapr); + static inline bool spapr_drc_unplug_requested(SpaprDrc *drc) { return drc->unplug_requested; |