diff options
| -rw-r--r-- | arch/arm/mach-omap2/cpuidle44xx.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index 72e018b9b260..f386cbe9c889 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
| @@ -62,15 +62,9 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
| 62 | { | 62 | { |
| 63 | struct omap4_idle_statedata *cx = | 63 | struct omap4_idle_statedata *cx = |
| 64 | cpuidle_get_statedata(&dev->states_usage[index]); | 64 | cpuidle_get_statedata(&dev->states_usage[index]); |
| 65 | struct timespec ts_preidle, ts_postidle, ts_idle; | ||
| 66 | u32 cpu1_state; | 65 | u32 cpu1_state; |
| 67 | int idle_time; | ||
| 68 | int cpu_id = smp_processor_id(); | 66 | int cpu_id = smp_processor_id(); |
| 69 | 67 | ||
| 70 | /* Used to keep track of the total time in idle */ | ||
| 71 | getnstimeofday(&ts_preidle); | ||
| 72 | |||
| 73 | local_irq_disable(); | ||
| 74 | local_fiq_disable(); | 68 | local_fiq_disable(); |
| 75 | 69 | ||
| 76 | /* | 70 | /* |
| @@ -128,26 +122,17 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
| 128 | if (index > 0) | 122 | if (index > 0) |
| 129 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id); | 123 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id); |
| 130 | 124 | ||
| 131 | getnstimeofday(&ts_postidle); | ||
| 132 | ts_idle = timespec_sub(ts_postidle, ts_preidle); | ||
| 133 | |||
| 134 | local_irq_enable(); | ||
| 135 | local_fiq_enable(); | 125 | local_fiq_enable(); |
| 136 | 126 | ||
| 137 | idle_time = ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * \ | ||
| 138 | USEC_PER_SEC; | ||
| 139 | |||
| 140 | /* Update cpuidle counters */ | ||
| 141 | dev->last_residency = idle_time; | ||
| 142 | |||
| 143 | return index; | 127 | return index; |
| 144 | } | 128 | } |
| 145 | 129 | ||
| 146 | DEFINE_PER_CPU(struct cpuidle_device, omap4_idle_dev); | 130 | DEFINE_PER_CPU(struct cpuidle_device, omap4_idle_dev); |
| 147 | 131 | ||
| 148 | struct cpuidle_driver omap4_idle_driver = { | 132 | struct cpuidle_driver omap4_idle_driver = { |
| 149 | .name = "omap4_idle", | 133 | .name = "omap4_idle", |
| 150 | .owner = THIS_MODULE, | 134 | .owner = THIS_MODULE, |
| 135 | .en_core_tk_irqen = 1, | ||
| 151 | }; | 136 | }; |
| 152 | 137 | ||
| 153 | static inline void _fill_cstate(struct cpuidle_driver *drv, | 138 | static inline void _fill_cstate(struct cpuidle_driver *drv, |
