All of lore.kernel.org
 help / color / mirror / Atom feed
From: al.stone@linaro.org
To: tony.luck@intel.com, fenghua.yu@intel.com, rjw@rjwysocki.net,
	catalin.marinas@arm.com, will.deacon@arm.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, lenb@kernel.org,
	robert.moore@intel.com
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devel@acpica.org, linaro-acpi@lists.linaro.org,
	linaro-kernel@lists.linaro.org, patches@linaro.org
Subject: [PATCH 7/7] ACPI: use Linux as ACPI_OS_NAME for _OS on ARM64
Date: Thu, 22 Jan 2015 17:44:44 -0700	[thread overview]
Message-ID: <1421973884-13029-8-git-send-email-al.stone@linaro.org> (raw)
In-Reply-To: <1421973884-13029-1-git-send-email-al.stone@linaro.org>

From: Hanjun Guo <hanjun.guo@linaro.org>

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>".

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 arch/arm64/Kconfig              | 1 +
 drivers/acpi/Kconfig            | 8 ++++++++
 include/acpi/acconfig.h         | 2 ++
 include/acpi/platform/aclinux.h | 4 ++++
 4 files changed, 15 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 915aa16..20677d1 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 3e3bd35..024c5f0 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 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..a8a7ee3 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>
-- 
2.1.0


WARNING: multiple messages have this Message-ID (diff)
From: al.stone@linaro.org (al.stone at linaro.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/7] ACPI: use Linux as ACPI_OS_NAME for _OS on ARM64
Date: Thu, 22 Jan 2015 17:44:44 -0700	[thread overview]
Message-ID: <1421973884-13029-8-git-send-email-al.stone@linaro.org> (raw)
In-Reply-To: <1421973884-13029-1-git-send-email-al.stone@linaro.org>

From: Hanjun Guo <hanjun.guo@linaro.org>

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>".

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 arch/arm64/Kconfig              | 1 +
 drivers/acpi/Kconfig            | 8 ++++++++
 include/acpi/acconfig.h         | 2 ++
 include/acpi/platform/aclinux.h | 4 ++++
 4 files changed, 15 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 915aa16..20677d1 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 3e3bd35..024c5f0 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 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..a8a7ee3 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>
-- 
2.1.0

WARNING: multiple messages have this Message-ID (diff)
From: al.stone@linaro.org
To: tony.luck@intel.com, fenghua.yu@intel.com, rjw@rjwysocki.net,
	catalin.marinas@arm.com, will.deacon@arm.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, lenb@kernel.org,
	robert.moore@intel.com
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devel@acpica.org, linaro-acpi@lists.linaro.org,
	linaro-kernel@lists.linaro.org, patches@linaro.org
Subject: [PATCH 7/7] ACPI: use Linux as ACPI_OS_NAME for _OS on ARM64
Date: Fri, 23 Jan 2015 00:44:44 +0000	[thread overview]
Message-ID: <1421973884-13029-8-git-send-email-al.stone@linaro.org> (raw)
In-Reply-To: <1421973884-13029-1-git-send-email-al.stone@linaro.org>

From: Hanjun Guo <hanjun.guo@linaro.org>

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>".

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 arch/arm64/Kconfig              | 1 +
 drivers/acpi/Kconfig            | 8 ++++++++
 include/acpi/acconfig.h         | 2 ++
 include/acpi/platform/aclinux.h | 4 ++++
 4 files changed, 15 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 915aa16..20677d1 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 3e3bd35..024c5f0 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 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..a8a7ee3 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>
-- 
2.1.0


  parent reply	other threads:[~2015-01-23  0:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23  0:44 [PATCH 0/7] Start deprecating _OSI on new architectures al.stone
2015-01-23  0:44 ` al.stone
2015-01-23  0:44 ` al.stone at linaro.org
2015-01-23  0:44 ` [PATCH 1/7] ia64: ACPI: move kernel acpi files to a directory al.stone
2015-01-23  0:44   ` al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23  0:49   ` Al Stone
2015-01-23  0:49     ` Al Stone
2015-01-23  0:49     ` Al Stone
2015-01-23  0:44 ` [PATCH 2/7] arm64: " al.stone
2015-01-23  0:44   ` al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23  0:44 ` [PATCH 3/7] x86: ACPI: create arch-dependent version of acpi_osi_handler() al.stone
2015-01-23  0:44   ` al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23  0:44 ` [PATCH 4/7] ia64: " al.stone
2015-01-23  0:44   ` al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23  0:44 ` [PATCH 5/7] arm64: " al.stone
2015-01-23  0:44   ` al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23  0:44 ` [PATCH 6/7] x86: ia64: arm64: ACPI: move _OSI support functions to arch-dependent locations al.stone
2015-01-23  0:44   ` al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23  0:44 ` al.stone [this message]
2015-01-23  0:44   ` [PATCH 7/7] ACPI: use Linux as ACPI_OS_NAME for _OS on ARM64 al.stone
2015-01-23  0:44   ` al.stone at linaro.org
2015-01-23 15:55   ` Rafael J. Wysocki
2015-01-23 15:55     ` Rafael J. Wysocki
2015-01-23 15:55     ` Rafael J. Wysocki
2015-01-23 16:34     ` Al Stone
2015-01-23 16:34       ` [Devel] " Al Stone
2015-01-23 16:34       ` Al Stone
2015-01-23 16:34       ` Al Stone
2015-01-23 15:43 ` [PATCH 0/7] Start deprecating _OSI on new architectures Rafael J. Wysocki
2015-01-23 15:43   ` Rafael J. Wysocki
2015-01-23 15:43   ` Rafael J. Wysocki
2015-01-23 16:32   ` Al Stone
2015-01-23 16:33     ` [Devel] " Al Stone
2015-01-23 16:32     ` Al Stone
2015-01-23 16:32     ` Al Stone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421973884-13029-8-git-send-email-al.stone@linaro.org \
    --to=al.stone@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=devel@acpica.org \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=patches@linaro.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.