]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] __div64_32 for 31 bit.
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 28 Sep 2006 14:55:39 +0000 (16:55 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 28 Sep 2006 14:55:39 +0000 (16:55 +0200)
commit88008ee4b9ddbd6f77f0e310b77d86e8ef72a871
treeea8870ef06c3723ad59b78aac97bfe8152894c72
parentde9fa76afa2519b66a174be8a03851d569b411be
[S390] __div64_32 for 31 bit.

The clocksource infrastructure introduced with commit
6d574399dc74e6b6f8181f6c1d378ae1750a0803 broke 31 bit s390.
The reason is that the do_div() primitive for 31 bit always
had a restriction: it could only divide an unsigned 64 bit
integer by an unsigned 31 bit integer. The clocksource code
now uses do_div() with a base value that has the most
significant bit set. The result is that clock->cycle_interval
has a funny value which causes the linux time to jump around
like mad.
The solution is "obvious": implement a proper __div64_32
function for 31 bit s390.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Kconfig
arch/s390/lib/Makefile
arch/s390/lib/div64.c [new file with mode: 0644]
include/asm-s390/div64.h