smp_twd: make sure timer is stopped before registering it
authorMarc Zyngier <(address hidden)>
Fri, 10 Feb 2012 10:50:26 +0000 (15:50 +0530)
committerSimone Willett <swillett@nvidia.com>
Thu, 8 Mar 2012 22:05:33 +0000 (14:05 -0800)
commit01cd745f0db07b1a130ac86ba6c33751c33d8743
tree51e8451a32999616d532547e7a9e5b8a227c734f
parentc36b6a4a17bc9e8b4407b5d960cec385d4fe180f
smp_twd: make sure timer is stopped before registering it

On secondary CPUs, the Timer Control Register is not reset
to a sane value before the timer is registered, and the TRM
doesn't seem to indicate any reset value either. In some cases,
the kernel will take an interrupt too early, depending on what
junk was present in the registers at reset time.

The fix is to set the Timer Control Register to 0 before
registering the clock_event_device and enabling the interrupt.

Problem seen on VE (Cortex A5) and Tegra.

Signed-off-by: Marc Zyngier <(address hidden)>
Change-Id: I52695f4f9a5c5e3a8973da7668b3b1352e60a80f
Reviewed-on: http://git-master/r/83085
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
arch/arm/kernel/smp_twd.c