s390/vtime: correct idle time calculation
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 28 Oct 2013 11:15:32 +0000 (12:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2013 19:11:53 +0000 (11:11 -0800)
commitd4f2a840c79ca283a453b9cd6329ccb530cb0f70
tree0f52787f2afc6938c7b7c89828b3de4cb2650e93
parentf3170c7a91c9520eeb6d2c13d0897172ebd6c228
s390/vtime: correct idle time calculation

commit 4560e7c3317c7a2b370e36dadd3a3bac2ed70818 upstream.

Use the ACCESS_ONCE macro for both accesses to idle->sequence in the
loops to calculate the idle time. If only one access uses the macro,
the compiler is free to cache the value for the second access which
can cause endless loops.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/smp.c
arch/s390/kernel/vtime.c