Message ID | 20230208000743.79415-1-philmd@linaro.org |
---|---|
Headers | show |
Series | hw/ide: Untangle ISA/PCI abuses of ide_init_ioport() | expand |
On 8/2/23 01:07, Philippe Mathieu-Daudé wrote: > Background thread: > https://lore.kernel.org/qemu-devel/5095dffc-309b-6c72-d255-8cdaa6fd3d52@ilande.co.uk/ > > The ide_init_ioport() method expect an ISA device, but is > massaged to accept NULL device (IOW, non-ISA devices...). > > A plausible explanation is QOM objects can only inherit one > parent, and ide_init_ioport() was first used with ISA children. > Later it was adapted to accept PCI children in a convoluted > way. The PIIX IDE function abuse it. > > This series rename the current ide_init_ioport() as > ide_init_ioport_isa(), then add a generic ide_init_ioport() > which works with PCI devices. > > This is required to proceed with more PIIX cleanups. > > Philippe Mathieu-Daudé (7): > hw/isa: Un-inline isa_bus_from_device() > hw/isa: Use isa_address_space_io() to reduce access on global 'isabus' > hw/ide: Rename ISA specific ide_init_ioport() as ide_init_ioport_isa() > hw/ide: Introduce generic ide_init_ioport() > hw/ide/piix: Use generic ide_init_ioport() > hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device > hw/ide/piix: Remove dead code in pci_piix_init_ports() Forgot: Based-on: <20230207234615.77300-1-philmd@linaro.org> "exec/ioport: Factor portio_list_register[flush_coalesced]() out" https://lore.kernel.org/qemu-devel/20230207234615.77300-1-philmd@linaro.org/