Thread (13 messages) 13 messages, 3 authors, 2015-02-04
STALE4188d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]

[PATCH v2 5/5] ACPI: arm64: use "Linux" as ACPI_OS_NAME for _OS on arm64

From: al.stone at linaro.org <hidden>
Date: 2015-02-04 00:22:30
Also in: linux-acpi, lkml
Subsystem: acpi, acpi component architecture (acpica), arm64 port (aarch64 architecture), the rest · Maintainers: "Rafael J. Wysocki", Saket Dumbre, Catalin Marinas, Will Deacon, Linus Torvalds

From: Al Stone <redacted>

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 <redacted>
Signed-off-by: Al Stone <redacted>
---
 arch/arm64/Kconfig              | 5 +++++
 include/acpi/acconfig.h         | 2 ++
 include/acpi/platform/aclinux.h | 4 ++++
 3 files changed, 11 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index d01d3f7..9a13d28 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -88,6 +88,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 5a0a3e5..1980bf4 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 1ba7c19..a871cdd 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>
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help