On 2013-11-5 17:01, Tomasz Nowicki wrote:
W dniu 25.10.2013 00:22, al.stone@linaro.org pisze:
From: Al Stone ahs3@redhat.com
This series of patches starts with Hanjun's patch to create a kernel config item for CONFIG_ACPI_REDUCED_HARDWARE [0]. Building on that, I then reviewed all of the code that touched any of several fields in the FADT that the OSPM is supposed to ignore when ACPI is in Hardware Reduced mode [1]. Any time there was a use of one of the fields to be ignored, I evaluated whether or not the code was implementing Hardware Reduced mode correctly. Similarly, for each the flags in the FADT flags field that are to be ignored in Hardware Reduced mode, the kernel code was again scanned for proper usage. The remainder of the patches are to fix all of the situations I could find where the kernel would not behave correctly in this ACPI mode.
These are being submitted as an RFC to the linaro-acpi@ list so I can get some other eyes looking at them before sending them to linux-acpi@ where they really need to go. These seem to work just fine on the RTSM model for ARMv7, both with and without ACPI enabled, and with and without ACPI_REDUCED_HARDWARE enabled. However, there's no way I can think of or test all possible scenarios so feedback would be greatly appreciated.
Changes for v2: -- Change patch series title -- Add in the FACS global lock patch as further hardware reduced mode cleanup that is needed -- Remove whitespace change that should not have gotten in
[1] Please see the ACPI Specification v5.0 for details on Hardware Reduced mode. [0] List at https://wiki.linaro.org/LEG/Engineering/Kernel/ACPI/AcpiReducedHw#Section_5:...
Al Stone (13): ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE to enable this ACPI mode ACPI: bus master reload is unsupported in ACPI reduced HW mode ACPI: clean up compiler warning about uninitialized field ACPI: HW reduced mode does not allow use of the FADT sci_interrupt field ACPI: ARM: exclude calls on ARM platforms, not include them on x86 ACPI: ensure several FADT fields are only used in HW reduced mode ACPI: do not reserve memory regions for some FADT entries in HW reduced mode ACPI: in HW reduced mode, getting power latencies from FADT is not allowed ACPI: add clarifying comment about processor throttling in HW reduced mode ACPI: ACPI_FADT_C2_MP_SUPPORTED must be ignored in HW reduced mode ACPI: use of ACPI_FADT_32BIT_TIMER is not allowed in HW reduced mode ACPI: correct #ifdefs so compiling without ACPI_REDUCED_HARDWARE works properly ACPI: ARM/ARM64: ensure the ACPI FACS global_lock is never used in HW reduced mode
arch/arm/include/asm/acpi.h | 3 ++- arch/arm64/include/asm/acpi.h | 3 ++- drivers/acpi/Kconfig | 8 ++++++++ drivers/acpi/acpica/utxface.c | 3 ++- drivers/acpi/bus.c | 9 +++++---- drivers/acpi/osl.c | 28 ++++++++++++++++++++-------- drivers/acpi/pci_link.c | 14 ++++++++------ drivers/acpi/plat/arm/boot.c | 2 ++ drivers/acpi/processor_idle.c | 29 ++++++++++++++++++++++++----- drivers/acpi/processor_throttling.c | 8 ++++++++ drivers/acpi/sleep.c | 2 +- include/acpi/acconfig.h | 2 +- include/acpi/platform/aclinux.h | 6 ++++++ 13 files changed, 89 insertions(+), 28 deletions(-)
Hi Al,
As we discussed in Santa Clara, we should consider using of ACPI_HW_DEPENDENT_RETURN_{STATUS,OK,VOID} macro everywhere it's related to ACPICA internal code.
Sorry I didn't catch up with you here, why we should use ACPI_HW_DEPENDENT_RETURN_{STATUS,OK,VOID} macro? This patch set is about ACPI driver changing but not ACPICA, did I miss something?
Thanks Hanjun