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

[PARISC] clocksource: Move update_cr16_clocksource later in boot

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>

+13 -4
+8
arch/parisc/kernel/processor.c
··· 48 48 49 49 struct cpuinfo_parisc cpu_data[NR_CPUS] __read_mostly; 50 50 51 + extern int update_cr16_clocksource(void); /* from time.c */ 52 + 51 53 /* 52 54 ** PARISC CPU driver - claim "device" and initialize CPU data structures. 53 55 ** ··· 199 197 cpu_up(cpuid); 200 198 } 201 199 #endif 200 + 201 + /* If we've registered more than one cpu, 202 + * we'll use the jiffies clocksource since cr16 203 + * is not synchronized between CPUs. 204 + */ 205 + update_cr16_clocksource(); 202 206 203 207 return 0; 204 208 }
-4
arch/parisc/kernel/smp.c
··· 567 567 568 568 void smp_cpus_done(unsigned int cpu_max) 569 569 { 570 - extern int update_cr16_clocksource(void); 571 - 572 - update_cr16_clocksource(); 573 - 574 570 return; 575 571 } 576 572
+5
arch/parisc/kernel/time.c
··· 200 200 201 201 return change; 202 202 } 203 + #else 204 + int update_cr16_clocksource(void) 205 + { 206 + return 0; /* no change */ 207 + } 203 208 #endif /*CONFIG_SMP*/ 204 209 205 210 void __init start_cpu_itimer(void)