ARM: twd: register clockevents device before enabling PPI
commitdfc40b24c0a37593724f3317cd485c73ee878c18
authorWill Deacon <will.deacon@arm.com>
Wed, 20 Jul 2011 13:18:46 +0000 (20 14:18 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 12 Aug 2011 14:41:08 +0000 (12 15:41 +0100)
tree03d500255c01936d8c2dbee8106faee13a37211f
parent5cb843ca0f781b62dc9793b26926d0b8efef5576
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