Message ID | 52F3C9BE.4050203@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, 6 Feb 2014, Preeti U Murthy wrote: > On 02/06/2014 09:33 PM, Thomas Gleixner wrote: > > On Thu, 6 Feb 2014, Preeti U Murthy wrote: > > > > Compiler warnings are not so important, right? > > > > kernel/time/tick-broadcast.c: In function ‘tick_broadcast_oneshot_control’: > > kernel/time/tick-broadcast.c:700:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] > > kernel/time/tick-broadcast.c:711:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] > > My apologies for this, will make sure this will not repeat. On compilation I > did not receive any warnings with the additional compile time flags too.I > compiled it on powerpc. Let me look into why the warnings did not show up. > Nevertheless I should have taken care of this even by simply looking at the > code. Huch, PPC seems to have an extra stupid version of gcc :) > The cpuidle patch then is below. The trace_cpu_idle_rcuidle() functions have > been moved around so that the broadcast CPU does not trace any idle event > and that the symmetry between the trace functions and the call to the > broadcast framework is maintained. Wow, it does become very simple :) Indeed :) Care to resend the whole lot with all fixes applied and perhaps compile tested on x86 :) Thanks, tglx
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index a55e68f..8beb0f02 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -140,12 +140,14 @@ int cpuidle_idle_call(void) return 0; } - trace_cpu_idle_rcuidle(next_state, dev->cpu); - broadcast = !!(drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP); - if (broadcast) - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); + if (broadcast && + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu)) + return -EBUSY; + + + trace_cpu_idle_rcuidle(next_state, dev->cpu); if (cpuidle_state_is_coupled(dev, drv, next_state)) entered_state = cpuidle_enter_state_coupled(dev, drv, @@ -153,11 +155,11 @@ int cpuidle_idle_call(void) else entered_state = cpuidle_enter_state(dev, drv, next_state); + trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); + if (broadcast) clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); - trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); - /* give the governor an opportunity to reflect on the outcome */ if (cpuidle_curr_governor->reflect) cpuidle_curr_governor->reflect(dev, entered_state);