xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: xen-devel@lists.xen.org, julien.grall@arm.com
Cc: wei.liu2@citrix.com, Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	ian.jackson@eu.citrix.com, jbeulich@suse.com
Subject: [PATCH] libacpi: Don't build x86-only AML for ARM64 mk_dsdt
Date: Tue, 20 Dec 2016 13:51:46 -0500	[thread overview]
Message-ID: <1482259906-5990-1-git-send-email-boris.ostrovsky@oracle.com> (raw)

Commit d6ac8e22c7c5 ("acpi/x86: define ACPI IO registers for
PVH guests") broke ARM64 build of mk_dsdt.c due to introduction
of XEN_ACPI_CPU_MAP[_LEN] macros that are needed only for x86
guests.

We could fix the build by dealing specifically with those macros
but since post-MADT code is not executed on ARM64 anyway we can
compile it for x86 only.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---

Julien,

Sorry about breakage. I don't have ARM64 build environment for tools
(I do build the hypervisor) --- can you verify that it works for yoU?

 tools/libacpi/mk_dsdt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index 9421f3f..75c0a97 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -109,10 +109,10 @@ static struct option options[] = {
 
 int main(int argc, char **argv)
 {
-    unsigned int slot, dev, intx, link, cpu, max_cpus;
+    unsigned int cpu, max_cpus;
     dm_version dm_version = QEMU_XEN_TRADITIONAL;
-
 #if defined(CONFIG_X86)
+    unsigned int slot, dev, intx, link;
     max_cpus = HVM_MAX_VCPUS;
 #elif defined(CONFIG_ARM_64)
     max_cpus = GUEST_MAX_VCPUS;
@@ -242,7 +242,7 @@ int main(int argc, char **argv)
     pop_block();
     /**** DSDT DefinitionBlock end ****/
     return 0;
-#endif
+#else
 
     /* Operation Region 'PRST': bitmask of online CPUs. */
     stmt("OperationRegion", "PRST, SystemIO, %#x, %d",
@@ -524,6 +524,7 @@ int main(int argc, char **argv)
     /**** DSDT DefinitionBlock end ****/
 
     return 0;
+#endif
 }
 
 /*
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

                 reply	other threads:[~2016-12-20 18:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1482259906-5990-1-git-send-email-boris.ostrovsky@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).