timer fixes for 4.2
Subsystems (3)
Linus,
please pull the latest timers-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus
Two minimalistic fixes for 4.2 regressions:
- Eric fixed a thinko in the timer_list base switching code caused by the overhaul of the timer wheel. It can cause a cpu to see the wrong base for a timer while we move the timer around.
- Guenter fixed a regression for IMX if booted w/o device tree, where the timer interrupt is not initialized and therefor the machine fails to boot.
Thanks,
tglx
------------------>
Eric Dumazet (1):
timer: Write timer->flags atomically
Guenter Roeck (1):
clocksource/imx: Fix boot with non-DT systems
drivers/clocksource/timer-imx-gpt.c | 1 + kernel/time/timer.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/clocksource/timer-imx-gpt.c +1 -0
@@ -462,6 +462,7 @@ void __init mxc_timer_init(unsigned long pbase, int irq, enum imx_gpt_type type)BUG_ON (!imxtm->base); imxtm->type = type; + imxtm->irq = irq;_mxc_timer_init (imxtm); }
kernel/time/timer.c +2 -2
@@ -807,8 +807,8 @@ __mod_timer(struct timer_list *timer, unsigned long expires,spin_unlock (&base->lock); base = new_base;spin_lock (&base->lock); - timer->flags &= ~TIMER_BASEMASK ; - timer->flags |= base->cpu; +WRITE_ONCE (timer->flags, + (timer->flags & ~TIMER_BASEMASK ) | base->cpu); } }