On 10/29/2013 02:02 AM, Hanjun Guo wrote:
On 25 October 2013 06:23, <al.stone@linaro.org mailto:al.stone@linaro.org> wrote:
From: Al Stone <ahs3@redhat.com <mailto:ahs3@redhat.com>> To enable the hardware reduced mode of ACPI on some platforms (such as ARM), we need to modify the kernel code and set ACPI_REDUCED_HARDWARE to TRUE in the ACPICA source. This can be done more resonably by introducing a kernel config item to enable/disable ACPI_REDUCED_HARDWARE. We can then change the kernel config instead of having to modify the kernel source directly to enable the reduced hardware mode of ACPI. Lv Zheng suggested that this configuration item does not belong in ACPICA, the upstream source for much of the ACPI internals, but rather to the Linux kernel itself. Hence, we introduce this flag so that we can make ACPI_REDUCED_HARDWARE configurable. For the details of the discussion, please refer to: http://www.spinics.net/lists/linux-acpi/msg46369.html Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org <mailto:hanjun.guo@linaro.org>> Signed-off-by: Al Stone <al.stone@linaro.org <mailto:al.stone@linaro.org>> --- drivers/acpi/Kconfig | 8 ++++++++ include/acpi/acconfig.h | 2 +- include/acpi/platform/aclinux.h | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 70813fe..099ca81 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -389,6 +389,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 !(IA64 || X86) + 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 "reduced hardware". + source "drivers/acpi/apei/Kconfig" endif # ACPI diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 1c16f82..58b68ca 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -100,7 +100,7 @@ * ACPI PM timer * FACS table (Waking vectors and Global Lock) */ -#define ACPI_REDUCED_HARDWARE FALSE +#define ACPI_REDUCED_HARDWARE FLAG_ACPI_HW_REDUCED
Intel guys have sent a new version of ACPICA, and they modified this macro as:
+#ifndef ACPI_REDUCED_HARDWARE #define ACPI_REDUCED_HARDWARE FALSE +#endif
I think intel's patch is the response to the discussion of hardware-reduced ACPI profile that I started about one month ago.
so we should update this patch and rebased on the latest ACPICA version, I will do that.
Thanks Hanjun
I'll resubmit this as an actual patch (vs RFC) for the Linaro tree and do a separate patch for the linux-acpi tree since they have already moved to the newer ACPI code. Whenever we sync with the upstream tree, we'll then pull in the version of the patch that works with that version of the source tree.