qemu/hw/core
Peter Maydell be1ba4d56e hw/core/bus.c: Only the main system bus can have no parent
In commit 80376c3fc2 in 2010 we added a workaround for
some qbus buses not being connected to qdev devices -- if the
bus has no parent object then we register a reset function which
resets the bus on system reset (and unregister it when the
bus is unparented).

Nearly a decade later, we have now no buses in the tree which
are created with non-NULL parents, so we can remove the
workaround and instead just assert that if the bus has a NULL
parent then it is the main system bus.

(The absence of other parentless buses was confirmed by
code inspection of all the callsites of qbus_create() and
qbus_create_inplace() and cross-checked by 'make check'.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190523150543.22676-1-peter.maydell@linaro.org
2019-06-13 15:14:03 +01:00
..
bus.c hw/core/bus.c: Only the main system bus can have no parent 2019-06-13 15:14:03 +01:00
empty_slot.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
fw-path-provider.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
generic-loader.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
hotplug.c call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
irq.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
Kconfig kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
loader-fit.c loader-fit: Wean off error_printf() 2019-04-17 21:21:49 +02:00
loader.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
machine.c edid: flip the default to enabled 2019-06-13 09:34:50 +02:00
Makefile.objs hw/core: Move null-machine into the common-obj list 2018-10-24 07:27:25 +01:00
nmi.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
null-machine.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
or-irq.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
platform-bus.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ptimer.c ptimer: Add TRIGGER_ONLY_ON_DECREMENT policy option 2018-07-09 14:51:34 +01:00
qdev-fw.c linux-user: remove nmi.c and fw-path-provider.c 2018-01-23 14:20:52 +01:00
qdev-properties-system.c block: Add qdev_prop_drive_iothread property type 2019-06-04 15:22:22 +02:00
qdev-properties.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
qdev.c qom: Move compat_props machinery from qdev to QOM 2019-03-11 22:53:44 +01:00
register.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
reset.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
split-irq.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
stream.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
sysbus.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
uboot_image.h Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00