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:28:12 +0000 (11:28 -0800)
commit00c5535698d5db83a3cd15d7f6a9b95c71044b4d
treeda442ae53e9889a6140af5d59151d4aecf2e0aee
parentb8600e27f208d08a5924d34d3b44f5564fa83e7f
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