]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/time: Sanity check of decrementer expiration is necessary
authorPaul Mackerras <paulus@samba.org>
Fri, 1 Jun 2012 08:13:43 +0000 (18:13 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 8 Jun 2012 04:07:35 +0000 (14:07 +1000)
commit537f20d44baa73e4f8af3342a35211a648608547
treecba719d5e2b8d1bf8643e7a28b386be9cbb636ea
parenta37c45859bb7a3b7a6d3c2dc0a4466159cbaa6fe
powerpc/time: Sanity check of decrementer expiration is necessary

This reverts f386efbd4d ("powerpc/time: Remove unnecessary sanity check
of decrementer expiration").  We do need to check whether we have reached
the expiration time of the next event, because we sometimes get an early
decrementer interrupt, most notably when we set the decrementer to 1 in
arch_irq_work_raise().  The effect of not having the sanity check is that
if timer_interrupt() gets called early, we leave the decrementer set to
its maximum value, which means we then don't get any more decrementer
interrupts for about 4 seconds (or longer, depending on timebase
frequency).  I saw these pauses as a consequence of getting a stray
hypervisor decrementer interrupt left over from exiting a KVM guest.

This isn't quite a straight revert because of changes to the surrounding
code, but it restores the same algorithm as was previously used.

Cc: stable@vger.kernel.org
Acked-by: Anton Blanchard <anton@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/time.c