diff options
author | Helge Deller <deller@gmx.de> | 2017-10-18 16:25:00 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2017-10-19 03:21:24 -0400 |
commit | 8642b31ba9eef8a01845146a26682d4869e62513 (patch) | |
tree | a846d9728f5e77b2c964ca1c24a7e3430f235e3a | |
parent | 2aae008ca6b3f5e978bea7aff265def4f2282f90 (diff) |
parisc: Fix detection of nonsynchronous cr16 cycle counters
For CPUs which have an unknown or invalid CPU location (physical location)
assume that their cycle counters aren't syncronized across CPUs.
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: c8c3735997a3 ("parisc: Enhance detection of synchronous cr16 clocksources")
Cc: stable@vger.kernel.org # 4.13+
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | arch/parisc/kernel/time.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 2d956aa0a38a..8c0105a49839 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -253,7 +253,10 @@ static int __init init_cr16_clocksource(void) | |||
253 | cpu0_loc = per_cpu(cpu_data, 0).cpu_loc; | 253 | cpu0_loc = per_cpu(cpu_data, 0).cpu_loc; |
254 | 254 | ||
255 | for_each_online_cpu(cpu) { | 255 | for_each_online_cpu(cpu) { |
256 | if (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc) | 256 | if (cpu == 0) |
257 | continue; | ||
258 | if ((cpu0_loc != 0) && | ||
259 | (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc)) | ||
257 | continue; | 260 | continue; |
258 | 261 | ||
259 | clocksource_cr16.name = "cr16_unstable"; | 262 | clocksource_cr16.name = "cr16_unstable"; |