Commit aa699a1d authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull two timer fixes from Thomas Gleixner:
 "Two small fixlets for ARM SoC clocksource drivers:

   - avoid calling functions which might sleep from interrupt [disabled]
     context in tcb_clksrc used on Atmel SoCs

   - use irq_force_affinity() to pin the per cpu timer interrupt on a
     not yet online cpu in the SiRFprimaII driver"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: tcb_clksrc: Make tc_mode interrupt safe
  clocksource: marco: Fix the affinity set for local timer of CPU1
parents 758b6712 acbf6d21
...@@ -100,7 +100,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) ...@@ -100,7 +100,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d)
|| tcd->clkevt.mode == CLOCK_EVT_MODE_ONESHOT) { || tcd->clkevt.mode == CLOCK_EVT_MODE_ONESHOT) {
__raw_writel(0xff, regs + ATMEL_TC_REG(2, IDR)); __raw_writel(0xff, regs + ATMEL_TC_REG(2, IDR));
__raw_writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR)); __raw_writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR));
clk_disable_unprepare(tcd->clk); clk_disable(tcd->clk);
} }
switch (m) { switch (m) {
...@@ -109,7 +109,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) ...@@ -109,7 +109,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d)
* of oneshot, we get lower overhead and improved accuracy. * of oneshot, we get lower overhead and improved accuracy.
*/ */
case CLOCK_EVT_MODE_PERIODIC: case CLOCK_EVT_MODE_PERIODIC:
clk_prepare_enable(tcd->clk); clk_enable(tcd->clk);
/* slow clock, count up to RC, then irq and restart */ /* slow clock, count up to RC, then irq and restart */
__raw_writel(timer_clock __raw_writel(timer_clock
...@@ -126,7 +126,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) ...@@ -126,7 +126,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d)
break; break;
case CLOCK_EVT_MODE_ONESHOT: case CLOCK_EVT_MODE_ONESHOT:
clk_prepare_enable(tcd->clk); clk_enable(tcd->clk);
/* slow clock, count up to RC, then irq and stop */ /* slow clock, count up to RC, then irq and stop */
__raw_writel(timer_clock | ATMEL_TC_CPCSTOP __raw_writel(timer_clock | ATMEL_TC_CPCSTOP
...@@ -194,7 +194,7 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx) ...@@ -194,7 +194,7 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
ret = clk_prepare_enable(t2_clk); ret = clk_prepare_enable(t2_clk);
if (ret) if (ret)
return ret; return ret;
clk_disable_unprepare(t2_clk); clk_disable(t2_clk);
clkevt.regs = tc->regs; clkevt.regs = tc->regs;
clkevt.clk = t2_clk; clkevt.clk = t2_clk;
......
...@@ -199,7 +199,7 @@ static int sirfsoc_local_timer_setup(struct clock_event_device *ce) ...@@ -199,7 +199,7 @@ static int sirfsoc_local_timer_setup(struct clock_event_device *ce)
action->dev_id = ce; action->dev_id = ce;
BUG_ON(setup_irq(ce->irq, action)); BUG_ON(setup_irq(ce->irq, action));
irq_set_affinity(action->irq, cpumask_of(cpu)); irq_force_affinity(action->irq, cpumask_of(cpu));
clockevents_register_device(ce); clockevents_register_device(ce);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment