diff options
Diffstat (limited to 'drivers/cpuidle/cpuidle.c')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index a55e68f2cfc8..09d05ab262be 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -140,12 +140,14 @@ int cpuidle_idle_call(void) | |||
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
143 | trace_cpu_idle_rcuidle(next_state, dev->cpu); | ||
144 | |||
145 | broadcast = !!(drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP); | 143 | broadcast = !!(drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP); |
146 | 144 | ||
147 | if (broadcast) | 145 | if (broadcast && |
148 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); | 146 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu)) |
147 | return -EBUSY; | ||
148 | |||
149 | |||
150 | trace_cpu_idle_rcuidle(next_state, dev->cpu); | ||
149 | 151 | ||
150 | if (cpuidle_state_is_coupled(dev, drv, next_state)) | 152 | if (cpuidle_state_is_coupled(dev, drv, next_state)) |
151 | entered_state = cpuidle_enter_state_coupled(dev, drv, | 153 | entered_state = cpuidle_enter_state_coupled(dev, drv, |
@@ -153,11 +155,11 @@ int cpuidle_idle_call(void) | |||
153 | else | 155 | else |
154 | entered_state = cpuidle_enter_state(dev, drv, next_state); | 156 | entered_state = cpuidle_enter_state(dev, drv, next_state); |
155 | 157 | ||
158 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); | ||
159 | |||
156 | if (broadcast) | 160 | if (broadcast) |
157 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); | 161 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); |
158 | 162 | ||
159 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); | ||
160 | |||
161 | /* give the governor an opportunity to reflect on the outcome */ | 163 | /* give the governor an opportunity to reflect on the outcome */ |
162 | if (cpuidle_curr_governor->reflect) | 164 | if (cpuidle_curr_governor->reflect) |
163 | cpuidle_curr_governor->reflect(dev, entered_state); | 165 | cpuidle_curr_governor->reflect(dev, entered_state); |