diff mbox

[2/2] clocksource: sun4i: change CPU mask to cpu_possible_mask

Message ID 1382699771-4396-3-git-send-email-maxime.ripard@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maxime Ripard Oct. 25, 2013, 11:16 a.m. UTC
The interrupt for the timer is a shared processor interrupt, so any CPU
found in the system can handle it. Switch to our cpumask to
cpu_possible_mask instead of cpumask_of(0).

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/clocksource/sun4i_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Boyd Oct. 28, 2013, 4:19 p.m. UTC | #1
On 10/25/13 04:16, Maxime Ripard wrote:
> The interrupt for the timer is a shared processor interrupt, so any CPU
> found in the system can handle it. Switch to our cpumask to
> cpu_possible_mask instead of cpumask_of(0).
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Daniel Lezcano Nov. 7, 2013, 10:19 a.m. UTC | #2
On 10/25/2013 01:16 PM, Maxime Ripard wrote:
> The interrupt for the timer is a shared processor interrupt, so any CPU
> found in the system can handle it. Switch to our cpumask to
> cpu_possible_mask instead of cpumask_of(0).
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied to my tree for 3.14

Thanks !

sidenote: did you look at the CLOCK_EVT_FEAT_DYNIRQ flag ? It may reduce 
the number of wakeup for your system.

> ---
>   drivers/clocksource/sun4i_timer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
> index a7f492e..6a76b4e 100644
> --- a/drivers/clocksource/sun4i_timer.c
> +++ b/drivers/clocksource/sun4i_timer.c
> @@ -187,7 +187,7 @@ static void __init sun4i_timer_init(struct device_node *node)
>   	val = readl(timer_base + TIMER_IRQ_EN_REG);
>   	writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG);
>
> -	sun4i_clockevent.cpumask = cpumask_of(0);
> +	sun4i_clockevent.cpumask = cpu_possible_mask;
>   	sun4i_clockevent.irq = irq;
>
>   	clockevents_config_and_register(&sun4i_clockevent, rate,
>
Maxime Ripard Nov. 10, 2013, 9:52 a.m. UTC | #3
Hi Daniel,

On Thu, Nov 07, 2013 at 11:19:41AM +0100, Daniel Lezcano wrote:
> On 10/25/2013 01:16 PM, Maxime Ripard wrote:
> >The interrupt for the timer is a shared processor interrupt, so any CPU
> >found in the system can handle it. Switch to our cpumask to
> >cpu_possible_mask instead of cpumask_of(0).
> >
> >Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Applied to my tree for 3.14

Thanks!

> sidenote: did you look at the CLOCK_EVT_FEAT_DYNIRQ flag ? It may
> reduce the number of wakeup for your system.

Not yet, but I'll give it a look for sure :)

Maxime
diff mbox

Patch

diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
index a7f492e..6a76b4e 100644
--- a/drivers/clocksource/sun4i_timer.c
+++ b/drivers/clocksource/sun4i_timer.c
@@ -187,7 +187,7 @@  static void __init sun4i_timer_init(struct device_node *node)
 	val = readl(timer_base + TIMER_IRQ_EN_REG);
 	writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG);
 
-	sun4i_clockevent.cpumask = cpumask_of(0);
+	sun4i_clockevent.cpumask = cpu_possible_mask;
 	sun4i_clockevent.irq = irq;
 
 	clockevents_config_and_register(&sun4i_clockevent, rate,