mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/sysbus: Inline and remove sysbus_add_io()
sysbus_add_io(...) is a simple wrapper to memory_region_add_subregion(get_system_io(), ...). It is used in 3 places; inline it directly. Rationale: we want to move to an explicit I/O bus, rather that an implicit one. Besides in heterogeneous setup we can have more than one I/O bus. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20240216150441.45681-1-philmd@linaro.org> [PMD: Include missing "exec/address-spaces.h" header] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
40f27a785f
commit
0068b069c3
5 changed files with 8 additions and 12 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "sysemu/hw_accel.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/i386/apic_internal.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/boards.h"
|
||||
|
@ -727,7 +728,7 @@ static void vapic_realize(DeviceState *dev, Error **errp)
|
|||
VAPICROMState *s = VAPIC(dev);
|
||||
|
||||
memory_region_init_io(&s->io, OBJECT(s), &vapic_ops, s, "kvmvapic", 2);
|
||||
sysbus_add_io(sbd, VAPIC_IO_PORT, &s->io);
|
||||
memory_region_add_subregion(get_system_io(), VAPIC_IO_PORT, &s->io);
|
||||
sysbus_init_ioports(sbd, VAPIC_IO_PORT, 2);
|
||||
|
||||
option_rom[nb_option_roms].name = "kvmvapic.bin";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue