summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2017-10-18 22:25:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-27 10:39:09 +0200
commitd29babf5c2320f1e42fc4d343b3f369788696f23 (patch)
tree153a01b74366a49c1963db96e8d4ef59dca61530 /arch
parentf0889088d5fce357ce8ecfa3a094a94d57c545f0 (diff)
parisc: Fix detection of nonsynchronous cr16 cycle counters
commit 8642b31ba9eef8a01845146a26682d4869e62513 upstream. 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") Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/kernel/time.c5
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)
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";