[PATCH 04/35] hw/alpha: QOM-ify AddressSpace

Akihiko Odaki posted 35 patches 1 month, 4 weeks ago
[PATCH 04/35] hw/alpha: QOM-ify AddressSpace
Posted by Akihiko Odaki 1 month, 4 weeks ago
Make AddressSpaces QOM objects to ensure that they are destroyed when
their owners are finalized and also to get a unique path for debugging
output.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
 hw/alpha/typhoon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index d2307b076897..7c38be2378ed 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -900,8 +900,8 @@ PCIBus *typhoon_init(MemoryRegion *ram, qemu_irq *p_isa_irq,
     memory_region_init_iommu(&s->pchip.iommu, sizeof(s->pchip.iommu),
                              TYPE_TYPHOON_IOMMU_MEMORY_REGION, OBJECT(s),
                              "iommu-typhoon", UINT64_MAX);
-    address_space_init(&s->pchip.iommu_as, NULL, MEMORY_REGION(&s->pchip.iommu),
-                       "pchip0-pci");
+    address_space_init(&s->pchip.iommu_as, OBJECT(s),
+                       MEMORY_REGION(&s->pchip.iommu), "pchip0-pci");
     pci_setup_iommu(b, &typhoon_iommu_ops, s);
 
     /* Pchip0 PCI special/interrupt acknowledge, 0x801.F800.0000, 64MB.  */

-- 
2.51.0
Re: [PATCH 04/35] hw/alpha: QOM-ify AddressSpace
Posted by Richard Henderson 1 month, 4 weeks ago
On 9/17/25 05:56, Akihiko Odaki wrote:
> Make AddressSpaces QOM objects to ensure that they are destroyed when
> their owners are finalized and also to get a unique path for debugging
> output.
> 
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> ---
>   hw/alpha/typhoon.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
> index d2307b076897..7c38be2378ed 100644
> --- a/hw/alpha/typhoon.c
> +++ b/hw/alpha/typhoon.c
> @@ -900,8 +900,8 @@ PCIBus *typhoon_init(MemoryRegion *ram, qemu_irq *p_isa_irq,
>       memory_region_init_iommu(&s->pchip.iommu, sizeof(s->pchip.iommu),
>                                TYPE_TYPHOON_IOMMU_MEMORY_REGION, OBJECT(s),
>                                "iommu-typhoon", UINT64_MAX);
> -    address_space_init(&s->pchip.iommu_as, NULL, MEMORY_REGION(&s->pchip.iommu),
> -                       "pchip0-pci");
> +    address_space_init(&s->pchip.iommu_as, OBJECT(s),
> +                       MEMORY_REGION(&s->pchip.iommu), "pchip0-pci");
>       pci_setup_iommu(b, &typhoon_iommu_ops, s);
>   
>       /* Pchip0 PCI special/interrupt acknowledge, 0x801.F800.0000, 64MB.  */
>