Re: [Qemu-block] [PATCH v3 03/33] Replace all call to device_reset by call to device_legacy_reset
On Mon, Jul 29, 2019 at 04:56:24PM +0200, Damien Hedde wrote: > Signed-off-by: Damien Hedde I don't see a lot of point keeping this patch separate from the previous one. > --- > hw/audio/intel-hda.c | 2 +- > hw/hyperv/hyperv.c | 2 +- > hw/i386/pc.c | 2 +- > hw/ide/microdrive.c | 8 > hw/intc/spapr_xive.c | 2 +- > hw/ppc/pnv_psi.c | 2 +- > hw/ppc/spapr_pci.c | 2 +- > hw/ppc/spapr_vio.c | 2 +- > hw/s390x/s390-pci-inst.c | 2 +- > hw/scsi/vmw_pvscsi.c | 2 +- > hw/sd/omap_mmc.c | 2 +- > hw/sd/pl181.c| 2 +- > 12 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c > index b78baac295..f133684b10 100644 > --- a/hw/audio/intel-hda.c > +++ b/hw/audio/intel-hda.c > @@ -1086,7 +1086,7 @@ static void intel_hda_reset(DeviceState *dev) > QTAILQ_FOREACH(kid, &d->codecs.qbus.children, sibling) { > DeviceState *qdev = kid->child; > cdev = HDA_CODEC_DEVICE(qdev); > -device_reset(DEVICE(cdev)); > +device_legacy_reset(DEVICE(cdev)); > d->state_sts |= (1 << cdev->cad); > } > intel_hda_update_irq(d); > diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c > index 6ebf31c310..cd9db3cb5c 100644 > --- a/hw/hyperv/hyperv.c > +++ b/hw/hyperv/hyperv.c > @@ -140,7 +140,7 @@ void hyperv_synic_reset(CPUState *cs) > SynICState *synic = get_synic(cs); > > if (synic) { > -device_reset(DEVICE(synic)); > +device_legacy_reset(DEVICE(synic)); > } > } > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 549c437050..c0f20fe8aa 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -2823,7 +2823,7 @@ static void pc_machine_reset(MachineState *machine) > cpu = X86_CPU(cs); > > if (cpu->apic_state) { > -device_reset(cpu->apic_state); > +device_legacy_reset(cpu->apic_state); > } > } > } > diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c > index 92ee6e0af8..fc346f5ad5 100644 > --- a/hw/ide/microdrive.c > +++ b/hw/ide/microdrive.c > @@ -173,7 +173,7 @@ static void md_attr_write(PCMCIACardState *card, uint32_t > at, uint8_t value) > case 0x00: /* Configuration Option Register */ > s->opt = value & 0xcf; > if (value & OPT_SRESET) { > -device_reset(DEVICE(s)); > +device_legacy_reset(DEVICE(s)); > } > md_interrupt_update(s); > break; > @@ -316,7 +316,7 @@ static void md_common_write(PCMCIACardState *card, > uint32_t at, uint16_t value) > case 0xe:/* Device Control */ > s->ctrl = value; > if (value & CTRL_SRST) { > -device_reset(DEVICE(s)); > +device_legacy_reset(DEVICE(s)); > } > md_interrupt_update(s); > break; > @@ -541,7 +541,7 @@ static int dscm1_attach(PCMCIACardState *card) > md->attr_base = pcc->cis[0x74] | (pcc->cis[0x76] << 8); > md->io_base = 0x0; > > -device_reset(DEVICE(md)); > +device_legacy_reset(DEVICE(md)); > md_interrupt_update(md); > > return 0; > @@ -551,7 +551,7 @@ static int dscm1_detach(PCMCIACardState *card) > { > MicroDriveState *md = MICRODRIVE(card); > > -device_reset(DEVICE(md)); > +device_legacy_reset(DEVICE(md)); > return 0; > } > > diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c > index 3ae311d9ff..22e11ad10c 100644 > --- a/hw/intc/spapr_xive.c > +++ b/hw/intc/spapr_xive.c > @@ -1511,7 +1511,7 @@ static target_ulong h_int_reset(PowerPCCPU *cpu, > return H_PARAMETER; > } > > -device_reset(DEVICE(xive)); > +device_legacy_reset(DEVICE(xive)); > > if (kvm_irqchip_in_kernel()) { > Error *local_err = NULL; > diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c > index d7b6f5d75b..78eafa353a 100644 > --- a/hw/ppc/pnv_psi.c > +++ b/hw/ppc/pnv_psi.c > @@ -703,7 +703,7 @@ static void pnv_psi_p9_mmio_write(void *opaque, hwaddr > addr, > break; > case PSIHB9_INTERRUPT_CONTROL: > if (val & PSIHB9_IRQ_RESET) { > -device_reset(DEVICE(&psi9->source)); > +device_legacy_reset(DEVICE(&psi9->source)); > } > psi->regs[reg] = val; > break; > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 9003fe9010..3c6cf79a5e 100644 > --- a/hw/ppc/spapr_pci.c > +++ b/hw/ppc/spapr_pci.c > @@ -2029,7 +2029,7 @@ static int spapr_phb_children_reset(Object *child, void > *opaque) > DeviceState *dev = (DeviceState *) object_dynamic_cast(child, > TYPE_DEVICE); > > if (dev) { > -device_reset(dev); > +device_legacy_reset(dev); > } > > return 0; > diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c > index 583c13deda..5a0b5cc35c 100644 > --- a/hw/ppc/spapr_vio.c > +++ b/hw/ppc/spapr_vio.c > @@ -306,7 +306,7 @@ int spapr_vio_send_crq(SpaprVioDevice *dev, uint8_t *crq) >
[Qemu-block] [PATCH v3 03/33] Replace all call to device_reset by call to device_legacy_reset
Signed-off-by: Damien Hedde --- hw/audio/intel-hda.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/i386/pc.c | 2 +- hw/ide/microdrive.c | 8 hw/intc/spapr_xive.c | 2 +- hw/ppc/pnv_psi.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_vio.c | 2 +- hw/s390x/s390-pci-inst.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/sd/omap_mmc.c | 2 +- hw/sd/pl181.c| 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index b78baac295..f133684b10 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -1086,7 +1086,7 @@ static void intel_hda_reset(DeviceState *dev) QTAILQ_FOREACH(kid, &d->codecs.qbus.children, sibling) { DeviceState *qdev = kid->child; cdev = HDA_CODEC_DEVICE(qdev); -device_reset(DEVICE(cdev)); +device_legacy_reset(DEVICE(cdev)); d->state_sts |= (1 << cdev->cad); } intel_hda_update_irq(d); diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 6ebf31c310..cd9db3cb5c 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -140,7 +140,7 @@ void hyperv_synic_reset(CPUState *cs) SynICState *synic = get_synic(cs); if (synic) { -device_reset(DEVICE(synic)); +device_legacy_reset(DEVICE(synic)); } } diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 549c437050..c0f20fe8aa 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -2823,7 +2823,7 @@ static void pc_machine_reset(MachineState *machine) cpu = X86_CPU(cs); if (cpu->apic_state) { -device_reset(cpu->apic_state); +device_legacy_reset(cpu->apic_state); } } } diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 92ee6e0af8..fc346f5ad5 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -173,7 +173,7 @@ static void md_attr_write(PCMCIACardState *card, uint32_t at, uint8_t value) case 0x00: /* Configuration Option Register */ s->opt = value & 0xcf; if (value & OPT_SRESET) { -device_reset(DEVICE(s)); +device_legacy_reset(DEVICE(s)); } md_interrupt_update(s); break; @@ -316,7 +316,7 @@ static void md_common_write(PCMCIACardState *card, uint32_t at, uint16_t value) case 0xe: /* Device Control */ s->ctrl = value; if (value & CTRL_SRST) { -device_reset(DEVICE(s)); +device_legacy_reset(DEVICE(s)); } md_interrupt_update(s); break; @@ -541,7 +541,7 @@ static int dscm1_attach(PCMCIACardState *card) md->attr_base = pcc->cis[0x74] | (pcc->cis[0x76] << 8); md->io_base = 0x0; -device_reset(DEVICE(md)); +device_legacy_reset(DEVICE(md)); md_interrupt_update(md); return 0; @@ -551,7 +551,7 @@ static int dscm1_detach(PCMCIACardState *card) { MicroDriveState *md = MICRODRIVE(card); -device_reset(DEVICE(md)); +device_legacy_reset(DEVICE(md)); return 0; } diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 3ae311d9ff..22e11ad10c 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -1511,7 +1511,7 @@ static target_ulong h_int_reset(PowerPCCPU *cpu, return H_PARAMETER; } -device_reset(DEVICE(xive)); +device_legacy_reset(DEVICE(xive)); if (kvm_irqchip_in_kernel()) { Error *local_err = NULL; diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index d7b6f5d75b..78eafa353a 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -703,7 +703,7 @@ static void pnv_psi_p9_mmio_write(void *opaque, hwaddr addr, break; case PSIHB9_INTERRUPT_CONTROL: if (val & PSIHB9_IRQ_RESET) { -device_reset(DEVICE(&psi9->source)); +device_legacy_reset(DEVICE(&psi9->source)); } psi->regs[reg] = val; break; diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 9003fe9010..3c6cf79a5e 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -2029,7 +2029,7 @@ static int spapr_phb_children_reset(Object *child, void *opaque) DeviceState *dev = (DeviceState *) object_dynamic_cast(child, TYPE_DEVICE); if (dev) { -device_reset(dev); +device_legacy_reset(dev); } return 0; diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 583c13deda..5a0b5cc35c 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr_vio.c @@ -306,7 +306,7 @@ int spapr_vio_send_crq(SpaprVioDevice *dev, uint8_t *crq) static void spapr_vio_quiesce_one(SpaprVioDevice *dev) { if (dev->tcet) { -device_reset(DEVICE(dev->tcet)); +device_legacy_reset(DEVICE(dev->tcet)); } free_crq(dev); } diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 00235148be..93cda37c27 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -242,7 +242,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_t ra)