parisc: Use fast cr16 clocksource with qemu
Helge Deller
maintainerPATCH 1/1 parisc: Use fast cr16 clocksource with qemu
When booted in qemu, the (emulated) cr16 clocksources are monotonic and syncronized, so they can be used as stable clocksources.
Signed-off-by Helge Deller <[email protected]>
arch/parisc/include/asm/processor.h +2 -0
@@ -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 */
arch/parisc/kernel/time.c +1 -1
@@ -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;