On 17 March 2015 at 20:35, Lorenzo Pieralisi lorenzo.pieralisi@arm.com wrote:
On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote:
[...]
Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and
+acpi-$(CONFIG_ACPI_SLEEP) += sleep.o
as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in
sleep.c if
we doing so)?
Well, almost. There is one problem with that, becuase sleep.c contains
code
outside of the ACPI_SLEEP-dependent blocks. That code is used for
powering
off ACPI platforms.
I guess you don't want that code on ARM too, right?
Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be
the
only arch setting it at least for the time being, is that correct?
HW reduced only platforms are still required to support sleep states that on arm64 are totally meaningless at present, so I do not think ACPI_REDUCED_HARDWARE_ONLY will cut it.
Factoring out power_off methods from sleep.c ? I know, it is not nicer since you split the S-states management in multiple files.
Side note: is the acpi_suspend() function in sleep.c used in the kernel ?
I'm afraid not, I grepped this function in this morning when I was reviewing the code, and only found: ./drivers/acpi/sleep.c: trace_suspend_resume(TPS("acpi_suspend"), acpi_state, true); ./drivers/acpi/sleep.c: trace_suspend_resume(TPS("acpi_suspend"), acpi_state, false); ./drivers/acpi/sleep.c:int acpi_suspend(u32 acpi_state)
./drivers/acpi/sleep.h:extern int acpi_suspend(u32 state);
Thanks Hanjun
Lorenzo