summaryrefslogtreecommitdiffstats
path: root/hw/isa/lpc_ich9.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2019-04-27 16:40:24 +0200
committerPaolo Bonzini2019-05-17 15:19:24 +0200
commit81c48dd79655296f5bf94823e8ac95902a8ac3e4 (patch)
tree0f90cb8335d6468d7da9bb64fb17d915f29fbfb6 /hw/isa/lpc_ich9.c
parenthw/acpi/piix4: Move TYPE_PIIX4_PM to a public header (diff)
downloadqemu-81c48dd79655296f5bf94823e8ac95902a8ac3e4.tar.gz
qemu-81c48dd79655296f5bf94823e8ac95902a8ac3e4.tar.xz
qemu-81c48dd79655296f5bf94823e8ac95902a8ac3e4.zip
hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity
When building with CONFIG_Q35=n, we get: LINK x86_64-softmmu/qemu-system-x86_64 /usr/bin/ld: hw/i386/acpi-build.o: in function `acpi_get_misc_info': /source/qemu/hw/i386/acpi-build.c:243: undefined reference to `ich9_lpc_find' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1 This is due to a dependency in acpi-build.c on the ICH9_LPC (via ich9_lpc_find) and PIIX4_PM (via piix4_pm_find) devices. To allow better modularity (compile acpi-build.c with only Q35/ICH9 or ISAPC/PIIX4), refactor the similar helper as object_resolve_type_unambiguous(). This way we relax the linker dependencies and can build the x86 targets with a selection of machines (instead of all of them). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190427144025.22880-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/isa/lpc_ich9.c')
-rw-r--r--hw/isa/lpc_ich9.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index ac44aa53be..031ee9cd93 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -624,17 +624,6 @@ static const MemoryRegionOps ich9_rst_cnt_ops = {
.endianness = DEVICE_LITTLE_ENDIAN
};
-Object *ich9_lpc_find(void)
-{
- bool ambig;
- Object *o = object_resolve_path_type("", TYPE_ICH9_LPC_DEVICE, &ambig);
-
- if (ambig) {
- return NULL;
- }
- return o;
-}
-
static void ich9_lpc_get_sci_int(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{