]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PARISC] clocksource: Move update_cr16_clocksource later in boot
authorKyle McMartin <kyle@mako.i.cabal.ca>
Tue, 27 Feb 2007 03:21:22 +0000 (22:21 -0500)
committerKyle McMartin <kyle@mako.i.cabal.ca>
Tue, 27 Feb 2007 03:21:22 +0000 (22:21 -0500)
smp_cpus_done is too early for us... before we even do a device
inventory! Move update_cr16_clocksource into the tail end of
processor_probe() and stub it out on CONFIG_SMP=n builds.

Verified that clocksource0 is properly updated to use jiffies
on an SMP build.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
arch/parisc/kernel/processor.c
arch/parisc/kernel/smp.c
arch/parisc/kernel/time.c

index 7c056dcebf553c764b36fd45fccee6a543f98a8e..dd5d0cb6b347365e117aa13575b19d7107ba0324 100644 (file)
@@ -48,6 +48,8 @@ EXPORT_SYMBOL(boot_cpu_data);
 
 struct cpuinfo_parisc cpu_data[NR_CPUS] __read_mostly;
 
+extern int update_cr16_clocksource(void);      /* from time.c */
+
 /*
 **     PARISC CPU driver - claim "device" and initialize CPU data structures.
 **
@@ -198,6 +200,12 @@ static int __init processor_probe(struct parisc_device *dev)
        }
 #endif
 
+       /* If we've registered more than one cpu,
+        * we'll use the jiffies clocksource since cr16
+        * is not synchronized between CPUs.
+        */
+       update_cr16_clocksource();
+
        return 0;
 }
 
index bb6e6a38e91194ffa7385fee41a1399669504512..6ba9257fdb7f196587f1198398ee215d394a08fc 100644 (file)
@@ -567,10 +567,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 
 void smp_cpus_done(unsigned int cpu_max)
 {
-       extern int update_cr16_clocksource(void);
-
-       update_cr16_clocksource();
-
        return;
 }
 
index 9b14066d693c2264a93ae057fc2e69c75ffed605..07a991aa9b0c2ba6f81aa8f937c3d0039f4cf92a 100644 (file)
@@ -200,6 +200,11 @@ int update_cr16_clocksource(void)
 
        return change;
 }
+#else
+int update_cr16_clocksource(void)
+{
+       return 0; /* no change */
+}
 #endif /*CONFIG_SMP*/
 
 void __init start_cpu_itimer(void)