smp_processor_id() can result in a function call if CONFIG_DEBUG_PREEMPT is enabled. It would be much straight forward to use this_rq() macro instead.
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index bcdf6a136c59..4220ec76d643 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1995,7 +1995,7 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
static inline void cpufreq_update_this_cpu(struct rq *rq, unsigned int flags) { - if (cpu_of(rq) == smp_processor_id()) + if (rq == this_rq()) cpufreq_update_util(rq, flags); } #else