linux/arch/x86/lib
Jiri Hladky e01b70ef3e x86: fix bug in arch/i386/lib/delay.c file, delay_loop function
when trying to understand how Bogomips are implemented I have found a
bug in arch/i386/lib/delay.c file, delay_loop function.

The function fails for loops > 2^31+1. It because SF is set when dec
returns numbers > 2^31.

The fix is to use jnz instruction instead of jns (and add one decl
instruction to the end to have exactly the same number of loops as in
original version).

Martin Mares observed:

> It is a long time since I have hacked that file, but you should definitely
> make sure that the function is never called with a zero argument. In such
> case, the original version made just a single pass, but your version
> makes 2^32 of them.

fixed that.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-06-17 10:55:47 +02:00
..
checksum_32.S
clear_page_64.S
copy_page_64.S
copy_user_64.S
copy_user_nocache_64.S x86: fence oostores on 64-bit 2007-10-12 18:41:21 -07:00
csum-copy_64.S
csum-partial_64.c x86: fix csum_partial() export 2008-05-13 19:38:47 +02:00
csum-wrappers_64.c x86: clean up csum-wrappers_64.c some more 2008-02-19 16:18:32 +01:00
delay_32.c x86: fix bug in arch/i386/lib/delay.c file, delay_loop function 2008-06-17 10:55:47 +02:00
delay_64.c x86: enable preemption in delay 2008-06-04 13:11:46 +02:00
getuser_32.S
getuser_64.S
io_64.c x86: coding style fixes in arch/x86/lib/io_64.c 2008-02-19 16:18:32 +01:00
iomap_copy_64.S
Makefile x86, UML: remove x86-specific implementations of find_first_bit 2008-04-26 19:21:17 +02:00
memcpy_32.c x86: coding style fixes to arch/x86/lib/memcpy_32.c 2008-04-17 17:40:49 +02:00
memcpy_64.S
memmove_64.c x86: coding style fixes to arch/x86/lib/memmove_64.c 2008-04-17 17:40:48 +02:00
memset_64.S
mmx_32.c x86: clean up mmx_32.c 2008-04-17 17:40:47 +02:00
msr-on-cpu.c i386: simplify smp_call_function_single() call sequence in msr-on-cpu 2007-10-17 20:16:20 +02:00
putuser_32.S
putuser_64.S
rwlock_64.S x86: rename .i assembler includes to .h 2007-10-17 20:16:29 +02:00
semaphore_32.S Generic semaphore implementation 2008-04-17 10:42:34 -04:00
string_32.c x86: coding style fixes to arch/x86/lib/string_32.c 2008-04-17 17:40:48 +02:00
strstr_32.c x86: coding style fixes to arch/x86/lib/strstr_3 2008-04-17 17:40:49 +02:00
thunk_64.S Generic semaphore implementation 2008-04-17 10:42:34 -04:00
usercopy_32.c x86: coding style fixes to arch/x86/lib/usercopy_32.c 2008-04-17 17:40:51 +02:00
usercopy_64.c x86: use _ASM_EXTABLE macro in arch/x86/lib/usercopy_64.c 2008-02-04 16:47:57 +01:00