s390/spinlock: do not yield to a CPU in udelay/mdelay
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 19 Nov 2015 10:09:45 +0000 (11:09 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Nov 2015 08:24:18 +0000 (09:24 +0100)
commit419123f900dac58fb27ce5285b21074f5300095a
treed0b0d72691d4e2e3df0e9f4d2e335bebc378fdeb
parentc6f70d3b8a32fdec60d3f78cb59423f056f16688
s390/spinlock: do not yield to a CPU in udelay/mdelay

It does not make sense to try to relinquish the time slice with diag 0x9c
to a CPU in a state that does not allow to schedule the CPU. The scenario
where this can happen is a CPU waiting in udelay/mdelay while holding a
spin-lock.

Add a CIF bit to tag a CPU in enabled wait and use it to detect that the
yield of a CPU will not be successful and skip the diagnose call.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/processor.h
arch/s390/kernel/entry.S
arch/s390/lib/spinlock.c