On Fri, 18 Oct 2019 at 16:07, Damien Hedde <damien.he...@greensocs.com> wrote: > > Deprecate device_legacy_reset(), qdev_reset_all() and > qbus_reset_all() to be replaced by new functions > device_cold_reset() and bus_cold_reset() which uses resettable API. > > Also introduce resettable_cold_reset_fn() which may be used as a > replacement for qdev_reset_all_fn and qbus_reset_all_fn(). > > Following patches will be needed to look at legacy reset call sites > and switch to resettable api. The legacy functions will be removed > when unused. > > Signed-off-by: Damien Hedde <damien.he...@greensocs.com> > --- > > I've removed the general helpers > + device_reset(DeviceState *dev, ResetType type) > + bus_reset(BusState *dev, ResetType type) > because with several reset types, all devices and buses will not > implement all of them. I think it is preferable to define a > type-specific helper every time it is needed for base classes > implementing the reset type (eg a device_pci_reset(PciDev*) for the > pci reset type if add that). > > So device_reset()/bus_reset() symbol names are not taken anymore. I > don't have a strong opinion of what names should have the > device_cold_reset() and bus_cold_reset() function added in this > patch. It could be device/bus_hard_reset() (the current > qbus_reset_all() comment mention we do a "hard" reset) or simply > device/bus_reset() or anything else. > What do you think ? Any better idea ? It should be consistent with > the reset type name but we can change it also if cold is not what we > want. > > Note that if we don't settle for device/bus_reset(). We can drop > the first patch that renames device_reset() to device_legacy_reset()
I think we're good the way you have things in this patchset. Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM