]> git.baikalelectronics.ru Git - kernel.git/commit
OMAP2+: clocksource: fix crash on boot when !CONFIG_OMAP_32K_TIMER
authorPaul Walmsley <paul@pwsan.com>
Wed, 23 Feb 2011 02:59:49 +0000 (19:59 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 24 Feb 2011 20:21:21 +0000 (12:21 -0800)
commit0368844b041b8cadf42613e6542598f8573bdf6a
treeeac5f9ed25b96e64a664f5af441e0c238e44cd18
parentbf4037ae0c0c8cff4bec0adfb5981ccecb8d3f7b
OMAP2+: clocksource: fix crash on boot when !CONFIG_OMAP_32K_TIMER

OMAP2+ kernels built without CONFIG_OMAP_32K_TIMER crash on boot after the
2.6.38 sched_clock changes:

[    0.000000] OMAP clockevent source: GPTIMER1 at 13000000 Hz
[    0.000000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    0.000000] pgd = c0004000
[    0.000000] [00000000] *pgd=00000000
[    0.000000] Internal error: Oops: 80000005 [#1] SMP
[    0.000000] last sysfs file:
[    0.000000] Modules linked in:
[    0.000000] CPU: 0    Not tainted  (2.6.38-rc5-00057-g04aa67d #152)
[    0.000000] PC is at 0x0
[    0.000000] LR is at sched_clock_poll+0x2c/0x3c

Without CONFIG_OMAP_32K_TIMER, the kernel has an clockevent and
clocksource resolution about three orders of magnitude higher than
with CONFIG_OMAP_32K_TIMER set.  The tradeoff is that the lowest
power consumption states are not available.

Fix by calling init_sched_clock() from the GPTIMER clocksource init code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/timer-gp.c