Skip to content

Commit 4bb32cd

Browse files
pm215dgibson
authored andcommitted
hw/ppc/pnv_psi: Use device_cold_reset() instead of device_legacy_reset()
The pnv_psi.c code uses device_legacy_reset() for two purposes: * to reset itself from its qemu_register_reset() handler * to reset a XiveSource object it has Neither it nor the XiveSource have any qbuses, so the new device_cold_reset() function (which resets both the device and its child buses) is equivalent here to device_legacy_reset() and we can just switch to the new API. Signed-off-by: Peter Maydell <[email protected]> Message-Id: <[email protected]> Signed-off-by: David Gibson <[email protected]>
1 parent 3e1c8ba commit 4bb32cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/ppc/pnv_psi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static void pnv_psi_reset(DeviceState *dev)
466466

467467
static void pnv_psi_reset_handler(void *dev)
468468
{
469-
device_legacy_reset(DEVICE(dev));
469+
device_cold_reset(DEVICE(dev));
470470
}
471471

472472
static void pnv_psi_realize(DeviceState *dev, Error **errp)
@@ -710,7 +710,7 @@ static void pnv_psi_p9_mmio_write(void *opaque, hwaddr addr,
710710
break;
711711
case PSIHB9_INTERRUPT_CONTROL:
712712
if (val & PSIHB9_IRQ_RESET) {
713-
device_legacy_reset(DEVICE(&psi9->source));
713+
device_cold_reset(DEVICE(&psi9->source));
714714
}
715715
psi->regs[reg] = val;
716716
break;

0 commit comments

Comments
 (0)