Skip to content

Commit

Permalink
Revert "sh: Bump the earlytimer bits back to time_init()."
Browse files Browse the repository at this point in the history
This reverts commit 1d29ebe.

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>
  • Loading branch information
Paul Mundt committed Jul 29, 2009
1 parent 3725f28 commit 82b2422
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions arch/sh/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}

0 comments on commit 82b2422

Please sign in to comment.