[PATCH v6 5/9] ARM: davinci: Consolidate time keeping and irq enable
From: Jean Pihet <hidden>
Date: 2012-02-29 08:36:56
Also in:
linux-omap, linux-sh
Rob, On Wed, Feb 29, 2012 at 4:11 AM, Robert Lee [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Enable core cpuidle timekeeping and irq enabling and remove that handling from this code. Signed-off-by: Robert Lee <redacted> --- ?arch/arm/mach-davinci/cpuidle.c | ? 78 +++++++++++++++----------------------- ?1 files changed, 31 insertions(+), 47 deletions(-)diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index a30c7c5..6f457f1 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c
...
quoted hunk ↗ jump to hunk
@@ -30,12 +31,42 @@ struct davinci_ops {? ? ? ?u32 flags; ?}; +/* 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_state_usage *state_usage = &dev->states_usage[index]; + ? ? ? struct davinci_ops *ops = cpuidle_get_statedata(state_usage); + + ? ? ? if (ops && ops->enter) + ? ? ? ? ? ? ? ops->enter(ops->flags); + + ? ? ? return cpuidle_wrap_enter(dev, ?drv, index, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cpuidle_simple_enter);
This does not look right since ops->exit will never be called.
+ + ? ? ? if (ops && ops->exit) + ? ? ? ? ? ? ? ops->exit(ops->flags); + + ? ? ? return index; +} +
... Regards, Jean