commit 70e5975d3a04be5479a28eec4a2fb10f98ad2785 upstream.

Fixes https://bugs.launchpad.net/linaro-networking/+bug/1240283

Cc: <[email protected]> # 3.10.x : 7172a28 clockevents: Get rid of the 
notifier chain
Cc: <[email protected]> # 3.10.x : 7126cac clockevents: Simplify locking
Cc: <[email protected]> # 3.10.x : 8c53daf clockevents: Move the 
tick_notify() switch case to clockevents_notify()
Cc: <[email protected]> # 3.10.x : ccf33d6 clockevents: Add module refcount
Cc: <[email protected]> # 3.10.x : 501f867 clockevents: Provide sysfs 
interface
Cc: <[email protected]> # 3.10.x : 45cb8e0 clockevents: Split out 
selection logic
Cc: <[email protected]> # 3.10.x
---
 kernel/time/tick-common.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 5dd0177..5afd5549 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -233,8 +233,13 @@ static bool tick_check_preferred(struct clock_event_device 
*curdev,
                        return false;
        }
 
-       /* Use the higher rated one */
-       return !curdev || newdev->rating > curdev->rating;
+       /*
+        * Use the higher rated one, but prefer a CPU local device with a lower
+        * rating than a non-CPU local device
+        */
+       return !curdev ||
+               newdev->rating > curdev->rating ||
+              !cpumask_equal(curdev->cpumask, newdev->cpumask);
 }
 
 /*
-- 
1.8.5
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to