Hi Sudeep Holla.
Some point might require fixing. So i would like to get your reviews and comments.
I am currently looking at supporting ACPI cpuidle on ARM.
Are you part of ASWG ?
-> No. if it is possible, I would like to join ASWG.~~
If so, are you following the proposal for extending
the existing C-state definitions in ACPI for ARM processors ? That's mainly targeted for the next version of ACPI spec.
-> Thanks for good news. Now I read the "ACPI-next C-States document". I would like to know when do we can use the next version C-State? I checked the PSCI_PRESENT & USV_HVC flags in FADT flags field in ACPI5.0a. If it takes a long time, I try to support ACPIv5.0.
However for supporting idle using ACPIv5.0, we need to use FFH and we are currently thinking of restricting the FFH definition to PSCI(which uses smc) for now. So the idea is to use entry_method as FFH, and on x86 FFH means mwait while on ARM it means PSCI.
-> Thanks. Good information. Let me check again.
Yes the idea of reusing cpu_suspend is good but it's ARM specific API. It's better to have this in ARM specific ACPI back-end.
Thanks. Good information. Let me check again.
Thanks for your good comments.
Best Regards
-----Original Message----- From: Sudeep Holla [mailto:sudeep.holla@arm.com] Sent: Wednesday, April 23, 2014 7:54 PM To: Jonghwan Choi; Jonghwan Choi; sbkim73@samsung.com; jcm@redhat.com Cc: Sudeep Holla; linaro-acpi@lists.linaro.org; Charles Garcia-Tobin; Lorenzo Pieralisi Subject: Re: [Linaro-acpi] [PATCH linaro-acpi] [RFC] ACPU / cpuidle: Add ACPI cpuidle support for ARM
Hi Jonghwan,
On 23/04/14 00:31, Jonghwan Choi wrote:
Hi all,
I would like to support acpi cpuidle for ARM.
For that I applied Lorenzo Pieralisi's patches on leg-kernel repository. [PATCH RFC v2 0/4] ARM generic idle states] [PATCH RFC v2 1/4] drivers: cpuidle: implement OF based idle states infrastructure [PATCH RFC v2 2/4] arm64: add PSCI CPU_SUSPEND based cpu_suspend support [PATCH RFC v2 3/4] drivers: cpuidle: CPU idle ARM64 driver [PATCH RFC v2 4/4] arm64: boot: dts: update rtsm aemv8 dts with PSCI and idle states
Lorenzo Pieralisi's patches used PSCI method to enter the low power
mode.
(Over C2 State) I used that method in processor_idle.c
This patch is based on "http://git.linaro.org/leg/acpi/leg-kernel.git"
Last commit : Commit a493444ce7f1792b44897160454149dc31ca208b Author: Graeme Gregory graeme.gregory@linaro.org Date: Tue Feb 11 09:21:17 2014 +0000 linaro-configs: add enterprise-distro.conf Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
For applying this patch, leg-kernel + [RFC] cpufreq: Add ACPI cpufreq support for ARM(My patch) + Lorenzo Pieralisi's patches should be
merged.
Some point might require fixing. So i would like to get your reviews and comments.
I am currently looking at supporting ACPI cpuidle on ARM. Are you part of ASWG ? If so, are you following the proposal for extending the existing C-state definitions in ACPI for ARM processors ? That's mainly targeted for the next version of ACPI spec.
However for supporting idle using ACPIv5.0, we need to use FFH and we are currently thinking of restricting the FFH definition to PSCI(which uses smc) for now. So the idea is to use entry_method as FFH, and on x86 FFH means mwait while on ARM it means PSCI.
[...]
+#else +/**
- acpi_idle_enter_state - enters an acpi state without bm handling
- @dev: the target cpu
- @drv: cpuidle driver with cpuidle state information
- @index: the index of suggested state */ static int
+acpi_idle_enter_simple(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) {
int ret;
if (!index) {
cpu_do_idle();
return index;
}
cpu_pm_enter();
/*
* Pass idle state index to cpu_suspend which in turn will call
* the CPU ops suspend protocol with idle index as a parameter.
*
* Some states would not require context to be saved and flushed
* to DRAM, so calling cpu_suspend would not be stricly
necessary.
* When power domains specifications for ARM CPUs are finalized
then
* this code can be optimized to prevent saving registers if not
* needed.
*/
ret = cpu_suspend(index);
cpu_pm_exit();
return ret ? -1 : index;
+} +#endif
Yes the idea of reusing cpu_suspend is good but it's ARM specific API. It's better to have this in ARM specific ACPI back-end.
Regards, Sudeep