lkml.org 
[lkml]   [2008]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] x86:Use cpu_khz for loops_per_jiffy calculation

* Alok Kataria <akataria@vmware.com> wrote:

> --- linux-2.6.orig/arch/x86/kernel/tsc_32.c 2008-05-27 12:28:16.000000000 -0700
> +++ linux-2.6/arch/x86/kernel/tsc_32.c 2008-06-03 17:28:46.000000000 -0700
> @@ -401,6 +401,7 @@
> void __init tsc_init(void)
> {
> int cpu;
> + u64 lpj;
>
> if (!cpu_has_tsc || tsc_disabled) {
> /* Disable the TSC in case of !cpu_has_tsc */
> @@ -421,6 +422,10 @@
> return;
> }
>
> + lpj = ((u64)cpu_khz * 1000);
> + do_div(lpj, HZ);
> + lpj_tsc = lpj;

that wont work very well as lpj_tsc is not declared.

Ingo


\
 
 \ /
  Last update: 2008-06-09 15:15    [W:1.056 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site