parisc: Use cr16 interval timers unconditionally on qemu
authorHelge Deller <deller@gmx.de>
Fri, 12 Jan 2018 21:44:00 +0000 (22:44 +0100)
committerHelge Deller <deller@gmx.de>
Fri, 2 Mar 2018 09:04:59 +0000 (10:04 +0100)
When running on qemu we know that the (emulated) cr16 cpu-internal
clocks are syncronized. So let's use them unconditionally on qemu.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # 4.14+
arch/parisc/include/asm/processor.h
arch/parisc/kernel/time.c

index 0e6ab6e4a4e9f87ba8ffc17f4d1c1e0041b5ab02..2dbe5580a1a4420ba693329a0f2622f68f759276 100644 (file)
@@ -316,6 +316,8 @@ extern int _parisc_requires_coherency;
 #define parisc_requires_coherency()    (0)
 #endif
 
+extern int running_on_qemu;
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ASM_PARISC_PROCESSOR_H */
index 4b8fd6dc22dabebcf1da3b2e32381d2df3197eda..68e88e5c08985fa37b996b518f61e5053f800f25 100644 (file)
@@ -248,7 +248,7 @@ static int __init init_cr16_clocksource(void)
         * different sockets, so mark them unstable and lower rating on
         * multi-socket SMP systems.
         */
-       if (num_online_cpus() > 1) {
+       if (num_online_cpus() > 1 && !running_on_qemu) {
                int cpu;
                unsigned long cpu0_loc;
                cpu0_loc = per_cpu(cpu_data, 0).cpu_loc;