Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: Mark sched_clock unstable only if clocks are not syncronized

We check at runtime if the cr16 clocks are stable across CPUs. Only mark
the sched_clock unstable by calling clear_sched_clock_stable() if we
know that we run on a system which isn't syncronized across CPUs.

Signed-off-by: Helge Deller <deller@gmx.de>

+3 -6
-2
arch/parisc/kernel/setup.c
··· 150 150 #ifdef CONFIG_PA11 151 151 dma_ops_init(); 152 152 #endif 153 - 154 - clear_sched_clock_stable(); 155 153 } 156 154 157 155 /*
+3 -4
arch/parisc/kernel/time.c
··· 265 265 (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc)) 266 266 continue; 267 267 268 + /* mark sched_clock unstable */ 269 + clear_sched_clock_stable(); 270 + 268 271 clocksource_cr16.name = "cr16_unstable"; 269 272 clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE; 270 273 clocksource_cr16.rating = 0; 271 274 break; 272 275 } 273 276 } 274 - 275 - /* XXX: We may want to mark sched_clock stable here if cr16 clocks are 276 - * in sync: 277 - * (clocksource_cr16.flags == CLOCK_SOURCE_IS_CONTINUOUS) */ 278 277 279 278 /* register at clocksource framework */ 280 279 clocksource_register_hz(&clocksource_cr16,