Commit cb95413971d605b0d152d3ceecc47ba8991d66fb
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner: "A single bugfix for an init order problem in the sun4i subarch clockevents code" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clockevent: sun4i: Fix race condition in the probe code
Showing 1 changed file Side-by-side Diff
drivers/clocksource/sun4i_timer.c
... | ... | @@ -182,6 +182,12 @@ |
182 | 182 | /* Make sure timer is stopped before playing with interrupts */ |
183 | 183 | sun4i_clkevt_time_stop(0); |
184 | 184 | |
185 | + sun4i_clockevent.cpumask = cpu_possible_mask; | |
186 | + sun4i_clockevent.irq = irq; | |
187 | + | |
188 | + clockevents_config_and_register(&sun4i_clockevent, rate, | |
189 | + TIMER_SYNC_TICKS, 0xffffffff); | |
190 | + | |
185 | 191 | ret = setup_irq(irq, &sun4i_timer_irq); |
186 | 192 | if (ret) |
187 | 193 | pr_warn("failed to setup irq %d\n", irq); |
... | ... | @@ -189,12 +195,6 @@ |
189 | 195 | /* Enable timer0 interrupt */ |
190 | 196 | val = readl(timer_base + TIMER_IRQ_EN_REG); |
191 | 197 | writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG); |
192 | - | |
193 | - sun4i_clockevent.cpumask = cpu_possible_mask; | |
194 | - sun4i_clockevent.irq = irq; | |
195 | - | |
196 | - clockevents_config_and_register(&sun4i_clockevent, rate, | |
197 | - TIMER_SYNC_TICKS, 0xffffffff); | |
198 | 198 | } |
199 | 199 | CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer", |
200 | 200 | sun4i_timer_init); |