summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Stone <ahs3@redhat.com>2015-01-14 17:50:10 -0700
committerAl Stone <ahs3@redhat.com>2015-01-14 17:50:10 -0700
commit769e01546e2856e9ed6c4fde7258c344d0d68e4b (patch)
treefd5360bf948ccb7cb0fdfffee28d01d14533df8d
parent3b7c69318530efef02ac8043625f5e96cc6f5abc (diff)
ACPI: use Linux as ACPI_OS_NAME for _OS on ARM64acpi-osi-v0
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. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--drivers/acpi/Kconfig8
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/platform/aclinux.h4
4 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 915aa16ad79b..20677d117e96 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1,5 +1,6 @@
config ARM64
def_bool y
+ select ACPI_OS_NAME_LINUX if ACPI
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
select ARCH_BINFMT_ELF_RANDOMIZE_PIE
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 3e3bd3502449..024c5f04c8ec 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -369,6 +369,14 @@ config ACPI_REDUCED_HARDWARE_ONLY
If you are unsure what to do, do not enable this option.
+config ACPI_OS_NAME_LINUX
+ bool "Using Linux for _OS method" if EXPERT
+ def_bool n
+ When used, this option makes sure the _OS method returns
+ the value "Linux".
+
+ If you are unsure what to do, do not enable this option.
+
source "drivers/acpi/apei/Kconfig"
config ACPI_EXTLOG
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..a8a7ee35264e 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_LINUX
+#define ACPI_OS_NAME "Linux"
+#endif
+
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/ctype.h>