mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
f5e0a8f42f
commit
81c48dd796
5 changed files with 16 additions and 30 deletions
|
@ -552,17 +552,6 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp)
|
|||
piix4_pm_add_propeties(s);
|
||||
}
|
||||
|
||||
Object *piix4_pm_find(void)
|
||||
{
|
||||
bool ambig;
|
||||
Object *o = object_resolve_path_type("", TYPE_PIIX4_PM, &ambig);
|
||||
|
||||
if (ambig || !o) {
|
||||
return NULL;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
|
||||
qemu_irq sci_irq, qemu_irq smi_irq,
|
||||
int smm_enabled, DeviceState **piix4_pm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue