diff options
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r-- | kernel/time/tick-common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 5edfb4806032..edd45f64162f 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -243,8 +243,13 @@ static bool tick_check_preferred(struct clock_event_device *curdev, | |||
243 | return false; | 243 | return false; |
244 | } | 244 | } |
245 | 245 | ||
246 | /* Use the higher rated one */ | 246 | /* |
247 | return !curdev || newdev->rating > curdev->rating; | 247 | * Use the higher rated one, but prefer a CPU local device with a lower |
248 | * rating than a non-CPU local device | ||
249 | */ | ||
250 | return !curdev || | ||
251 | newdev->rating > curdev->rating || | ||
252 | !cpumask_equal(curdev->cpumask, newdev->cpumask); | ||
248 | } | 253 | } |
249 | 254 | ||
250 | /* | 255 | /* |