ARM: twd: register clockevents device before enabling PPI
authorWill Deacon <will.deacon@arm.com>
Wed, 20 Jul 2011 13:18:46 +0000 (14:18 +0100)
committer黄涛 <huangtao@rock-chips.com>
Wed, 22 Feb 2012 06:09:45 +0000 (14:09 +0800)
commit9f70ef65c4132afb1258390280f579acd32ad747
treebdd9c57aa0d05b1dfe0c5bf491fdb00748bdc714
parent702f53a01986ff6c4dea1c15de51d34f386e85e7
ARM: twd: register clockevents device before enabling PPI

The smp_twd clockevents driver currently enables the local timer PPI
before the clockevents device is registered. This can lead to a kernel
panic if a spurious timer interrupt is generated before registration
has completed since the kernel will treat it as an IPI timer.

This patch moves the clockevents device registration before the IRQ
unmasking so that we can always handle timer interrupts once they can
occur.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/smp_twd.c