]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SPARC32]: Fix rounding errors in ndelay/udelay implementation.
authorMark Fortescue <mark@mtfhpc.demon.co.uk>
Thu, 30 Aug 2007 04:07:11 +0000 (06:07 +0200)
committerAdrian Bunk <bunk@stusta.de>
Thu, 30 Aug 2007 04:07:11 +0000 (06:07 +0200)
commiteb845a0bad412b7caa04383715d59399de8b5c11
treec76ed873c1a9f188d7a61b17c33328b16a7f3577
parent7380487e55320420da6277820f2825ec456406eb
[SPARC32]: Fix rounding errors in ndelay/udelay implementation.

__ndelay and __udelay have not been delayung >= specified time.
The problem with __ndelay has been tacked down to the rounding of the
multiplier constant. By changing this, delays > app 18us are correctly
calculated.
The problem with __udelay has also been tracked down to rounding issues.
Changing the multiplier constant (to match that used in sparc64) corrects
for large delays and adding in a rounding constant corrects for trunctaion
errors in the claculations.
Many short delays will return without looping. This is not an error as there
is the fixed delay of doing all the maths to calculate the loop count.

Signed-off-by: Mark Fortescue <mark@mtfhpc.demon.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
arch/sparc/kernel/entry.S