aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-29 09:43:58 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-29 09:43:58 -0400
commit82b242214b6f5b96eb9b76452ac6e2b67dd81abd (patch)
tree64afe02076afbf1207df75b33c9f763019bb0b37
parent3725f28b478035a0410268f06a383f24ede7971c (diff)
Revert "sh: Bump the earlytimer bits back to time_init()."
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>
-rw-r--r--arch/sh/kernel/time.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index d2424b068b7b..7f95f479060f 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -92,6 +92,21 @@ module_init(rtc_generic_init);
92 92
93void (*board_time_init)(void); 93void (*board_time_init)(void);
94 94
95static void __init sh_late_time_init(void)
96{
97 /*
98 * Make sure all compiled-in early timers register themselves.
99 *
100 * Run probe() for two "earlytimer" devices, these will be the
101 * clockevents and clocksource devices respectively. In the event
102 * that only a clockevents device is available, we -ENODEV on the
103 * clocksource and the jiffies clocksource is used transparently
104 * instead. No error handling is necessary here.
105 */
106 early_platform_driver_register_all("earlytimer");
107 early_platform_driver_probe("earlytimer", 2, 0);
108}
109
95void __init time_init(void) 110void __init time_init(void)
96{ 111{
97 if (board_time_init) 112 if (board_time_init)
@@ -108,15 +123,5 @@ void __init time_init(void)
108 local_timer_setup(smp_processor_id()); 123 local_timer_setup(smp_processor_id());
109#endif 124#endif
110 125
111 /* 126 late_time_init = sh_late_time_init;
112 * Make sure all compiled-in early timers register themselves.
113 *
114 * Run probe() for two "earlytimer" devices, these will be the
115 * clockevents and clocksource devices respectively. In the event
116 * that only a clockevents device is available, we -ENODEV on the
117 * clocksource and the jiffies clocksource is used transparently
118 * instead. No error handling is necessary here.
119 */
120 early_platform_driver_register_all("earlytimer");
121 early_platform_driver_probe("earlytimer", 2, 0);
122} 127}