public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hanjun Guo <hanjun.guo@linaro.org>
To: "Moore, Robert" <robert.moore@intel.com>
Cc: "'Rafael J. Wysocki'" <rjw@sisk.pl>,
	'Len Brown' <lenb@kernel.org>,
	"Box, David E" <david.e.box@intel.com>,
	"Zheng, Lv" <lv.zheng@intel.com>,
	"'linux-acpi@vger.kernel.org'" <linux-acpi@vger.kernel.org>,
	"'patches@linaro.org'" <patches@linaro.org>,
	"'linaro-kernel@lists.linaro.org'"
	<linaro-kernel@lists.linaro.org>,
	"'linaro-acpi@lists.linaro.org'" <linaro-acpi@lists.linaro.org>
Subject: Re: [PATCH] ACPICA / hwreg: Use acpi_gbl_reduced_hardware to prevent accessing PM registers
Date: Wed, 18 Sep 2013 17:28:25 +0800	[thread overview]
Message-ID: <52397239.9080606@linaro.org> (raw)
In-Reply-To: <94F2FBAB4432B54E8AACC7DFDE6C92E36FEEC56A@ORSMSX103.amr.corp.intel.com>

On 2013-9-17 1:26, Moore, Robert wrote:
> + #define ACPI_REDUCED_HARDWARE           TRUE
> 
> The intent of this feature is of course, to remove all code that is not needed -- specifically for hardware-reduced machines where the size of the kernel is important.

Ok, how about this patch below, is it reasonable to you?

>From b10bc1d2f9a3ff09abfb6990412aa1cf62d56937 Mon Sep 17 00:00:00 2001
From: Hanjun Guo <hanjun.guo@linaro.org>
Date: Wed, 18 Sep 2013 17:19:23 +0800
Subject: [PATCH] ACPI: Introduce CONFIG_ACPI_REDUCED_HARDWARE to enable
 reduced hardware

If we want to enable reduced hardware ACPI on some platform (such as ARM),
we need to modify the kernel code and set ACPI_REDUCED_HARDWARE to TRUE.

This is not reasonable, so introduce a kernel config to enable it, and
no need for kernel modification when we use hardware-reduced ACPI.

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

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 0d7f6eb..1232a7b 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -413,6 +413,14 @@ config ACPI_BGRT
          data from the firmware boot splash. It will appear under
          /sys/firmware/acpi/bgrt/ .

+config ACPI_REDUCED_HARDWARE
+       bool "Hardware-reduced ACPI support"
+       depends on ARM || ARM64
+        help
+         This config adds support for Hardware-reduced ACPI. When this option
+         is selected, will generate a specialized version of ACPICA that ONLY
+         supports the ACPI 5.0 "reduced hardware".
+
 source "drivers/acpi/apei/Kconfig"

 endif  # ACPI
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 1c16f82..15254f5 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -100,7 +100,11 @@
  *      ACPI PM timer
  *      FACS table (Waking vectors and Global Lock)
  */
+#ifdef CONFIG_ACPI_REDUCED_HARDWARE
+#define ACPI_REDUCED_HARDWARE           TRUE
+#else
 #define ACPI_REDUCED_HARDWARE           FALSE
+#endif /* CONFIG_ACPI_REDUCED_HARDWARE */

 /******************************************************************************
  *
-- 
1.7.9.5

  reply	other threads:[~2013-09-18  9:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 10:05 [PATCH] ACPICA / hwreg: Use acpi_gbl_reduced_hardware to prevent accessing PM registers Hanjun Guo
2013-09-13 13:07 ` Moore, Robert
2013-09-13 20:16   ` Moore, Robert
2013-09-16  2:40     ` Hanjun Guo
2013-09-16 17:26       ` Moore, Robert
2013-09-18  9:28         ` Hanjun Guo [this message]
2013-09-24  0:09           ` Zheng, Lv
2013-09-18  9:31         ` Hanjun Guo
2013-09-18 15:09           ` Moore, Robert
2013-09-19  2:37             ` Moore, Robert
2013-09-19  3:52               ` Duran, Leo
2013-09-19  4:42                 ` Moore, Robert
2013-09-22  3:26               ` Hanjun Guo
2013-09-24  0:20                 ` Zheng, Lv
2013-09-22  2:50             ` Hanjun Guo

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=52397239.9080606@linaro.org \
    --to=hanjun.guo@linaro.org \
    --cc=david.e.box@intel.com \
    --cc=lenb@kernel.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=patches@linaro.org \
    --cc=rjw@sisk.pl \
    --cc=robert.moore@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox