android_kernel_samsung_msm8976/arch
Heiko Carstens ed4f20943c s390/time: fix sched_clock() overflow
Converting a 64 Bit TOD format value to nanoseconds means that the value
must be divided by 4.096. In order to achieve that we multiply with 125
and divide by 512.
When used within sched_clock() this triggers an overflow after appr.
417 days. Resulting in a sched_clock() return value that is much smaller
than previously and therefore may cause all sort of weird things in
subsystems that rely on a monotonic sched_clock() behaviour.

To fix this implement a tod_to_ns() helper function which converts TOD
values without overflow and call this function from both places that
open coded the conversion: sched_clock() and kvm_s390_handle_wait().

Cc: stable@kernel.org
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-01-16 15:57:52 +01:00
..
alpha
arm Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-01-09 08:58:57 -08:00
arm64
avr32
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-01-07 07:39:32 -08:00
mips Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-01-07 07:50:41 -08:00
mn10300 arch/mn10300/Kconfig: select CONFIG_GENERIC_ATOMIC64 2013-01-11 14:54:55 -08:00
openrisc
parisc
powerpc Merge git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-01-10 09:05:18 -08:00
s390 s390/time: fix sched_clock() overflow 2013-01-16 15:57:52 +01:00
score
sh
sparc
tile
um
unicore32
x86 Merge git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-01-10 09:05:18 -08:00
xtensa
.gitignore
Kconfig