ARM: localtimer: clean up local timer on hot unplug
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 20 Dec 2010 14:28:02 +0000 (14:28 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 20 Dec 2010 15:09:16 +0000 (15:09 +0000)
commit10034aabca9032246762daaca3152f3e79380ea0
tree32c0143b054ab6c5beeeb9726eaf86b87f2abd80
parente3d9c625f5e4158014e041f492b46e38ad10987e
ARM: localtimer: clean up local timer on hot unplug

When a CPU is hot unplugged, the generic tick code cleans up the
clock event device, but fails to call down to the device's set_mode
function to actually shut the device down.

To work around this, we've historically had a local_timer_stop()
callback out of the hotplug code.  However, this adds needless
complexity when we have the clock event device itself available.

Explicitly call the clock event device's set_mode function with
CLOCK_EVT_MODE_UNUSED, so that the hardware can be cleanly shutdown
without any special external callbacks.  When/if the generic code
is fixed, percpu_timer_stop() can be killed off.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/localtimer.h
arch/arm/include/asm/smp_twd.h
arch/arm/kernel/smp.c
arch/arm/kernel/smp_twd.c