@samitouri / QOSamiQemu / commits / 90c6cf342c

hw/pci-host/astro: Use proper region names

All 64-bit hppa machines have at least 4 Elroy PCI busses in the system. Make sure to use proper names in the qemu device tree, e.g. "elroy0" or "elroy2-pci-mmio", to be able to distinguish between the various chips. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Helge Deller committed Mar 15, 2026 at 19:00 UTC 90c6cf342ceb6df85318ef258455fe30d0d5355c
1 file changed +4 -2
hw/pci-host/astro.c
+4 -2
@@ -430,10 +430,11 @@ static void elroy_pcihost_realize(DeviceState *dev, Error **errp)
430 PCIHostState *phb = PCI_HOST_BRIDGE(dev);
431 SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
432 Object *obj = OBJECT(s);
433 + g_autofree char *elroy_mmio_name = NULL;
434
435 /* Elroy config access from CPU. */
436 memory_region_init_io(&s->this_mem, obj, &elroy_chip_ops,
436 - s, "elroy", 0x2000);
437 + s, dev->id, 0x2000);
438
439 /* Elroy PCI config. */
440 memory_region_init_io(&phb->conf_mem, obj,
@@ -448,7 +449,8 @@ static void elroy_pcihost_realize(DeviceState *dev, Error **errp)
449 &phb->data_mem);
450
451 /* Elroy PCI bus memory. */
451 - memory_region_init(&s->pci_mmio, obj, "pci-mmio", UINT64_MAX);
452 + elroy_mmio_name = g_strdup_printf("%s-pci-mmio", dev->id);
453 + memory_region_init(&s->pci_mmio, obj, elroy_mmio_name, UINT64_MAX);
454 memory_region_init_io(&s->pci_io, obj, &unassigned_io_ops, obj,
455 "pci-isa-mmio",
456 ((uint32_t) IOS_DIST_BASE_SIZE) / ROPES_PER_IOC);