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:	Tue, 19 Feb 2008 12:26:32 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Pavel Machek <pavel@....cz>
Cc:	Thomas Gleixner <tglx@...utronix.de>, jbohac@...e.cz,
	kernel list <linux-kernel@...r.kernel.org>, jikos@...e.cz,
	"Rafael J. Wysocki" <rjw@...k.pl>, Andrew Morton <akpm@...l.org>
Subject: Re: notsc is ignored on common configurations


* Pavel Machek <pavel@....cz> wrote:

> notsc is ignored in 32-bit kernels if CONFIG_X86_TSC is on.. which is 
> bad, fix it.

thanks, applied.

> -static unsigned int ref_freq = 0;
> -static unsigned long loops_per_jiffy_ref = 0;
> -static unsigned long cpu_khz_ref = 0;
> +static unsigned int ref_freq;
> +static unsigned long loops_per_jiffy_ref;
> +static unsigned long cpu_khz_ref;

i have split these changes into the separate patch below.

	Ingo

---------------->
Subject: x86: clean up =0 initializations in arch/x86/kernel/tsc_32.c
From: Pavel Machek <pavel@....cz>
Date: Tue, 19 Feb 2008 11:02:30 +0100

Signed-off-by: Pavel Machek <pavel@...e.cz>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/kernel/tsc_32.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-x86.q/arch/x86/kernel/tsc_32.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/tsc_32.c
+++ linux-x86.q/arch/x86/kernel/tsc_32.c
@@ -222,9 +222,9 @@ EXPORT_SYMBOL(recalibrate_cpu_khz);
  * if the CPU frequency is scaled, TSC-based delays will need a different
  * loops_per_jiffy value to function properly.
  */
-static unsigned int ref_freq = 0;
-static unsigned long loops_per_jiffy_ref = 0;
-static unsigned long cpu_khz_ref = 0;
+static unsigned int ref_freq;
+static unsigned long loops_per_jiffy_ref;
+static unsigned long cpu_khz_ref;
 
 static int
 time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data)
@@ -286,7 +286,7 @@ core_initcall(cpufreq_tsc);
 
 /* clock source code */
 
-static unsigned long current_tsc_khz = 0;
+static unsigned long current_tsc_khz;
 
 static cycle_t read_tsc(void)
 {
--
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