@@ -159,7 +159,7 @@ struct hrtimer_clock_base *lock_hrtimer_base(const
struct hrtimer *timer,
static int hrtimer_get_target(int this_cpu, int pinned)
{
#ifdef CONFIG_NO_HZ
- if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu))
+ if (!pinned && get_sysctl_timer_migration())
return get_nohz_timer_target();
#endif
return this_cpu;
@@ -733,11 +733,13 @@ __mod_timer(struct timer_list *timer, unsigned
long expires,
debug_activate(timer, expires);
- cpu = smp_processor_id();
-
#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
- if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
+ if (!pinned && get_sysctl_timer_migration())
cpu = get_nohz_timer_target();
+ else
+ cpu = smp_processor_id();
+#else
+ cpu = smp_processor_id();
#endif
new_base = per_cpu(tvec_bases, cpu);