summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Stone <al.stone@linaro.org>2015-01-23 17:57:44 -0700
committerAl Stone <ahs3@redhat.com>2015-02-24 17:34:44 -0700
commit2dffdd6b9fbf2fbf014e9474b501b2b6602b7199 (patch)
treed187c2cdb99b752cb063312be9740be3b4c3d8c6
parentae72e283ce71be1237f4ad699532bf553abe9c52 (diff)
ACPI: arm64: use "Linux" as ACPI_OS_NAME for _OS on arm64acpi-osi-v3
ACPI_OS_NAME is globally defined as "Microsoft Windows NT" for now. That doesn't make much sense in the ARM context, so set it to "Linux" when CONFIG_ARM64. If it is necessary to change the return value from \_OS_ (that is, return some value other than the default in ACPI_OS_NAME), use the kernel parameter "acpi_os_name=<string>". Many thanks to Rafael Wysocki for this greatly simplified form of the patch. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Al Stone <al.stone@linaro.org>
-rw-r--r--arch/arm64/Kconfig5
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/platform/aclinux.h4
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fc8f0c5fb732..7a137ac399b3 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -87,6 +87,11 @@ config ARM64
config 64BIT
def_bool y
+config ACPI_OS_NAME
+ string
+ default "Linux"
+ depends on ACPI
+
config ARCH_PHYS_ADDR_T_64BIT
def_bool y
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 5a0a3e5daf85..1980bf47127b 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -69,7 +69,9 @@
* code that will not execute the _OSI method unless _OS matches the string
* below. Therefore, change this string at your own risk.
*/
+#ifndef ACPI_OS_NAME
#define ACPI_OS_NAME "Microsoft Windows NT"
+#endif
/* Maximum objects in the various object caches */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 1ba7c190c2cc..a871cdd6d79e 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -69,6 +69,10 @@
#define ACPI_REDUCED_HARDWARE 1
#endif
+#ifdef CONFIG_ACPI_OS_NAME
+#define ACPI_OS_NAME CONFIG_ACPI_OS_NAME
+#endif
+
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/ctype.h>