Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82b24221 authored by Paul Mundt's avatar Paul Mundt
Browse files

Revert "sh: Bump the earlytimer bits back to time_init()."



This reverts commit 1d29ebeb.

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 3725f28b
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -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;
}