提交 662b3e19 编写于 作者: F Frederic Weisbecker 提交者: Thomas Gleixner

hrtimer: Simplify get_target_base() by returning current base

Instead of fetching again the current cpu base, just take it from the
parameter.
Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1439907509-9553-2-git-send-email-fweisbec@gmail.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 75e3b37d
...@@ -183,7 +183,7 @@ struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base, ...@@ -183,7 +183,7 @@ struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
int pinned) int pinned)
{ {
if (pinned || !base->migration_enabled) if (pinned || !base->migration_enabled)
return this_cpu_ptr(&hrtimer_bases); return base;
return &per_cpu(hrtimer_bases, get_nohz_timer_target()); return &per_cpu(hrtimer_bases, get_nohz_timer_target());
} }
#else #else
...@@ -191,7 +191,7 @@ static inline ...@@ -191,7 +191,7 @@ static inline
struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base, struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
int pinned) int pinned)
{ {
return this_cpu_ptr(&hrtimer_bases); return base;
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册