Skip to contentSkip to conversation

clocksource : nomadik-mtu : fix missing irq initialization

PATCH In review Daniel Lezcano 3 participants 4 messages Feb 22, 2013 – Feb 23, 2013 Clocksource, clockevent drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource : nomadik-mtu : fix missing irq initialization

This patch fix the clock device irq field which is not initialized.

---
 drivers/clocksource/nomadik-mtu.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/nomadik-mtu.c +1 -0
index 8914c3c..7cbcaa0 100644
@@ -226,5 +226,6 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
 	/* Timer 1 is used for events, register irq and clockevents */
 	setup_irq(irq, &nmdk_timer_irq);
 	nmdk_clkevt.cpumask = cpumask_of(0);
+	nmdk_clkevt.irq = irq;
 	clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
 }
Signature · 1 line
1.7.9.5
#1 lore raw

[tip:timers/urgent] clocksource : Nomadik-mtu : fix missing irq initialization

clocksource : Nomadik-mtu : fix missing irq initialization
Commit-ID:  00f4e13c4634b10f6a16b26a980b22a53dfa6bb5
Gitweb:     http://git.kernel.org/tip/00f4e13c4634b10f6a16b26a980b22a53dfa6bb5
Author:     Daniel Lezcano <[email protected]>
AuthorDate: Fri, 22 Feb 2013 16:44:30 +0100
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Fri, 22 Feb 2013 16:47:59 +0100

clocksource : Nomadik-mtu : fix missing irq initialization

This patch fix the clock device irq field which is not initialized.

---
 drivers/clocksource/nomadik-mtu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/nomadik-mtu.c +1 -0
index 8914c3c..7cbcaa0 100644
@@ -226,5 +226,6 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
 	/* Timer 1 is used for events, register irq and clockevents */
 	setup_irq(irq, &nmdk_timer_irq);
 	nmdk_clkevt.cpumask = cpumask_of(0);
+	nmdk_clkevt.irq = irq;
 	clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
 }
Acked-by on v1 1/1
#2 lore raw
In reply to Daniel Lezcano
Quoted 3 lines · Daniel Lezcano

This patch fix the clock device irq field which is not initialized.

Makes perfect sense:

Sorry that I might have missed some background here or just be out-of-track with things, how did this driver work for years without the irq assigned? Or was this field recently introduced?

Yours,
linus Walleij

#3 lore raw
Quoted 5 lines · Linus Walleij
Quoted 2 lines · Daniel Lezcano

This patch fix the clock device irq field which is not initialized.

Quoted 8 lines
Quoted 1 line

Makes perfect sense:

Sorry that I might have missed some background here or just be out-of-track with things, how did this driver work for years without the irq assigned? Or was this field recently introduced?

The irq is assigned through:

setup_irq(irq, &nmdk_timer_irq);

two lines above but the clockevent's irq field was not set.

I did not investigate a lot, but at the first glance it worked because the code path used by the default kernel configuration (CONFIG_NO_HZ) does not use this field.

But when using the dynamic irq affinity [1], I noticed it was set to 0.

[1] http://www.spinics.net/lists/arm-kernel/msg226371.html

Thanks
-- Daniel

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