On Thu, 23 Jun 2022 at 11:56, Peter Delevoryas <pdel@xxxxxx> wrote: > > sysbus_address_space returns the address space associated with a > SysBusDevice. > > That address space is always the global singleton "system_memory", which > is retrieved through get_system_memory(). > > This abstraction isn't very useful. Users of the sysbus API (machine > authors) should know that sysbus_mmio_map et al. are mapping devices > into the global singleton memory region, not into a specific container > or some memory region specific to the device's parent bus. > > Lastly, only a few uses of this function exist. They can all be > refactored to just use get_system_memory() directly. Yeah, we definitely don't need two functions doing the same thing here. Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx> thanks -- PMM