The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org --- arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h index 2fca60a..7367787 100644 --- a/arch/arm/include/asm/cpuidle.h +++ b/arch/arm/include/asm/cpuidle.h @@ -1,13 +1,8 @@ #ifndef __ASM_ARM_CPUIDLE_H #define __ASM_ARM_CPUIDLE_H
-#ifdef CONFIG_CPU_IDLE extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index); -#else -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) { return -ENODEV; } -#endif + struct cpuidle_driver *drv, int index);
/* Common ARM WFI state */ #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
Add the __init section for the functions which are called at init time.
Signed-off-by: Daniel Lezcano <daniel.linaro.org> Acked-by: Simon Horman horms+renesas@verge.net.au --- arch/arm/mach-shmobile/cpuidle.c | 4 ++-- arch/arm/mach-shmobile/pm-sh7372.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index 9e05026..068f9ca 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c @@ -36,12 +36,12 @@ static struct cpuidle_driver shmobile_cpuidle_default_driver = {
static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
-void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv) +void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv) { cpuidle_drv = drv; }
-int shmobile_cpuidle_init(void) +int __init shmobile_cpuidle_init(void) { struct cpuidle_device *dev = &shmobile_cpuidle_dev;
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index a0826a4..f6b14ca 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c @@ -450,12 +450,12 @@ static struct cpuidle_driver sh7372_cpuidle_driver = { }, };
-static void sh7372_cpuidle_init(void) +static void __init sh7372_cpuidle_init(void) { shmobile_cpuidle_set_driver(&sh7372_cpuidle_driver); } #else -static void sh7372_cpuidle_init(void) {} +static void __init sh7372_cpuidle_init(void) {} #endif
#ifdef CONFIG_SUSPEND
Remove the shmobile_enter_wfi function which is the same as the common WFI enter function from the arm cpuidle driver defined with the ARM_CPUIDLE_WFI_STATE macro.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Simon Horman horms+renesas@verge.net.au --- arch/arm/mach-shmobile/cpuidle.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index 068f9ca..c872ae8 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c @@ -16,20 +16,12 @@ #include <asm/cpuidle.h> #include <asm/io.h>
-int shmobile_enter_wfi(struct cpuidle_device *dev, struct cpuidle_driver *drv, - int index) -{ - cpu_do_idle(); - return 0; -} - static struct cpuidle_device shmobile_cpuidle_dev; static struct cpuidle_driver shmobile_cpuidle_default_driver = { .name = "shmobile_cpuidle", .owner = THIS_MODULE, .en_core_tk_irqen = 1, .states[0] = ARM_CPUIDLE_WFI_STATE, - .states[0].enter = shmobile_enter_wfi, .safe_state_index = 0, /* C1 */ .state_count = 1, };
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Reviewed-by: Joseph Lo josephl@nvidia.com Acked-by: Joseph Lo josephl@nvidia.com --- arch/arm/mach-tegra/cpuidle-tegra20.c | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c index 825ced4..1ad1a67 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra20.c +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c @@ -43,28 +43,32 @@ static atomic_t abort_barrier; static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index); +#define TEGRA20_MAX_STATES 2 +#else +#define TEGRA20_MAX_STATES 1 #endif
-static struct cpuidle_state tegra_idle_states[] = { - [0] = ARM_CPUIDLE_WFI_STATE_PWR(600), -#ifdef CONFIG_PM_SLEEP - [1] = { - .enter = tegra20_idle_lp2_coupled, - .exit_latency = 5000, - .target_residency = 10000, - .power_usage = 0, - .flags = CPUIDLE_FLAG_TIME_VALID | - CPUIDLE_FLAG_COUPLED, - .name = "powered-down", - .desc = "CPU power gated", - }, -#endif -}; - static struct cpuidle_driver tegra_idle_driver = { .name = "tegra_idle", .owner = THIS_MODULE, .en_core_tk_irqen = 1, + .states = { + ARM_CPUIDLE_WFI_STATE_PWR(600), +#ifdef CONFIG_PM_SLEEP + { + .enter = tegra20_idle_lp2_coupled, + .exit_latency = 5000, + .target_residency = 10000, + .power_usage = 0, + .flags = CPUIDLE_FLAG_TIME_VALID | + CPUIDLE_FLAG_COUPLED, + .name = "powered-down", + .desc = "CPU power gated", + }, +#endif + }, + .state_count = TEGRA20_MAX_STATES, + .safe_state_index = 0, };
static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); @@ -226,10 +230,6 @@ int __init tegra20_cpuidle_init(void) tegra_tear_down_cpu = tegra20_tear_down_cpu; #endif
- drv->state_count = ARRAY_SIZE(tegra_idle_states); - memcpy(drv->states, tegra_idle_states, - drv->state_count * sizeof(drv->states[0])); - ret = cpuidle_register_driver(&tegra_idle_driver); if (ret) { pr_err("CPUidle driver registration failed\n");
dev->state_count is initialized automatically by cpuidle_register_device.
When drv->state_count is equal to dev->state_count, no need to init this field, so removing it.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Reviewed-by: Joseph Lo josephl@nvidia.com Acked-by: Joseph Lo josephl@nvidia.com --- arch/arm/mach-tegra/cpuidle-tegra114.c | 1 - arch/arm/mach-tegra/cpuidle-tegra20.c | 1 - arch/arm/mach-tegra/cpuidle-tegra30.c | 1 - 3 files changed, 3 deletions(-)
diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c index 0f4e8c4..c527cff 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra114.c +++ b/arch/arm/mach-tegra/cpuidle-tegra114.c @@ -49,7 +49,6 @@ int __init tegra114_cpuidle_init(void) dev = &per_cpu(tegra_idle_device, cpu); dev->cpu = cpu;
- dev->state_count = drv->state_count; ret = cpuidle_register_device(dev); if (ret) { pr_err("CPU%u: CPUidle device registration failed\n", diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c index 1ad1a67..b94d76a 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra20.c +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c @@ -243,7 +243,6 @@ int __init tegra20_cpuidle_init(void) dev->coupled_cpus = *cpu_possible_mask; #endif
- dev->state_count = drv->state_count; ret = cpuidle_register_device(dev); if (ret) { pr_err("CPU%u: CPUidle device registration failed\n", diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c index 8b50cf4..c4e01fe 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra30.c +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c @@ -176,7 +176,6 @@ int __init tegra30_cpuidle_init(void) dev = &per_cpu(tegra_idle_device, cpu); dev->cpu = cpu;
- dev->state_count = drv->state_count; ret = cpuidle_register_device(dev); if (ret) { pr_err("CPU%u: CPUidle device registration failed\n",
The davinci_enter_idle is called from the cpuidle with the cpuidle_wrap_enter function. This one does the time compution for entering and exiting the idle function and then we call again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we are calling recursively cpuidle_wrap_enter for nothing and furthermore reenabling the local irq.
Remove this and replace it by the cpu_do_idle function.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Santosh Shilimkar santosh.shilimkar@ti.com --- arch/arm/mach-davinci/cpuidle.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index 5ac9e93..22d6d4a 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c @@ -50,14 +50,10 @@ static void davinci_save_ddr_power(int enter, bool pdown)
/* Actual code that puts the SoC in different idle states */ static int davinci_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) + struct cpuidle_driver *drv, int index) { davinci_save_ddr_power(1, ddr2_pdown); - - index = cpuidle_wrap_enter(dev, drv, index, - arm_cpuidle_simple_enter); - + cpu_do_idle(); davinci_save_ddr_power(0, ddr2_pdown);
return index;
On 4/3/2013 5:45 PM, Daniel Lezcano wrote:
The davinci_enter_idle is called from the cpuidle with the cpuidle_wrap_enter function. This one does the time compution for entering and exiting the idle function and then we call again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we are calling recursively cpuidle_wrap_enter for nothing and furthermore reenabling the local irq.
Remove this and replace it by the cpu_do_idle function.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Santosh Shilimkar santosh.shilimkar@ti.com
Acked-by: Sekhar Nori nsekhar@ti.com
Thanks, Sekhar
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org --- drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5d66750..c99c31e 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev, if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
- stop_critical_timings(); if (!need_resched()) {
__monitor((void *)¤t_thread_info()->flags, 0, 0); @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev, __mwait(eax, ecx); }
- start_critical_timings(); - if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
For this one I need an ACK from Len.
Len, any objections?
Rafael
drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5d66750..c99c31e 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev, if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
- stop_critical_timings(); if (!need_resched()) {
__monitor((void *)¤t_thread_info()->flags, 0, 0); @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev, __mwait(eax, ecx); }
- start_critical_timings();
- if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
For this one I need an ACK from Len.
Len, any objections?
Len ? ping ...
drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5d66750..c99c31e 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev, if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
- stop_critical_timings(); if (!need_resched()) {
__monitor((void *)¤t_thread_info()->flags, 0, 0); @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev, __mwait(eax, ecx); }
- start_critical_timings();
- if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
For this one I need an ACK from Len.
Len, any objections?
Len ? ping ...
Rafael,
this patch is not dependent from any patch in the series, is it possible you apply the patchset except this patch ?
May be you can apply it later when Len acks it, or I can resend it, no ?
I have a lot of code consolidation patches awaiting for this patchset to be merged.
Thanks -- Daniel
drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5d66750..c99c31e 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev, if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
- stop_critical_timings(); if (!need_resched()) {
__monitor((void *)¤t_thread_info()->flags, 0, 0); @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev, __mwait(eax, ecx); }
- start_critical_timings();
- if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
On Monday, April 08, 2013 07:40:37 PM Daniel Lezcano wrote:
On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
For this one I need an ACK from Len.
Len, any objections?
Len ? ping ...
Rafael,
this patch is not dependent from any patch in the series, is it possible you apply the patchset except this patch ?
May be you can apply it later when Len acks it, or I can resend it, no ?
I have a lot of code consolidation patches awaiting for this patchset to be merged.
OK, I'll take the rest of your patches in this series (except for [1/9] which also is not depended on by anything AFAICS).
Thanks, Rafael
drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5d66750..c99c31e 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev, if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
- stop_critical_timings(); if (!need_resched()) {
__monitor((void *)¤t_thread_info()->flags, 0, 0); @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev, __mwait(eax, ecx); }
- start_critical_timings();
- if (!(lapic_timer_reliable_states & (1 << (cstate)))) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
On 04/08/2013 09:27 PM, Rafael J. Wysocki wrote:
On Monday, April 08, 2013 07:40:37 PM Daniel Lezcano wrote:
On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
For this one I need an ACK from Len.
Len, any objections?
Len ? ping ...
Rafael,
this patch is not dependent from any patch in the series, is it possible you apply the patchset except this patch ?
May be you can apply it later when Len acks it, or I can resend it, no ?
I have a lot of code consolidation patches awaiting for this patchset to be merged.
OK, I'll take the rest of your patches in this series (except for [1/9] which also is not depended on by anything AFAICS).
Thanks Rafael.
-- Daniel
On 04/03/2013 08:15 AM, Daniel Lezcano wrote:
The start/stop_critical_timings are called from arch/x86/kernel/process.c in the cpu_idle loop function.
Remove the ones in the cpuidle driver.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
Acked-by: Len Brown len.brown@intel.com
The TIME_VALID flag is specified for the different states but the time residency computation is not done, no tk flag, no time computation in the idle function.
Set the en_core_tk_irqen flag to activate it.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Santosh Shilimkar santosh.shilimkar@ti.com --- arch/arm/mach-omap2/cpuidle34xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 80392fc..4f67a5b 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
static struct cpuidle_driver omap3_idle_driver = { - .name = "omap3_idle", - .owner = THIS_MODULE, + .name = "omap3_idle", + .owner = THIS_MODULE, + .en_core_tk_irqen = 1, .states = { { .enter = omap3_enter_idle_bm,
Daniel Lezcano daniel.lezcano@linaro.org writes:
The TIME_VALID flag is specified for the different states but the time residency computation is not done, no tk flag, no time computation in the idle function.
Set the en_core_tk_irqen flag to activate it.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Santosh Shilimkar santosh.shilimkar@ti.com
Acked-by: Kevin Hilman khilman@linaro.org
Also, is this a regression fix that also needs to hit v3.9?
Kevin
arch/arm/mach-omap2/cpuidle34xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 80392fc..4f67a5b 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); static struct cpuidle_driver omap3_idle_driver = {
- .name = "omap3_idle",
- .owner = THIS_MODULE,
- .name = "omap3_idle",
- .owner = THIS_MODULE,
- .en_core_tk_irqen = 1, .states = { { .enter = omap3_enter_idle_bm,
On 04/03/2013 07:47 PM, Kevin Hilman wrote:
Daniel Lezcano daniel.lezcano@linaro.org writes:
The TIME_VALID flag is specified for the different states but the time residency computation is not done, no tk flag, no time computation in the idle function.
Set the en_core_tk_irqen flag to activate it.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Santosh Shilimkar santosh.shilimkar@ti.com
Acked-by: Kevin Hilman khilman@linaro.org
Also, is this a regression fix that also needs to hit v3.9?
Yes, I think so.
arch/arm/mach-omap2/cpuidle34xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 80392fc..4f67a5b 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); static struct cpuidle_driver omap3_idle_driver = {
- .name = "omap3_idle",
- .owner = THIS_MODULE,
- .name = "omap3_idle",
- .owner = THIS_MODULE,
- .en_core_tk_irqen = 1, .states = { { .enter = omap3_enter_idle_bm,
Daniel Lezcano daniel.lezcano@linaro.org writes:
On 04/03/2013 07:47 PM, Kevin Hilman wrote:
Daniel Lezcano daniel.lezcano@linaro.org writes:
The TIME_VALID flag is specified for the different states but the time residency computation is not done, no tk flag, no time computation in the idle function.
Set the en_core_tk_irqen flag to activate it.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Acked-by: Santosh Shilimkar santosh.shilimkar@ti.com
Acked-by: Kevin Hilman khilman@linaro.org
Also, is this a regression fix that also needs to hit v3.9?
Yes, I think so.
OK.
I've got a handful of other OMAP CPUidle fixes queued for v3.10[1] so I'll add this one to the queue and Cc: stable.
Thanks,
Kevin
[1] git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_3.10/cleanup/cpuidle
The current code computes the idle time but that can be handled by the cpuidle framework if we enable the .en_core_tk_irqen flag.
Set the flag and remove the code related to the time computation.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Signed-off-by: Deepthi Dharwar deepthi@linux.vnet.ibm.com --- arch/powerpc/platforms/pseries/processor_idle.c | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 4d806b4..a197120 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c @@ -23,8 +23,9 @@ #include "pseries.h"
struct cpuidle_driver pseries_idle_driver = { - .name = "pseries_idle", - .owner = THIS_MODULE, + .name = "pseries_idle", + .owner = THIS_MODULE, + .en_core_tk_irqen = 1, };
#define MAX_IDLE_STATE_COUNT 2 @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1; static struct cpuidle_device __percpu *pseries_cpuidle_devices; static struct cpuidle_state *cpuidle_state_table;
-static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) +static inline void idle_loop_prolog(unsigned long *in_purr) { - - *kt_before = ktime_get(); *in_purr = mfspr(SPRN_PURR); /* * Indicate to the HV that we are idle. Now would be @@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) get_lppaca()->idle = 1; }
-static inline s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before) +static inline void idle_loop_epilog(unsigned long in_purr) { get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr; get_lppaca()->idle = 0; - - return ktime_to_us(ktime_sub(ktime_get(), kt_before)); }
static int snooze_loop(struct cpuidle_device *dev, @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr; - ktime_t kt_before; int cpu = dev->cpu;
- idle_loop_prolog(&in_purr, &kt_before); + idle_loop_prolog(&in_purr); local_irq_enable(); set_thread_flag(TIF_POLLING_NRFLAG);
@@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev, clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb();
- dev->last_residency = - (int)idle_loop_epilog(in_purr, kt_before); + idle_loop_epilog(in_purr); + return index; }
@@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr; - ktime_t kt_before;
- idle_loop_prolog(&in_purr, &kt_before); + idle_loop_prolog(&in_purr); get_lppaca()->donate_dedicated_cpu = 1;
ppc64_runlatch_off(); @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev, check_and_cede_processor();
get_lppaca()->donate_dedicated_cpu = 0; - dev->last_residency = - (int)idle_loop_epilog(in_purr, kt_before); + + idle_loop_epilog(in_purr); + return index; }
@@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr; - ktime_t kt_before;
- idle_loop_prolog(&in_purr, &kt_before); + idle_loop_prolog(&in_purr);
/* * Yield the processor to the hypervisor. We return if @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev, */ check_and_cede_processor();
- dev->last_residency = - (int)idle_loop_epilog(in_purr, kt_before); + idle_loop_epilog(in_purr); + return index; }
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The current code computes the idle time but that can be handled by the cpuidle framework if we enable the .en_core_tk_irqen flag.
Set the flag and remove the code related to the time computation.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Signed-off-by: Deepthi Dharwar deepthi@linux.vnet.ibm.com
Rafael,
Deepthi took the patch, did a fix and tested it, this is why there is its signed-off.
Deepthi, could you ack the patch for Rafael also ?
Thanks -- Daniel
arch/powerpc/platforms/pseries/processor_idle.c | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 4d806b4..a197120 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c @@ -23,8 +23,9 @@ #include "pseries.h" struct cpuidle_driver pseries_idle_driver = {
- .name = "pseries_idle",
- .owner = THIS_MODULE,
- .name = "pseries_idle",
- .owner = THIS_MODULE,
- .en_core_tk_irqen = 1,
}; #define MAX_IDLE_STATE_COUNT 2 @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1; static struct cpuidle_device __percpu *pseries_cpuidle_devices; static struct cpuidle_state *cpuidle_state_table; -static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) +static inline void idle_loop_prolog(unsigned long *in_purr) {
- *kt_before = ktime_get(); *in_purr = mfspr(SPRN_PURR); /*
- Indicate to the HV that we are idle. Now would be
@@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) get_lppaca()->idle = 1; } -static inline s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before) +static inline void idle_loop_epilog(unsigned long in_purr) { get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr; get_lppaca()->idle = 0;
- return ktime_to_us(ktime_sub(ktime_get(), kt_before));
} static int snooze_loop(struct cpuidle_device *dev, @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr;
- ktime_t kt_before; int cpu = dev->cpu;
- idle_loop_prolog(&in_purr, &kt_before);
- idle_loop_prolog(&in_purr); local_irq_enable(); set_thread_flag(TIF_POLLING_NRFLAG);
@@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev, clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb();
- dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
- idle_loop_epilog(in_purr);
- return index;
} @@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr;
- ktime_t kt_before;
- idle_loop_prolog(&in_purr, &kt_before);
- idle_loop_prolog(&in_purr); get_lppaca()->donate_dedicated_cpu = 1;
ppc64_runlatch_off(); @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev, check_and_cede_processor(); get_lppaca()->donate_dedicated_cpu = 0;
- dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
- idle_loop_epilog(in_purr);
- return index;
} @@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr;
- ktime_t kt_before;
- idle_loop_prolog(&in_purr, &kt_before);
- idle_loop_prolog(&in_purr);
/* * Yield the processor to the hypervisor. We return if @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev, */ check_and_cede_processor();
- dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
- idle_loop_epilog(in_purr);
- return index;
}
On 04/03/2013 07:55 PM, Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The current code computes the idle time but that can be handled by the cpuidle framework if we enable the .en_core_tk_irqen flag.
Set the flag and remove the code related to the time computation.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org Signed-off-by: Deepthi Dharwar deepthi@linux.vnet.ibm.com
Rafael,
Deepthi took the patch, did a fix and tested it, this is why there is its signed-off.
Deepthi, could you ack the patch for Rafael also ?
Thanks -- Daniel
Signed-off-by: Deepthi Dharwar deepthi@linux.vnet.ibm.com
arch/powerpc/platforms/pseries/processor_idle.c | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 4d806b4..a197120 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c @@ -23,8 +23,9 @@ #include "pseries.h" struct cpuidle_driver pseries_idle_driver = {
- .name = "pseries_idle",
- .owner = THIS_MODULE,
- .name = "pseries_idle",
- .owner = THIS_MODULE,
- .en_core_tk_irqen = 1,
}; #define MAX_IDLE_STATE_COUNT 2 @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1; static struct cpuidle_device __percpu *pseries_cpuidle_devices; static struct cpuidle_state *cpuidle_state_table; -static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) +static inline void idle_loop_prolog(unsigned long *in_purr) {
- *kt_before = ktime_get(); *in_purr = mfspr(SPRN_PURR); /*
- Indicate to the HV that we are idle. Now would be
@@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) get_lppaca()->idle = 1; } -static inline s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before) +static inline void idle_loop_epilog(unsigned long in_purr) { get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr; get_lppaca()->idle = 0;
- return ktime_to_us(ktime_sub(ktime_get(), kt_before));
} static int snooze_loop(struct cpuidle_device *dev, @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr;
- ktime_t kt_before; int cpu = dev->cpu;
- idle_loop_prolog(&in_purr, &kt_before);
- idle_loop_prolog(&in_purr); local_irq_enable(); set_thread_flag(TIF_POLLING_NRFLAG);
@@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev, clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb();
- dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
- idle_loop_epilog(in_purr);
- return index;
} @@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr;
- ktime_t kt_before;
- idle_loop_prolog(&in_purr, &kt_before);
- idle_loop_prolog(&in_purr); get_lppaca()->donate_dedicated_cpu = 1;
ppc64_runlatch_off(); @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev, check_and_cede_processor(); get_lppaca()->donate_dedicated_cpu = 0;
- dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
- idle_loop_epilog(in_purr);
- return index;
} @@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev, int index) { unsigned long in_purr;
- ktime_t kt_before;
- idle_loop_prolog(&in_purr, &kt_before);
- idle_loop_prolog(&in_purr);
/* * Yield the processor to the hypervisor. We return if @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev, */ check_and_cede_processor();
- dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
- idle_loop_epilog(in_purr);
- return index;
}
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
Thanks
-- Daniel
arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h index 2fca60a..7367787 100644 --- a/arch/arm/include/asm/cpuidle.h +++ b/arch/arm/include/asm/cpuidle.h @@ -1,13 +1,8 @@ #ifndef __ASM_ARM_CPUIDLE_H #define __ASM_ARM_CPUIDLE_H -#ifdef CONFIG_CPU_IDLE extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
-#else -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
struct cpuidle_driver *drv, int index);
/* Common ARM WFI state */ #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
On Wednesday, April 03, 2013 02:23:23 PM Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
Well, since nothing in the cpuidle directory seems to really depend on this patch, my suggestion is to merge it through the ARM tree when suitable.
Thanks, Rafael
arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h index 2fca60a..7367787 100644 --- a/arch/arm/include/asm/cpuidle.h +++ b/arch/arm/include/asm/cpuidle.h @@ -1,13 +1,8 @@ #ifndef __ASM_ARM_CPUIDLE_H #define __ASM_ARM_CPUIDLE_H -#ifdef CONFIG_CPU_IDLE extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
-#else -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
struct cpuidle_driver *drv, int index);
/* Common ARM WFI state */ #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
On 04/08/2013 10:50 PM, Rafael J. Wysocki wrote:
On Wednesday, April 03, 2013 02:23:23 PM Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
Well, since nothing in the cpuidle directory seems to really depend on this patch, my suggestion is to merge it through the ARM tree when suitable.
Ok.
arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h index 2fca60a..7367787 100644 --- a/arch/arm/include/asm/cpuidle.h +++ b/arch/arm/include/asm/cpuidle.h @@ -1,13 +1,8 @@ #ifndef __ASM_ARM_CPUIDLE_H #define __ASM_ARM_CPUIDLE_H -#ifdef CONFIG_CPU_IDLE extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
-#else -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
struct cpuidle_driver *drv, int index);
/* Common ARM WFI state */ #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
I don't know - the description doesn't make it clear. Surely, what you checked was that this file is _not_ included in any file which is built when CONFIG_CPU_IDLE is disabled. In other words, when CONFIG_CPU_IDLE is not defined, arm_cpuidle_simple_enter() is never referenced.
If that is the case, then it's just that the patch description is the opposite of what it should be for this patch - and then the patch and description match and I don't see any reason to say no to it.
Then comes the issue of who takes the patch. It looks like Rafael would like me to. I'm fine with that, but it will need to go into the patch system as I'm rather busy catching up with email, and I expect to be catching up for at least the rest of this month.
On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
I don't know - the description doesn't make it clear. Surely, what you checked was that this file is _not_ included in any file which is built when CONFIG_CPU_IDLE is disabled. In other words, when CONFIG_CPU_IDLE is not defined, arm_cpuidle_simple_enter() is never referenced.
If that is the case, then it's just that the patch description is the opposite of what it should be for this patch - and then the patch and description match and I don't see any reason to say no to it.
Then comes the issue of who takes the patch. It looks like Rafael would like me to.
Actually Rafael was willing to take the patch if you ack it.
On Thu, Apr 18, 2013 at 04:31:43PM +0200, Daniel Lezcano wrote:
On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
I don't know - the description doesn't make it clear. Surely, what you checked was that this file is _not_ included in any file which is built when CONFIG_CPU_IDLE is disabled. In other words, when CONFIG_CPU_IDLE is not defined, arm_cpuidle_simple_enter() is never referenced.
If that is the case, then it's just that the patch description is the opposite of what it should be for this patch - and then the patch and description match and I don't see any reason to say no to it.
Then comes the issue of who takes the patch. It looks like Rafael would like me to.
Actually Rafael was willing to take the patch if you ack it.
Well, I want to see a proper description on the patch which describes what it _is_ doing before I ack it. The existing description is just plain confusing.
On 04/18/2013 05:42 PM, Russell King - ARM Linux wrote:
On Thu, Apr 18, 2013 at 04:31:43PM +0200, Daniel Lezcano wrote:
On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I have been involved in the development of this file. I know Rob is no longer working on this neither monitoring the code.
Russell are you ok with this patch ? Rafael needs your ack to take this patch into its tree.
I don't know - the description doesn't make it clear. Surely, what you checked was that this file is _not_ included in any file which is built when CONFIG_CPU_IDLE is disabled. In other words, when CONFIG_CPU_IDLE is not defined, arm_cpuidle_simple_enter() is never referenced.
If that is the case, then it's just that the patch description is the opposite of what it should be for this patch - and then the patch and description match and I don't see any reason to say no to it.
Then comes the issue of who takes the patch. It looks like Rafael would like me to.
Actually Rafael was willing to take the patch if you ack it.
Well, I want to see a proper description on the patch which describes what it _is_ doing before I ack it. The existing description is just plain confusing.
Ok, I will resend.
Thanks -- Daniel
On Wednesday, April 03, 2013 02:15:14 PM Daniel Lezcano wrote:
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
I need an ACK for this one.
Thanks, Rafael
arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h index 2fca60a..7367787 100644 --- a/arch/arm/include/asm/cpuidle.h +++ b/arch/arm/include/asm/cpuidle.h @@ -1,13 +1,8 @@ #ifndef __ASM_ARM_CPUIDLE_H #define __ASM_ARM_CPUIDLE_H -#ifdef CONFIG_CPU_IDLE extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
-#else -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
struct cpuidle_driver *drv, int index);
/* Common ARM WFI state */ #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
linaro-kernel@lists.linaro.org