diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-27 18:58:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-27 18:58:20 -0400 |
commit | aa699a1d84474eb993867822b6aefc47a9a6ce0c (patch) | |
tree | 8a9ac250f1304f926d2421fe56f841d996a10a22 | |
parent | 758b67126facde350bcbfbb1cd760aa6050f8647 (diff) | |
parent | acbf6d21ac81195071b97ebb114b0b37bd9fcc86 (diff) |
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
-rw-r--r-- | drivers/clocksource/tcb_clksrc.c | 8 | ||||
-rw-r--r-- | drivers/clocksource/timer-marco.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 00fdd1170284..a8d7ea14f183 100644 --- a/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c | |||
@@ -100,7 +100,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) | |||
100 | || tcd->clkevt.mode == CLOCK_EVT_MODE_ONESHOT) { | 100 | || tcd->clkevt.mode == CLOCK_EVT_MODE_ONESHOT) { |
101 | __raw_writel(0xff, regs + ATMEL_TC_REG(2, IDR)); | 101 | __raw_writel(0xff, regs + ATMEL_TC_REG(2, IDR)); |
102 | __raw_writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR)); | 102 | __raw_writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR)); |
103 | clk_disable_unprepare(tcd->clk); | 103 | clk_disable(tcd->clk); |
104 | } | 104 | } |
105 | 105 | ||
106 | switch (m) { | 106 | switch (m) { |
@@ -109,7 +109,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) | |||
109 | * of oneshot, we get lower overhead and improved accuracy. | 109 | * of oneshot, we get lower overhead and improved accuracy. |
110 | */ | 110 | */ |
111 | case CLOCK_EVT_MODE_PERIODIC: | 111 | case CLOCK_EVT_MODE_PERIODIC: |
112 | clk_prepare_enable(tcd->clk); | 112 | clk_enable(tcd->clk); |
113 | 113 | ||
114 | /* slow clock, count up to RC, then irq and restart */ | 114 | /* slow clock, count up to RC, then irq and restart */ |
115 | __raw_writel(timer_clock | 115 | __raw_writel(timer_clock |
@@ -126,7 +126,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) | |||
126 | break; | 126 | break; |
127 | 127 | ||
128 | case CLOCK_EVT_MODE_ONESHOT: | 128 | case CLOCK_EVT_MODE_ONESHOT: |
129 | clk_prepare_enable(tcd->clk); | 129 | clk_enable(tcd->clk); |
130 | 130 | ||
131 | /* slow clock, count up to RC, then irq and stop */ | 131 | /* slow clock, count up to RC, then irq and stop */ |
132 | __raw_writel(timer_clock | ATMEL_TC_CPCSTOP | 132 | __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 | ret = clk_prepare_enable(t2_clk); | 194 | ret = clk_prepare_enable(t2_clk); |
195 | if (ret) | 195 | if (ret) |
196 | return ret; | 196 | return ret; |
197 | clk_disable_unprepare(t2_clk); | 197 | clk_disable(t2_clk); |
198 | 198 | ||
199 | clkevt.regs = tc->regs; | 199 | clkevt.regs = tc->regs; |
200 | clkevt.clk = t2_clk; | 200 | clkevt.clk = t2_clk; |
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c index b52e1c078b99..7f5374dbefd9 100644 --- a/drivers/clocksource/timer-marco.c +++ b/drivers/clocksource/timer-marco.c | |||
@@ -199,7 +199,7 @@ static int sirfsoc_local_timer_setup(struct clock_event_device *ce) | |||
199 | 199 | ||
200 | action->dev_id = ce; | 200 | action->dev_id = ce; |
201 | BUG_ON(setup_irq(ce->irq, action)); | 201 | BUG_ON(setup_irq(ce->irq, action)); |
202 | irq_set_affinity(action->irq, cpumask_of(cpu)); | 202 | irq_force_affinity(action->irq, cpumask_of(cpu)); |
203 | 203 | ||
204 | clockevents_register_device(ce); | 204 | clockevents_register_device(ce); |
205 | return 0; | 205 | return 0; |