clockevents: fixes for 3.15
Hi Thomas, Ingo,
this pull request contains a couple of fixes:
* David Jander fixed the calls to clk_disable/clk_enable in thetc_mode function as this could be called in an interrupt context
* Zhiwu Song forces the irq affinity on the marco timer as the
initialization can happen before the cpu to affine is up
Thanks
-- Daniel
The following changes since commit 84ea7fe37908254c3bd90910921f6e1045c1747a:
hrtimer: Set expiry time before switch_hrtimer_base() (2014-05-12
10:47:39 +0200)
are available in the git repository at:
git://git.linaro.org/people/daniel.lezcano/linux.git
clockevents/3.15-fixes
for you to fetch changes up to acbf6d21ac81195071b97ebb114b0b37bd9fcc86:
clocksource: tcb_clksrc: Make tc_mode interrupt safe (2014-05-22
18:54:58 +0200)
----------------------------------------------------------------
David Jander (1):
clocksource: tcb_clksrc: Make tc_mode interrupt safe
Zhiwu Song (1):
clocksource: marco: Fix the affinity set for local timer of CPU1
drivers/clocksource/tcb_clksrc.c | 8 ++++---- drivers/clocksource/timer-marco.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 2/2 clocksource: tcb_clksrc: Make tc_mode interrupt safe
In reply to Daniel LezcanoFrom: David Jander <[email protected]>
tc_mode() can be called from interrupt context and thus must not call clk_*prepare*() functions.
--- drivers/clocksource/tcb_clksrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clocksource/tcb_clksrc.c +4 -4
@@ -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) {__raw_writel (0xff , regs +ATMEL_TC_REG (2 ,IDR ));__raw_writel (ATMEL_TC_CLKDIS , regs +ATMEL_TC_REG (2 ,CCR )); -clk_disable_unprepare (tcd->clk); +clk_disable (tcd->clk); }switch (m) {
@@ -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. */ case CLOCK_EVT_MODE_PERIODIC : -clk_prepare_enable (tcd->clk); +clk_enable (tcd->clk);/* slow clock, count up to RC, then irq and restart */ __raw_writel(timer_clock
@@ -126,7 +126,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d)break ;case CLOCK_EVT_MODE_ONESHOT : -clk_prepare_enable (tcd->clk); +clk_enable (tcd->clk);/* slow clock, count up to RC, then irq and stop */ __raw_writel(timer_clock | ATMEL_TC_CPCSTOP
@@ -194,7 +194,7 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx) ret =clk_prepare_enable (t2_clk);if (ret)return ret; -clk_disable_unprepare (t2_clk); +clk_disable (t2_clk); clkevt.regs = tc->regs; clkevt.clk = t2_clk;
Signature · 1 line
1.7.9.5
PATCH 1/2 clocksource: marco: Fix the affinity set for local timer of CPU1
In reply to Daniel LezcanoFrom: Zhiwu Song <[email protected]>
irqchip will reject the affinity set to CPUs which is not online yet. but in the CPU1 wakeup stage, OS only sets CPU1 to be online after local timer is set, so that causes the irq_set_affinity not work. this patch moves to irq_force_affinity() for the low level boot stage.
--- drivers/clocksource/timer-marco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-marco.c +1 -1
@@ -199,7 +199,7 @@ static int sirfsoc_local_timer_setup(struct clock_event_device *ce) action->dev_id = ce;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);return 0 ;
Signature · 1 line
1.7.9.5