From: Al Stone 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 Signed-off-by: Al Stone 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
/****************************************************************************** * diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 68534ef..ff3129a 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -174,6 +174,12 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) lock ? AE_OK : AE_NO_MEMORY; \ })
+#ifdef CONFIG_ACPI_REDUCED_HARDWARE +#define FLAG_ACPI_HW_REDUCED TRUE +#else +#define FLAG_ACPI_HW_REDUCED FALSE +#endif /* CONFIG_ACPI_REDUCED_HARDWARE */ + #endif /* __KERNEL__ */
#endif /* __ACLINUX_H__ */