1. 24 Jun, 2008 2 commits
    • Alok Kataria's avatar
      x86: use cpu_khz for loops_per_jiffy calculation, cleanup · f3f3149f
      Alok Kataria authored
      As suggested by Ingo, remove all references to tsc from init/calibrate.c
      
      TSC is x86 specific, and using tsc in variable names in a generic file should
      be avoided. lpj_tsc is now called lpj_fine, since it is related to fine tuning
      of lpj value. Also tsc_rate_*  is called timer_rate_*
      Signed-off-by: default avatarAlok N Kataria <akataria@vmware.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Daniel Hecht <dhecht@vmware.com>
      Cc: Tim Mann <mann@vmware.com>
      Cc: Zach Amsden <zach@vmware.com>
      Cc: Sahil Rihan <srihan@vmware.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f3f3149f
    • Ingo Molnar's avatar
      x86: fix "x86: use cpu_khz for loops_per_jiffy calculation" · 6ff10de3
      Ingo Molnar authored
      fix:
      
      arch/x86/kernel/tsc_32.c: In function ‘tsc_init':
      arch/x86/kernel/tsc_32.c:421: error: ‘lpj_tsc' undeclared (first use in this function)
      arch/x86/kernel/tsc_32.c:421: error: (Each undeclared identifier is reported only once
      arch/x86/kernel/tsc_32.c:421: error: for each function it appears in.)
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6ff10de3
  2. 23 Jun, 2008 1 commit
    • Alok Kataria's avatar
      x86: use cpu_khz for loops_per_jiffy calculation · 3da757da
      Alok Kataria authored
      On the x86 platform we can use the value of tsc_khz computed during tsc
      calibration to calculate the loops_per_jiffy value. Its very important
      to keep the error in lpj values to minimum as any error in that may
      result in kernel panic in check_timer. In virtualization environment, On
      a highly overloaded host the guest delay calibration may sometimes
      result in errors beyond the ~50% that timer_irq_works can handle,
      resulting in the guest panicking.
      
      Does some formating changes to lpj_setup code to now have a single
      printk to print the bogomips value.
      
      We do this only for the boot processor because the AP's can have
      different base frequencies or the BIOS might boot a AP at a different
      frequency.
      Signed-off-by: default avatarAlok N Kataria <akataria@vmware.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Daniel Hecht <dhecht@vmware.com>
      Cc: Tim Mann <mann@vmware.com>
      Cc: Zach Amsden <zach@vmware.com>
      Cc: Sahil Rihan <srihan@vmware.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3da757da
  3. 17 Jun, 2008 1 commit
    • Jiri Hladky's avatar
      x86: fix bug in arch/i386/lib/delay.c file, delay_loop function · e01b70ef
      Jiri Hladky authored
      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: default avatarIngo Molnar <mingo@elte.hu>
      e01b70ef
  4. 15 Jun, 2008 14 commits
  5. 14 Jun, 2008 1 commit
  6. 13 Jun, 2008 21 commits