|
@@ -243,14 +243,30 @@ void __init time_init(void)
|
|
static int __init init_cr16_clocksource(void)
|
|
static int __init init_cr16_clocksource(void)
|
|
{
|
|
{
|
|
/*
|
|
/*
|
|
- * The cr16 interval timers are not syncronized across CPUs, so mark
|
|
|
|
- * them unstable and lower rating on SMP systems.
|
|
|
|
|
|
+ * The cr16 interval timers are not syncronized across CPUs on
|
|
|
|
+ * different sockets, so mark them unstable and lower rating on
|
|
|
|
+ * multi-socket SMP systems.
|
|
*/
|
|
*/
|
|
if (num_online_cpus() > 1) {
|
|
if (num_online_cpus() > 1) {
|
|
- clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
|
|
|
|
- clocksource_cr16.rating = 0;
|
|
|
|
|
|
+ int cpu;
|
|
|
|
+ unsigned long cpu0_loc;
|
|
|
|
+ cpu0_loc = per_cpu(cpu_data, 0).cpu_loc;
|
|
|
|
+
|
|
|
|
+ for_each_online_cpu(cpu) {
|
|
|
|
+ if (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ clocksource_cr16.name = "cr16_unstable";
|
|
|
|
+ clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
|
|
|
|
+ clocksource_cr16.rating = 0;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* XXX: We may want to mark sched_clock stable here if cr16 clocks are
|
|
|
|
+ * in sync:
|
|
|
|
+ * (clocksource_cr16.flags == CLOCK_SOURCE_IS_CONTINUOUS) */
|
|
|
|
+
|
|
/* register at clocksource framework */
|
|
/* register at clocksource framework */
|
|
clocksource_register_hz(&clocksource_cr16,
|
|
clocksource_register_hz(&clocksource_cr16,
|
|
100 * PAGE0->mem_10msec);
|
|
100 * PAGE0->mem_10msec);
|