Patchwork [1/3] acpi: move declarations from pc.h to acpi.h

login
register
mail settings
Submitter Michael S. Tsirkin
Date April 15, 2013, 9:37 a.m.
Message ID <5899f1a3f5671520e17a6a3779c6defa5ae4a6e9.1366018642.git.mst@redhat.com>
Download mbox | patch
Permalink /patch/236545/
State New
Headers show

Comments

Michael S. Tsirkin - April 15, 2013, 9:37 a.m.
Functions defined in acpi/ should be declared in
acpi.h

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 arch_init.c            |  1 +
 hw/i386/pc.c           |  1 +
 hw/i386/pc_piix.c      |  1 +
 include/hw/acpi/acpi.h | 10 ++++++++++
 include/hw/i386/pc.h   |  8 --------
 5 files changed, 13 insertions(+), 8 deletions(-)
Paolo Bonzini - April 15, 2013, 10:42 a.m.
Il 15/04/2013 11:37, Michael S. Tsirkin ha scritto:
> +/* acpi.c */
> +extern int acpi_enabled;
> +extern char unsigned *acpi_tables;
> +extern size_t acpi_tables_len;
> +
> +void acpi_table_install(const char unsigned *blob, size_t bloblen,
> +                        bool has_header, const struct AcpiTableOptions *hdrs,
> +                        Error **errp);

This function is static, I've fixed it up and will include it in the hw/
fixups pull request.

I picked up patch 3 as well, I'll leave 2 to Laszlo.

Paolo

> +void acpi_table_add(const QemuOpts *opts, Error **errp);
Laszlo Ersek - April 15, 2013, 11 a.m.
On 04/15/13 12:42, Paolo Bonzini wrote:
> Il 15/04/2013 11:37, Michael S. Tsirkin ha scritto:
>> +/* acpi.c */
>> +extern int acpi_enabled;
>> +extern char unsigned *acpi_tables;
>> +extern size_t acpi_tables_len;
>> +
>> +void acpi_table_install(const char unsigned *blob, size_t bloblen,
>> +                        bool has_header, const struct AcpiTableOptions *hdrs,
>> +                        Error **errp);
> 
> This function is static, I've fixed it up and will include it in the hw/
> fixups pull request.
> 
> I picked up patch 3 as well, I'll leave 2 to Laszlo.
> 
> Paolo
> 
>> +void acpi_table_add(const QemuOpts *opts, Error **errp);

Doesn't this series conflict with my pending
<http://lists.nongnu.org/archive/html/qemu-devel/2013-04/msg01427.html>?

Thanks
Laszlo
Paolo Bonzini - April 15, 2013, 11 a.m.
Il 15/04/2013 13:00, Laszlo Ersek ha scritto:
>> > 
>>> >> +void acpi_table_add(const QemuOpts *opts, Error **errp);
> Doesn't this series conflict with my pending
> <http://lists.nongnu.org/archive/html/qemu-devel/2013-04/msg01427.html>?

Yeah, but the conflicts are trivial.

Paolo

Patch

diff --git a/arch_init.c b/arch_init.c
index 769ce77..fba0889 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -49,6 +49,7 @@ 
 #include "qmp-commands.h"
 #include "trace.h"
 #include "exec/cpu-all.h"
+#include "hw/acpi/acpi.h"
 
 #ifdef DEBUG_ARCH_INIT
 #define DPRINTF(fmt, ...) \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 8d75b34..0d6e72b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -52,6 +52,7 @@ 
 #include "sysemu/arch_init.h"
 #include "qemu/bitmap.h"
 #include "qemu/config-file.h"
+#include "hw/acpi/acpi.h"
 
 /* debug PC/ISA interrupts */
 //#define DEBUG_IRQ
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index cff8013..943758a 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -43,6 +43,7 @@ 
 #include "hw/xen/xen.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
+#include "hw/acpi/acpi.h"
 #include "cpu.h"
 #ifdef CONFIG_XEN
 #  include <xen/hvm/hvm_info_table.h>
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index e18ef28..80e955d 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -154,4 +154,14 @@  void acpi_gpe_reset(ACPIREGS *ar);
 void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val);
 uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr);
 
+/* acpi.c */
+extern int acpi_enabled;
+extern char unsigned *acpi_tables;
+extern size_t acpi_tables_len;
+
+void acpi_table_install(const char unsigned *blob, size_t bloblen,
+                        bool has_header, const struct AcpiTableOptions *hdrs,
+                        Error **errp);
+void acpi_table_add(const QemuOpts *opts, Error **errp);
+
 #endif /* !QEMU_HW_ACPI_H */
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 5d40914..9bcc819 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -107,14 +107,6 @@  void cpu_smm_register(cpu_set_smm_t callback, void *arg);
 
 void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
 
-/* acpi.c */
-extern int acpi_enabled;
-extern char unsigned *acpi_tables;
-extern size_t acpi_tables_len;
-
-void acpi_bios_init(void);
-void acpi_table_add(const QemuOpts *opts, Error **errp);
-
 /* acpi_piix.c */
 
 i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,