diff mbox

[01/21] FADT: enable compiling on non-x86 architectures

Message ID 1454981583-31872-2-git-send-email-al.stone@linaro.org
State Superseded
Headers show

Commit Message

Al Stone Feb. 9, 2016, 1:32 a.m. UTC
Instead of disabling the compilation of all FADT tests on non-x86 machines,
enable as much as possible, even if the tests do not yet make sense.  In
subsequent patches, we will modify the tests to acknowledge the specifics
of a given target arch.  This does not change functionality on x86, but it
does allow us to start testing portions of the FADT on other architectures.

Signed-off-by: Al Stone <al.stone@linaro.org>

---
 src/acpi/fadt/fadt.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

-- 
2.5.0
diff mbox

Patch

diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
index 0f3739b..1a5560c 100644
--- a/src/acpi/fadt/fadt.c
+++ b/src/acpi/fadt/fadt.c
@@ -20,13 +20,18 @@ 
  */
 #include "fwts.h"
 
-#ifdef FWTS_ARCH_INTEL
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef FWTS_ARCH_INTEL
 #include <sys/io.h>
+#else
+static inline int ioperm(int a, ...)
+{
+	return a * 0;
+}
+#endif
 #include <unistd.h>
 #include <inttypes.h>
 #include <string.h>
@@ -549,6 +554,7 @@  static fwts_framework_ops fadt_ops = {
 	.minor_tests = fadt_tests
 };
 
-FWTS_REGISTER("fadt", &fadt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_ACPI)
+FWTS_REGISTER("fadt", &fadt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
+	      FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_ACPI |
+	      FWTS_FLAG_TEST_COMPLIANCE_ACPI)
 
-#endif