[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/29] hw/arm: Convert TYPE_ARM_SMMU to 3-phase reset
From: |
Peter Maydell |
Subject: |
[PULL 17/29] hw/arm: Convert TYPE_ARM_SMMU to 3-phase reset |
Date: |
Thu, 15 Dec 2022 12:49:57 +0000 |
Convert the TYPE_ARM_SMMU device to 3-phase reset. The legacy method
doesn't do anything that's invalid in the hold phase, so the
conversion is simple and not a behaviour change.
Note that we must convert this base class before we can convert the
TYPE_ARM_SMMUV3 subclass -- transitional support in Resettable
handles "chain to parent class reset" when the base class is 3-phase
and the subclass is still using legacy reset, but not the other way
around.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20221109161444.3397405-2-peter.maydell@linaro.org
---
hw/arm/smmu-common.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
index e09b9c13b74..220838525d4 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -526,9 +526,9 @@ static void smmu_base_realize(DeviceState *dev, Error
**errp)
}
}
-static void smmu_base_reset(DeviceState *dev)
+static void smmu_base_reset_hold(Object *obj)
{
- SMMUState *s = ARM_SMMU(dev);
+ SMMUState *s = ARM_SMMU(obj);
g_hash_table_remove_all(s->configs);
g_hash_table_remove_all(s->iotlb);
@@ -543,12 +543,13 @@ static Property smmu_dev_properties[] = {
static void smmu_base_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
SMMUBaseClass *sbc = ARM_SMMU_CLASS(klass);
device_class_set_props(dc, smmu_dev_properties);
device_class_set_parent_realize(dc, smmu_base_realize,
&sbc->parent_realize);
- dc->reset = smmu_base_reset;
+ rc->phases.hold = smmu_base_reset_hold;
}
static const TypeInfo smmu_base_info = {
--
2.25.1
- [PULL 06/29] hw/arm/virt: Add 'compact-highmem' property, (continued)
- [PULL 06/29] hw/arm/virt: Add 'compact-highmem' property, Peter Maydell, 2022/12/15
- [PULL 05/29] hw/arm/virt: Improve high memory region address assignment, Peter Maydell, 2022/12/15
- [PULL 07/29] hw/arm/virt: Add properties to disable high memory regions, Peter Maydell, 2022/12/15
- [PULL 02/29] hw/arm/virt: Rename variable size to region_size in virt_set_high_memmap(), Peter Maydell, 2022/12/15
- [PULL 09/29] target/arm: Add Cortex-A55 CPU, Peter Maydell, 2022/12/15
- [PULL 11/29] target/arm: Allow relevant HCR bits to be written for FEAT_EVT, Peter Maydell, 2022/12/15
- [PULL 10/29] hw/intc/arm_gicv3: Fix GICD_TYPER ITLinesNumber advertisement, Peter Maydell, 2022/12/15
- [PULL 12/29] target/arm: Implement HCR_EL2.TTLBIS traps, Peter Maydell, 2022/12/15
- [PULL 13/29] target/arm: Implement HCR_EL2.TTLBOS traps, Peter Maydell, 2022/12/15
- [PULL 15/29] target/arm: Implement HCR_EL2.TID4 traps, Peter Maydell, 2022/12/15
- [PULL 17/29] hw/arm: Convert TYPE_ARM_SMMU to 3-phase reset,
Peter Maydell <=
- [PULL 14/29] target/arm: Implement HCR_EL2.TICAB,TOCU traps, Peter Maydell, 2022/12/15
- [PULL 21/29] hw/intc: Convert TYPE_ARM_GICV3_COMMON to 3-phase reset, Peter Maydell, 2022/12/15
- [PULL 19/29] hw/intc: Convert TYPE_ARM_GIC_COMMON to 3-phase reset, Peter Maydell, 2022/12/15
- [PULL 08/29] hw/arm/virt: build SMBIOS 19 table, Peter Maydell, 2022/12/15
- [PULL 29/29] target/arm: Restrict arm_cpu_exec_interrupt() to TCG accelerator, Peter Maydell, 2022/12/15
- [PULL 22/29] hw/intc: Convert TYPE_KVM_ARM_GICV3 to 3-phase reset, Peter Maydell, 2022/12/15
- [PULL 23/29] hw/intc: Convert TYPE_ARM_GICV3_ITS_COMMON to 3-phase reset, Peter Maydell, 2022/12/15
- [PULL 28/29] hw/misc: Move some arm-related files from specific_ss into softmmu_ss, Peter Maydell, 2022/12/15
- [PULL 25/29] hw/intc: Convert TYPE_KVM_ARM_ITS to 3-phase reset, Peter Maydell, 2022/12/15
- [PULL 18/29] hw/arm: Convert TYPE_ARM_SMMUV3 to 3-phase reset, Peter Maydell, 2022/12/15