[PATCH v2 01/23] FADT: enable compiling on non-x86 architectures
Al Stone
al.stone at linaro.org
Fri Feb 19 23:39:37 UTC 2016
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 at linaro.org>
Acked-by: Colin Ian King <colin.king at canonical.com>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
---
src/acpi/fadt/fadt.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
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
--
2.5.0
More information about the fwts-devel
mailing list