* [GIT PULL] clockevents: fixes for 3.15
@ 2014-05-23 10:40 Daniel Lezcano
2014-05-23 10:42 ` [PATCH 1/2] clocksource: marco: Fix the affinity set for local timer of CPU1 Daniel Lezcano
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Lezcano @ 2014-05-23 10:40 UTC (permalink / raw)
To: linux-arm-kernel
Hi Thomas, Ingo,
this pull request contains a couple of fixes:
* David Jander fixed the calls to clk_disable/clk_enable in the
tc_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(-)
--
<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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] clocksource: marco: Fix the affinity set for local timer of CPU1
2014-05-23 10:40 [GIT PULL] clockevents: fixes for 3.15 Daniel Lezcano
@ 2014-05-23 10:42 ` Daniel Lezcano
2014-05-23 10:43 ` [PATCH 2/2] clocksource: tcb_clksrc: Make tc_mode interrupt safe Daniel Lezcano
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Lezcano @ 2014-05-23 10:42 UTC (permalink / raw)
To: linux-arm-kernel
From: Zhiwu Song <Zhiwu.Song@csr.com>
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.
Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/timer-marco.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index b52e1c0..7f5374d 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)
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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] clocksource: tcb_clksrc: Make tc_mode interrupt safe
2014-05-23 10:42 ` [PATCH 1/2] clocksource: marco: Fix the affinity set for local timer of CPU1 Daniel Lezcano
@ 2014-05-23 10:43 ` Daniel Lezcano
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2014-05-23 10:43 UTC (permalink / raw)
To: linux-arm-kernel
From: David Jander <david@protonic.nl>
tc_mode() can be called from interrupt context and thus must not call
clk_*prepare*() functions.
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/clocksource/tcb_clksrc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 00fdd11..a8d7ea1 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)
|| 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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-23 10:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 10:40 [GIT PULL] clockevents: fixes for 3.15 Daniel Lezcano
2014-05-23 10:42 ` [PATCH 1/2] clocksource: marco: Fix the affinity set for local timer of CPU1 Daniel Lezcano
2014-05-23 10:43 ` [PATCH 2/2] clocksource: tcb_clksrc: Make tc_mode interrupt safe Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).