1. 17 6月, 2008 1 次提交
    • J
      x86: fix bug in arch/i386/lib/delay.c file, delay_loop function · e01b70ef
      Jiri Hladky 提交于
      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: NIngo Molnar <mingo@elte.hu>
      e01b70ef
  2. 16 6月, 2008 14 次提交
  3. 15 6月, 2008 1 次提交
  4. 14 6月, 2008 1 次提交
  5. 13 6月, 2008 23 次提交