Skip to content

Commit

Permalink
parisc: Fix detection of nonsynchronous cr16 cycle counters
Browse files Browse the repository at this point in the history
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: c8c3735 ("parisc: Enhance detection of synchronous cr16 clocksources")
Cc: stable@vger.kernel.org # 4.13+
Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
hdeller committed Oct 19, 2017
1 parent 2aae008 commit 8642b31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/parisc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ static int __init init_cr16_clocksource(void)
cpu0_loc = per_cpu(cpu_data, 0).cpu_loc;

for_each_online_cpu(cpu) {
if (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc)
if (cpu == 0)
continue;
if ((cpu0_loc != 0) &&
(cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
continue;

clocksource_cr16.name = "cr16_unstable";
Expand Down

0 comments on commit 8642b31

Please sign in to comment.