qemu/hw/intc
Markus Armbruster efec3dd631 qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices together
with configuration, not code.  Unfortunately, that's not the world we
live in right now.  We still have quite a few devices that need to be
wired up by code.  If you try to device_add such a device, it'll fail
in sometimes mysterious ways.  If you're lucky, you get an
unmysterious immediate crash.

To protect users from such badness, DeviceClass member no_user used to
make device models unavailable with -device / device_add, but that
regressed in commit 18b6dad.  The device model is still omitted from
help, but is available anyway.

Attempts to fix the regression have been rejected with the argument
that the purpose of no_user isn't clear, and it's prone to misuse.

This commit clarifies no_user's purpose.  Anthony suggested to rename
it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
I shorten somewhat to keep checkpatch happy.  While there, make it
bool.

Every use of cannot_instantiate_with_device_add_yet gets a FIXME
comment asking for rationale.  The next few commits will clean them
all up, either by providing a rationale, or by getting rid of the use.

With that done, the regression fix is hopefully acceptable.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-23 00:27:22 +01:00
..
allwinner-a10-pic.c hw/intc: add allwinner A10 interrupt controller 2013-12-17 20:12:51 +00:00
apic_common.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
apic.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
arm_gic_common.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
arm_gic_kvm.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
arm_gic.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
armv7m_nvic.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
etraxfs_pic.c etraxfs_pic: QOM cast cleanup 2013-07-29 21:06:57 +02:00
exynos4210_combiner.c exynos4210_combiner: QOM cast cleanup 2013-07-29 21:06:57 +02:00
exynos4210_gic.c exynos4210_gic: QOM cast cleanup for exynos4210.irq_gate 2013-07-29 21:06:57 +02:00
gic_internal.h arm_gic: Extract headers hw/intc/arm_gic{,_common}.h 2013-11-05 17:47:29 +01:00
grlib_irqmp.c grlib_irqmp: QOM cast cleanup 2013-07-29 21:06:57 +02:00
heathrow_pic.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
i8259_common.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
i8259.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
imx_avic.c imx_avic: QOM cast cleanup 2013-07-29 21:06:05 +02:00
ioapic_common.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
ioapic.c ioapic: QOM cast cleanup 2013-07-29 21:07:02 +02:00
lm32_pic.c lm32_pic: QOM cast cleanup 2013-07-29 21:06:57 +02:00
Makefile.objs hw/intc: add allwinner A10 interrupt controller 2013-12-17 20:12:51 +00:00
omap_intc.c omap_intc: QOM'ify omap-intc and omap2-intc 2013-07-29 21:06:58 +02:00
openpic_kvm.c hw/i*: pass owner to memory_region_init* functions 2013-07-04 17:42:48 +02:00
openpic.c intc/openpic: Build openpic only once 2013-07-09 21:33:02 +02:00
pl190.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
puv3_intc.c puv3_intc: QOM cast cleanup 2013-07-29 21:06:58 +02:00
realview_gic.c realview_gic: Prepare for QOM embedding 2013-11-05 17:47:30 +01:00
sh_intc.c cpu: Make first_cpu and next_cpu CPUState 2013-07-09 21:32:54 +02:00
slavio_intctl.c slavio_intctl: QOM cast cleanup 2013-07-29 21:06:58 +02:00
xics_kvm.c xics-kvm: enable irqfd for MSI 2013-10-25 23:25:47 +02:00
xics.c spapr-rtas: replace return code constants with macros 2013-12-20 01:57:59 +01:00
xilinx_intc.c xilinx_intc: QOM cast cleanup 2013-07-29 21:06:58 +02:00