mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
930ef3b5c2
commit
babb819f94
3 changed files with 43 additions and 34 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue