acpi: simplify bios_linker API by removing redundant 'table' argument
commitad9671b8700ac491564d964f79ee9d1f106756ae
authorIgor Mammedov <imammedo@redhat.com>
Thu, 19 May 2016 13:19:26 +0000 (19 15:19 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Jun 2016 12:39:27 +0000 (7 15:39 +0300)
tree54b80ad692375caf6590a5045915bbe27b38a01b
parent0e9b9edae7bebfd31fdbead4ccbbce03876a7edd
acpi: simplify bios_linker API by removing redundant 'table' argument

'table' argument in bios_linker_add_foo() commands is
a data blob of one of files also passed to the same API.
So instead of passing blob in every API call, add and keep
file name association with related blob at bios_linker_loader_alloc()
time.

And find blob by name looking up allocated file entries
inside of bios_linker_add_foo() commands.

It will:
 - make API less confusing,
 - enforce calling bios_linker_loader_alloc() before
   calling any bios_linker_add_foo()
 - make sure that blob is the correct one, i.e.
   associated with the right file name

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/aml-build.c
hw/acpi/bios-linker-loader.c
hw/acpi/nvdimm.c
hw/arm/virt-acpi-build.c
hw/i386/acpi-build.c
include/hw/acpi/bios-linker-loader.h
include/hw/mem/nvdimm.h