aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-12-17 14:12:52 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-17 14:12:52 +0000
commit55745005e90a9deabd3d7900e13fc850f26f9d62 (patch)
treec9218bd598fd2a7644b27a03c0c05dbed5c1f62d /hw/intc
parentd038d2645acabf6f52fd61baeaa021c3ebe97714 (diff)
parenta0c2e80afc98a9771b109eb5ce0b47edd7c78155 (diff)
downloadqemu-55745005e90a9deabd3d7900e13fc850f26f9d62.zip
qemu-55745005e90a9deabd3d7900e13fc850f26f9d62.tar.gz
qemu-55745005e90a9deabd3d7900e13fc850f26f9d62.tar.bz2
Merge tag 'pull-target-arm-20221216' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
reset refactoring queue: * remove uses of qdev_reset_all(), qbus_reset_all(), device_legacy_reset() * convert various devices to 3-phase reset, so we can remove their uses of device_class_set_parent_reset() # gpg: Signature made Fri 16 Dec 2022 21:41:11 GMT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # gpg: aka "Peter Maydell <peter@archaic.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * tag 'pull-target-arm-20221216' of https://git.linaro.org/people/pmaydell/qemu-arm: (36 commits) hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI to 3-phase reset hw/intc/xics: Convert TYPE_ICS to 3-phase reset hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset() pci: Convert child classes of TYPE_PCIE_ROOT_PORT to 3-phase reset pci: Convert TYPE_PCIE_ROOT_PORT to 3-phase reset hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE to 3-phase reset hw/virtio: Convert TYPE_VIRTIO_PCI to 3-phase reset target/xtensa: Convert to 3-phase reset target/tricore: Convert to 3-phase reset target/sparc: Convert to 3-phase reset target/sh4: Convert to 3-phase reset target/rx: Convert to 3-phase reset target/riscv: Convert to 3-phase reset target/ppc: Convert to 3-phase reset target/openrisc: Convert to 3-phase reset target/nios2: Convert to 3-phase reset target/mips: Convert to 3-phase reset target/microblaze: Convert to 3-phase reset target/m68k: Convert to 3-phase reset target/loongarch: Convert to 3-phase reset ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/xics.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index dcd021a..c7f8abd 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -564,9 +564,9 @@ static void ics_reset_irq(ICSIRQState *irq)
irq->saved_priority = 0xff;
}
-static void ics_reset(DeviceState *dev)
+static void ics_reset_hold(Object *obj)
{
- ICSState *ics = ICS(dev);
+ ICSState *ics = ICS(obj);
g_autofree uint8_t *flags = g_malloc(ics->nr_irqs);
int i;
@@ -584,7 +584,7 @@ static void ics_reset(DeviceState *dev)
if (kvm_irqchip_in_kernel()) {
Error *local_err = NULL;
- ics_set_kvm_state(ICS(dev), &local_err);
+ ics_set_kvm_state(ics, &local_err);
if (local_err) {
error_report_err(local_err);
}
@@ -593,7 +593,7 @@ static void ics_reset(DeviceState *dev)
static void ics_reset_handler(void *dev)
{
- ics_reset(dev);
+ device_cold_reset(dev);
}
static void ics_realize(DeviceState *dev, Error **errp)
@@ -688,16 +688,17 @@ static Property ics_properties[] = {
static void ics_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
dc->realize = ics_realize;
device_class_set_props(dc, ics_properties);
- dc->reset = ics_reset;
dc->vmsd = &vmstate_ics;
/*
* Reason: part of XICS interrupt controller, needs to be wired up,
* e.g. by spapr_irq_init().
*/
dc->user_creatable = false;
+ rc->phases.hold = ics_reset_hold;
}
static const TypeInfo ics_info = {