From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGPTn-00040Y-1U for qemu-devel@nongnu.org; Wed, 28 Jan 2015 05:04:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGPTj-00029B-1b for qemu-devel@nongnu.org; Wed, 28 Jan 2015 05:04:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGPTi-000292-QN for qemu-devel@nongnu.org; Wed, 28 Jan 2015 05:04:06 -0500 From: Igor Mammedov Date: Wed, 28 Jan 2015 10:03:35 +0000 Message-Id: <1422439417-5031-12-git-send-email-imammedo@redhat.com> In-Reply-To: <1422439417-5031-1-git-send-email-imammedo@redhat.com> References: <20150128072757.GA12987@redhat.com> <1422439417-5031-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 11/13] acpi: acpi_add_table() to common cross target file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, drjones@redhat.com, zhaoshenglong@huawei.com, claudio.fontana@huawei.com, marcel.a@redhat.com Signed-off-by: Igor Mammedov --- hw/acpi/acpi-build-utils.c | 6 ++++++ hw/i386/acpi-build.c | 6 ------ include/hw/acpi/acpi-build-utils.h | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c index 41341a4..fe598ff 100644 --- a/hw/acpi/acpi-build-utils.c +++ b/hw/acpi/acpi-build-utils.c @@ -29,6 +29,12 @@ #include "hw/acpi/bios-linker-loader.h" #include "qemu/module.h" +void acpi_add_table(GArray *table_offsets, GArray *table_data) +{ + uint32_t offset = cpu_to_le32(table_data->len); + g_array_append_val(table_offsets, offset); +} + GArray *build_alloc_array(void) { return g_array_new(false, true /* clear */, 1); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index c8e38ff..d923ac2 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -312,12 +312,6 @@ static void acpi_align_size(GArray *blob, unsigned align) g_array_set_size(blob, ROUND_UP(acpi_data_len(blob), align)); } -static inline void acpi_add_table(GArray *table_offsets, GArray *table_data) -{ - uint32_t offset = cpu_to_le32(table_data->len); - g_array_append_val(table_offsets, offset); -} - /* FACS */ static void build_facs(GArray *table_data, GArray *linker, PcGuestInfo *guest_info) diff --git a/include/hw/acpi/acpi-build-utils.h b/include/hw/acpi/acpi-build-utils.h index f36e23a..4bbe6b5 100644 --- a/include/hw/acpi/acpi-build-utils.h +++ b/include/hw/acpi/acpi-build-utils.h @@ -211,5 +211,6 @@ void build_package(GArray *package, uint8_t op); void build_append_value(GArray *table, uint64_t value, int size); void build_append_int(GArray *table, uint64_t value); void build_extop_package(GArray *package, uint8_t op); +void acpi_add_table(GArray *table_offsets, GArray *table_data); #endif -- 1.8.3.1