]> git.baikalelectronics.ru Git - kernel.git/commit
s390/time: correct use of store clock fast
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Oct 2013 10:38:17 +0000 (12:38 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 22 Oct 2013 07:16:40 +0000 (09:16 +0200)
commit2a44ed30262aca2a70b5fba06aebfe9678426969
treeffd0d6272cd4e3f33b3069b22cb52457030a7f7a
parentf48c166571d9563d6501cb0c859d5079551004b1
s390/time: correct use of store clock fast

The result of the store-clock-fast (STCKF) instruction is a bit fuzzy.
It can happen that the value stored on one CPU is smaller than the value
stored on another CPU, although the order of the stores is the other
way around. This can cause deltas of get_tod_clock() values to become
negative when they should not be.

We need to be more careful with store-clock-fast, this patch partially
reverts git commit e4b7b4238e666682555461fa52eecd74652f36bb "time:
always use stckf instead of stck if available". The get_tod_clock()
function now uses the store-clock-extended (STCKE) instruction.
get_tod_clock_fast() can be used if the fuzziness of store-clock-fast
is acceptable e.g. for wait loops local to a CPU.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/timex.h
arch/s390/kernel/debug.c
arch/s390/kvm/interrupt.c
arch/s390/lib/delay.c
drivers/s390/char/sclp.c
drivers/s390/cio/cio.c
drivers/s390/cio/qdio_main.c