]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: SMTC: Fix lockup in smtc_distribute_timer
authorKevin D. Kissell <kevink@paralogos.com>
Tue, 10 Nov 2009 19:45:46 +0000 (11:45 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 Nov 2009 17:10:38 +0000 (18:10 +0100)
commit382bc67924c12d585aab168ec95ef1b66f6c0cc4
tree9d60800fa2b9678c53fc78f3100821c20184e2c1
parent43844057d1f14144d147f6bac1e705412575f9a6
MIPS: SMTC: Fix lockup in smtc_distribute_timer

1. At the end of smtc_distribute_timer, nextstamp is valid and has already
   passed so we goto repeat.
2. Nothing updates nextstamp (only updated if the timeout is in the future
   And we just decided it is in the past)
3. At the end nextstamp still has the same value so it is still valid and
   in the past.
4. This repeats until read_c0_count has a value which causes nextstamp to
   be in the future.

Reported and initial patch and testing  by Mikael Starvik
<mikael.starvik@axis.com>.

Signed-off-by: Kevin D. Kissell <kevink@paralogos.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: linux-mips@linux-mips.org
Cc: Jesper Nilsson <Jesper.Nilsson@axis.com>
Patchwork: http://patchwork.linux-mips.org/patch/621/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cevt-smtc.c