Revert "sh: Bump the earlytimer bits back to time_init()."
authorPaul Mundt <lethal@linux-sh.org>
Wed, 29 Jul 2009 13:43:58 +0000 (22:43 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 29 Jul 2009 13:43:58 +0000 (22:43 +0900)
This reverts commit 1d29ebebcb951ab6b04d22807cafb24b893310a2.

Bumping up the earlytimer initialization causes IRQs to be enabled too
early, which blows up lockdep:

...
NR_IRQS:256 nr_irqs:256
------------[ cut here ]------------
Badness at kernel/lockdep.c:2128

Pid : 0, Comm:          swapper
CPU : 0                 Not tainted  (2.6.31-rc3-00205-g3ed6e12-dirty #2443)

PC is at trace_hardirqs_on_caller+0x48/0x10c
PR is at trace_hardirqs_on_caller+0x3c/0x10c
...

Revert it back to late_time_init time, which fixes up lockdep.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/time.c

index d2424b068b7b1ad3c71dd67281de6fa08da5e473..7f95f479060fe9557f78c66252b17b857f4a8605 100644 (file)
@@ -92,6 +92,21 @@ module_init(rtc_generic_init);
 
 void (*board_time_init)(void);
 
+static void __init sh_late_time_init(void)
+{
+       /*
+        * Make sure all compiled-in early timers register themselves.
+        *
+        * Run probe() for two "earlytimer" devices, these will be the
+        * clockevents and clocksource devices respectively. In the event
+        * that only a clockevents device is available, we -ENODEV on the
+        * clocksource and the jiffies clocksource is used transparently
+        * instead. No error handling is necessary here.
+        */
+       early_platform_driver_register_all("earlytimer");
+       early_platform_driver_probe("earlytimer", 2, 0);
+}
+
 void __init time_init(void)
 {
        if (board_time_init)
@@ -108,15 +123,5 @@ void __init time_init(void)
        local_timer_setup(smp_processor_id());
 #endif
 
-       /*
-        * Make sure all compiled-in early timers register themselves.
-        *
-        * Run probe() for two "earlytimer" devices, these will be the
-        * clockevents and clocksource devices respectively. In the event
-        * that only a clockevents device is available, we -ENODEV on the
-        * clocksource and the jiffies clocksource is used transparently
-        * instead. No error handling is necessary here.
-        */
-       early_platform_driver_register_all("earlytimer");
-       early_platform_driver_probe("earlytimer", 2, 0);
+       late_time_init = sh_late_time_init;
 }