qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ppc: Convert (mostly) from device_legacy_reset() to device_cold_reset()
@ 2021-05-03 15:18 Peter Maydell
  2021-05-03 15:18 ` [PATCH 1/3] hw/intc/spapr_xive: Use device_cold_reset() instead of device_legacy_reset() Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Peter Maydell @ 2021-05-03 15:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cédric Le Goater, qemu-ppc, Greg Kurz, David Gibson

The old function device_legacy_reset() (which was originally
device_reset() and got renamed when 3-phase-reset landed) is
deprecated, because it has slightly odd semantics -- it resets the
device itself, but (unlike when a device is reset as part of system
reset) not any qbus it owns (and devices attached to the qbus).  The
replacement is device_cold_reset(), which resets the device and its
bus (if any).

For a device with child bus, the two functions are identical; this
patchset changes the PPC code which uses device_legacy_reset() on
devices which have no qbus to use device_cold_reset() instead; this
should have no functionally visible difference.

There is one other use of device_legacy_reset() in PPC code which I
didn't change: in hw/ppc/spapr_pci.c:spapr_phb_children_reset().  I
couldn't figure out what the children being reset here are and if
they might own buses.  I suspect that even if they do own buses the
right thing would be to change to device_cold_reset(), but I stuck to
only the changes I felt reasonably sure were definitely
no-behaviour-change.

NB: tested with 'make check' and 'make check-acceptance' only.

thanks
-- PMM

Peter Maydell (3):
  hw/intc/spapr_xive: Use device_cold_reset() instead of
    device_legacy_reset()
  hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset()
  hw/ppc/pnv_psi: Use device_cold_reset() instead of
    device_legacy_reset()

 hw/intc/spapr_xive.c | 2 +-
 hw/ppc/pnv_psi.c     | 4 ++--
 hw/ppc/spapr_vio.c   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-04  0:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 15:18 [PATCH 0/3] ppc: Convert (mostly) from device_legacy_reset() to device_cold_reset() Peter Maydell
2021-05-03 15:18 ` [PATCH 1/3] hw/intc/spapr_xive: Use device_cold_reset() instead of device_legacy_reset() Peter Maydell
2021-05-04  0:32   ` David Gibson
2021-05-03 15:18 ` [PATCH 2/3] hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset() Peter Maydell
2021-05-04  0:36   ` David Gibson
2021-05-03 15:18 ` [PATCH 3/3] hw/ppc/pnv_psi: Use device_cold_reset() instead of device_legacy_reset() Peter Maydell
2021-05-04  0:37   ` David Gibson
2021-05-03 16:55 ` [PATCH 0/3] ppc: Convert (mostly) from device_legacy_reset() to device_cold_reset() Philippe Mathieu-Daudé
2021-05-03 17:15   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).