aboutsummaryrefslogtreecommitdiff
path: root/arch/tile
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-06-02 23:41:46 +0530
committerGary S. Robertson <gary.robertson@linaro.org>2015-01-19 19:14:01 -0600
commitdbc876606a3324b4be6af84eeed515131ce230b1 (patch)
tree5386b79e1cb6b30ab695cc76ffbd7ef9cee930e6 /arch/tile
parent09a1b3920044ef7837f643518413d718ba55c669 (diff)
clockevent: drivers: don't disable events for unsupported modes
'->set_dev_mode()' callback of clockevent drivers gets called when core tries to change 'mode' of a clockevent device. Clockevent drivers should change to the requested mode unless mode isn't supported by driver. Ideally, drivers shouldn't change state/mode of clockevent devices when the requested mode isn't supported by driver and the clockevent device should continue to work as if nothing happened. But, few clockevent drivers are always disabling events from their ->set_dev_mode() callbacks and they stay disabled for 'default case' (we reach here for unsupported modes only) as well. For these drivers, clockevents core wouldn't be sure about state/mode of clockevent device once ->set_dev_mode() failed and we *may* see some strange behavior as the clockevent device isn't configured to the right mode by kernel again. This patch tries to make sure such drivers don't left events disabled for unsupported modes. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/time.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c
index 994eef445c38..b81b7df07b30 100644
--- a/arch/tile/kernel/time.c
+++ b/arch/tile/kernel/time.c
@@ -143,14 +143,13 @@ static int tile_timer_set_next_event(unsigned long ticks,
static int tile_timer_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt)
{
- arch_local_irq_mask_now(INT_TILE_TIMER);
-
switch (mode) {
case CLOCK_EVT_MODE_ONESHOT:
case CLOCK_EVT_MODE_UNUSED:
case CLOCK_EVT_MODE_SHUTDOWN:
case CLOCK_EVT_MODE_ONESHOT_STOPPED:
case CLOCK_EVT_MODE_RESUME:
+ arch_local_irq_mask_now(INT_TILE_TIMER);
break;
default:
return -ENOSYS;