Skip to content

Commit 340233d

Browse files
committed
parisc: Mark cr16 clock unstable on all SMP machines
The cr16 interval timers are not synchronized across CPUs, even with just one dual-core CPU. This becomes visible if the machines have a longer uptime. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent a65bcad commit 340233d

1 file changed

Lines changed: 4 additions & 23 deletions

File tree

arch/parisc/kernel/time.c

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -251,33 +251,14 @@ void __init time_init(void)
251251
static int __init init_cr16_clocksource(void)
252252
{
253253
/*
254-
* The cr16 interval timers are not syncronized across CPUs on
255-
* different sockets, so mark them unstable and lower rating on
256-
* multi-socket SMP systems.
254+
* The cr16 interval timers are not synchronized across CPUs.
257255
*/
258256
if (num_online_cpus() > 1 && !running_on_qemu) {
259-
int cpu;
260-
unsigned long cpu0_loc;
261-
cpu0_loc = per_cpu(cpu_data, 0).cpu_loc;
262-
263-
for_each_online_cpu(cpu) {
264-
if (cpu == 0)
265-
continue;
266-
if ((cpu0_loc != 0) &&
267-
(cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
268-
continue;
269-
270-
clocksource_cr16.name = "cr16_unstable";
271-
clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
272-
clocksource_cr16.rating = 0;
273-
break;
274-
}
257+
clocksource_cr16.name = "cr16_unstable";
258+
clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
259+
clocksource_cr16.rating = 0;
275260
}
276261

277-
/* XXX: We may want to mark sched_clock stable here if cr16 clocks are
278-
* in sync:
279-
* (clocksource_cr16.flags == CLOCK_SOURCE_IS_CONTINUOUS) */
280-
281262
/* register at clocksource framework */
282263
clocksource_register_hz(&clocksource_cr16,
283264
100 * PAGE0->mem_10msec);

0 commit comments

Comments
 (0)