]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] nohz: Fix __udelay.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 3 Oct 2008 19:54:59 +0000 (21:54 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 3 Oct 2008 19:55:54 +0000 (21:55 +0200)
commitef624f9918a6da80b33e69441f4ef8997fc532de
treedf5d69d40dbdaf5e5014a6ce41909e7236a196c1
parent51c23f70328641ba7f505433f09ce9bf579e68f5
[S390] nohz: Fix __udelay.

This fixes a regression that came with 6a200c61c4ea64f2f449cb8ea71a6e09517105a0
("[S390] nohz/sclp: disable timer on synchronous waits.").
If udelay() gets called from a disabled context it sets the clock comparator
to a value where it expects the next interrupt. When the interrupt happens
the clock comparator gets not reset and therefore the interrupt condition
doesn't get cleared. The result is an endless timer interrupt loop.

In addition this patch fixes also the following:

rcutorture reveals that our __udelay implementation is still buggy,
since it might schedule tasklets, but prevents their execution:

NOHZ: local_softirq_pending 42
NOHZ: local_softirq_pending 02
NOHZ: local_softirq_pending 142
NOHZ: local_softirq_pending 02

To fix this we make sure that only the clock comparator interrupt
is enabled when the enabled wait psw is loaded.
Also no code gets called anymore which might schedule tasklets.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/time.c
arch/s390/lib/delay.c