lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 9 Jun 2008 15:11:36 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Alok Kataria <akataria@...are.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Dan Hecht <dhecht@...are.com>, Tim Mann <mann@...are.com>,
	Zachary Amsden <zach@...are.com>,
	Sahil Rihan <srihan@...are.com>
Subject: Re: [RFC PATCH] x86:Use cpu_khz for loops_per_jiffy calculation


* Alok Kataria <akataria@...are.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ