Message ID | 20240918122753.22411-1-dave@treblig.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw/sysbus: Remove unused sysbus_mmio_unmap | expand |
On Wed, Sep 18, 2024 at 01:27:53PM +0100, dave@treblig.org wrote: > From: "Dr. David Alan Gilbert" <dave@treblig.org> > > The last use of sysbus_mmio_unmap was removed by > 981b1c6266 ("spapr/xive: rework the mapping the KVM memory regions") > > Remove it. > > Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org> > --- > hw/core/sysbus.c | 10 ---------- > include/hw/sysbus.h | 1 - > 2 files changed, 11 deletions(-) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> > > diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c > index ad34fb7344..e64d99c8ed 100644 > --- a/hw/core/sysbus.c > +++ b/hw/core/sysbus.c > @@ -154,16 +154,6 @@ static void sysbus_mmio_map_common(SysBusDevice *dev, int n, hwaddr addr, > } > } > > -void sysbus_mmio_unmap(SysBusDevice *dev, int n) > -{ > - assert(n >= 0 && n < dev->num_mmio); > - > - if (dev->mmio[n].addr != (hwaddr)-1) { > - memory_region_del_subregion(get_system_memory(), dev->mmio[n].memory); > - dev->mmio[n].addr = (hwaddr)-1; > - } > -} > - > void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr) > { > sysbus_mmio_map_common(dev, n, addr, false, 0); > diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h > index 3cb29a480e..c9b1e0e90e 100644 > --- a/include/hw/sysbus.h > +++ b/include/hw/sysbus.h > @@ -82,7 +82,6 @@ qemu_irq sysbus_get_connected_irq(SysBusDevice *dev, int n); > void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr); > void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr, > int priority); > -void sysbus_mmio_unmap(SysBusDevice *dev, int n); > > bool sysbus_realize(SysBusDevice *dev, Error **errp); > bool sysbus_realize_and_unref(SysBusDevice *dev, Error **errp); > -- > 2.46.0 > With regards, Daniel
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index ad34fb7344..e64d99c8ed 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -154,16 +154,6 @@ static void sysbus_mmio_map_common(SysBusDevice *dev, int n, hwaddr addr, } } -void sysbus_mmio_unmap(SysBusDevice *dev, int n) -{ - assert(n >= 0 && n < dev->num_mmio); - - if (dev->mmio[n].addr != (hwaddr)-1) { - memory_region_del_subregion(get_system_memory(), dev->mmio[n].memory); - dev->mmio[n].addr = (hwaddr)-1; - } -} - void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr) { sysbus_mmio_map_common(dev, n, addr, false, 0); diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 3cb29a480e..c9b1e0e90e 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -82,7 +82,6 @@ qemu_irq sysbus_get_connected_irq(SysBusDevice *dev, int n); void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr); void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr, int priority); -void sysbus_mmio_unmap(SysBusDevice *dev, int n); bool sysbus_realize(SysBusDevice *dev, Error **errp); bool sysbus_realize_and_unref(SysBusDevice *dev, Error **errp);