[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libacpi: don't build x86-only AML for ARM64 mk_dsdt



commit 4a348565b1dcd3980168c176572cee925fcbe6d2
Author:     Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
AuthorDate: Thu Dec 22 10:56:34 2016 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Dec 22 10:56:34 2016 +0100

    libacpi: don't build x86-only AML for ARM64 mk_dsdt
    
    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@xxxxxxxxxx>
    Tested-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 tools/libacpi/mk_dsdt.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index 9421f3f..2daf32c 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -78,6 +78,7 @@ static void pop_block(void)
     printf("}\n");
 }
 
+#ifdef CONFIG_X86
 static void pci_hotplug_notify(unsigned int slt)
 {
     stmt("Notify", "\\_SB.PCI0.S%02X, EVT", slt);
@@ -99,20 +100,24 @@ static void decision_tree(
     decision_tree(s, (s+e)/2, var, leaf);
     pop_block();
 }
+#endif
 
 static struct option options[] = {
     { "maxcpu", 1, 0, 'c' },
+#ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
+#endif
     { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
 int main(int argc, char **argv)
 {
-    unsigned int slot, dev, intx, link, cpu, max_cpus;
+    unsigned int cpu, max_cpus;
+#if defined(CONFIG_X86)
     dm_version dm_version = QEMU_XEN_TRADITIONAL;
+    unsigned int slot, dev, intx, link;
 
-#if defined(CONFIG_X86)
     max_cpus = HVM_MAX_VCPUS;
 #elif defined(CONFIG_ARM_64)
     max_cpus = GUEST_MAX_VCPUS;
@@ -142,6 +147,7 @@ int main(int argc, char **argv)
             }
             break;
         }
+#ifdef CONFIG_X86
         case 'q':
             if (strcmp(optarg, "qemu-xen") == 0) {
                 dm_version = QEMU_XEN;
@@ -154,6 +160,7 @@ int main(int argc, char **argv)
                 return -1;
             }
             break;
+#endif
         case 'd':
             if (*optarg == 'y')
                 debug = true;
@@ -239,10 +246,7 @@ int main(int argc, char **argv)
 #ifdef CONFIG_ARM_64
     pop_block();
     /**** Processor end ****/
-    pop_block();
-    /**** DSDT DefinitionBlock end ****/
-    return 0;
-#endif
+#else
 
     /* Operation Region 'PRST': bitmask of online CPUs. */
     stmt("OperationRegion", "PRST, SystemIO, %#x, %d",
@@ -518,7 +522,7 @@ int main(int argc, char **argv)
 
     pop_block();
     /**** GPE end ****/
-
+#endif
 
     pop_block();
     /**** DSDT DefinitionBlock end ****/
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.