Skip to content

Commit d97180a

Browse files
committed
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 <[email protected]>
1 parent 907872b commit d97180a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

arch/parisc/kernel/setup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ void __init setup_arch(char **cmdline_p)
150150
#ifdef CONFIG_PA11
151151
dma_ops_init();
152152
#endif
153-
154-
clear_sched_clock_stable();
155153
}
156154

157155
/*

arch/parisc/kernel/time.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,16 @@ static int __init init_cr16_clocksource(void)
265265
(cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
266266
continue;
267267

268+
/* mark sched_clock unstable */
269+
clear_sched_clock_stable();
270+
268271
clocksource_cr16.name = "cr16_unstable";
269272
clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
270273
clocksource_cr16.rating = 0;
271274
break;
272275
}
273276
}
274277

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-
279278
/* register at clocksource framework */
280279
clocksource_register_hz(&clocksource_cr16,
281280
100 * PAGE0->mem_10msec);

0 commit comments

Comments
 (0)