All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Aleksandar Rikalo" <arikalo@wavecomp.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Corey Minyard" <minyard@acm.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [PATCH v2 6/6] vl: Do not set acpi_enabled when ACPI is disabled at build time
Date: Sun, 28 Apr 2019 08:47:31 +0200	[thread overview]
Message-ID: <20190428064731.29913-7-philmd@redhat.com> (raw)
In-Reply-To: <20190428064731.29913-1-philmd@redhat.com>

When building with CONFIG_ACPI disabled, the 'acpi_enabled' is
still initialized to '1' (enabled).

Remove the confusion by moving the variable to hw/core/acpi.c,
and adding a similar stub.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/acpi/core.c | 1 +
 stubs/acpi.c   | 2 ++
 vl.c           | 1 -
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 9ed1629f367..b2730aec8a0 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -59,6 +59,7 @@ static const char unsigned dfl_hdr[ACPI_TABLE_HDR_SIZE - ACPI_TABLE_PFX_SIZE] =
     "QEMU\1\0\0\0"           /* ASL compiler ID (4), version (4) */
     ;
 
+int acpi_enabled = 1;
 char unsigned *acpi_tables;
 size_t acpi_tables_len;
 
diff --git a/stubs/acpi.c b/stubs/acpi.c
index cd0119f9fb1..f1ef6b8e795 100644
--- a/stubs/acpi.c
+++ b/stubs/acpi.c
@@ -23,6 +23,8 @@
 #include "qapi/qmp/qerror.h"
 #include "hw/acpi/acpi.h"
 
+int acpi_enabled;
+
 size_t acpi_tables_len;
 
 char unsigned *acpi_tables;
diff --git a/vl.c b/vl.c
index ff5dfb6fbc3..c9364b4ec10 100644
--- a/vl.c
+++ b/vl.c
@@ -166,7 +166,6 @@ int smp_cpus;
 unsigned int max_cpus;
 int smp_cores = 1;
 int smp_threads = 1;
-int acpi_enabled = 1;
 int no_hpet = 0;
 int fd_bootchk = 1;
 static int no_reboot;
-- 
2.20.1

WARNING: multiple messages have this Message-ID (diff)
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Corey Minyard" <minyard@acm.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Aleksandar Rikalo" <arikalo@wavecomp.com>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH v2 6/6] vl: Do not set acpi_enabled when ACPI is disabled at build time
Date: Sun, 28 Apr 2019 08:47:31 +0200	[thread overview]
Message-ID: <20190428064731.29913-7-philmd@redhat.com> (raw)
Message-ID: <20190428064731.EXAwxOQnbu9Mbd8iqXnE9gB7LH-f7Y0YpEKJTkju7eo@z> (raw)
In-Reply-To: <20190428064731.29913-1-philmd@redhat.com>

When building with CONFIG_ACPI disabled, the 'acpi_enabled' is
still initialized to '1' (enabled).

Remove the confusion by moving the variable to hw/core/acpi.c,
and adding a similar stub.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/acpi/core.c | 1 +
 stubs/acpi.c   | 2 ++
 vl.c           | 1 -
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 9ed1629f367..b2730aec8a0 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -59,6 +59,7 @@ static const char unsigned dfl_hdr[ACPI_TABLE_HDR_SIZE - ACPI_TABLE_PFX_SIZE] =
     "QEMU\1\0\0\0"           /* ASL compiler ID (4), version (4) */
     ;
 
+int acpi_enabled = 1;
 char unsigned *acpi_tables;
 size_t acpi_tables_len;
 
diff --git a/stubs/acpi.c b/stubs/acpi.c
index cd0119f9fb1..f1ef6b8e795 100644
--- a/stubs/acpi.c
+++ b/stubs/acpi.c
@@ -23,6 +23,8 @@
 #include "qapi/qmp/qerror.h"
 #include "hw/acpi/acpi.h"
 
+int acpi_enabled;
+
 size_t acpi_tables_len;
 
 char unsigned *acpi_tables;
diff --git a/vl.c b/vl.c
index ff5dfb6fbc3..c9364b4ec10 100644
--- a/vl.c
+++ b/vl.c
@@ -166,7 +166,6 @@ int smp_cpus;
 unsigned int max_cpus;
 int smp_cores = 1;
 int smp_threads = 1;
-int acpi_enabled = 1;
 int no_hpet = 0;
 int fd_bootchk = 1;
 static int no_reboot;
-- 
2.20.1



  parent reply	other threads:[~2019-04-28  6:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28  6:47 [Qemu-devel] [PATCH v2 0/6] hw/acpi: Improve build modularity (targeting MIPS/PPC) Philippe Mathieu-Daudé
2019-04-28  6:47 ` Philippe Mathieu-Daudé
2019-04-28  6:47 ` [Qemu-devel] [PATCH v2 1/6] hw/acpi: Move the IPMI stub to the stubs/ directory Philippe Mathieu-Daudé
2019-04-28  6:47   ` Philippe Mathieu-Daudé
2019-05-02 13:24   ` Corey Minyard
2019-05-02 13:24     ` Corey Minyard
2019-05-02 16:28     ` Philippe Mathieu-Daudé
2019-05-02 16:28       ` Philippe Mathieu-Daudé
2019-04-28  6:47 ` [Qemu-devel] [PATCH v2 2/6] hw/acpi: Move the ACPI " Philippe Mathieu-Daudé
2019-04-28  6:47   ` Philippe Mathieu-Daudé
2019-04-28  6:47 ` [Qemu-devel] [PATCH v2 3/6] hw/acpi: Simplify the Makefile logic Philippe Mathieu-Daudé
2019-04-28  6:47   ` Philippe Mathieu-Daudé
2019-04-28  6:47 ` [Qemu-devel] [PATCH v2 4/6] hw/acpi: Always build the 'core' ACPI functions Philippe Mathieu-Daudé
2019-04-28  6:47   ` Philippe Mathieu-Daudé
2019-04-28  6:47 ` [Qemu-devel] [PATCH v2 5/6] stubs: Add missing ACPI symbols Philippe Mathieu-Daudé
2019-04-28  6:47   ` Philippe Mathieu-Daudé
2019-04-28  6:47 ` Philippe Mathieu-Daudé [this message]
2019-04-28  6:47   ` [Qemu-devel] [PATCH v2 6/6] vl: Do not set acpi_enabled when ACPI is disabled at build time Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190428064731.29913-7-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=imammedo@redhat.com \
    --cc=minyard@acm.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.