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] [day] [month] [year] [list]
Message-Id: <1245314880.5310.4.camel@subratamodak.linux.ibm.com>
Date:	Thu, 18 Jun 2009 14:18:00 +0530
From:	Subrata Modak <subrata@...ux.vnet.ibm.com>
To:	balbir@...ux.vnet.ibm.com, Ingo Molnar <mingo@...e.hu>
Cc:	Frans Pop <elendil@...net.nl>, "Figo.zhang" <figo1802@...il.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Sumit Panchasara <sumit.panchasara@...fochips.com>,
	"'Sachin P Sant'" <sachinp@...ux.vnet.ibm.com>,
	"'H. Peter Anvin'" <hpa@...or.com>,
	"'Andi Kleen'" <andi@...stfloor.org>,
	"'Thomas Gleixner'" <tglx@...utronix.de>,
	Jaswinder Singh Rajput <jaswinder@...nel.org>
Subject: Re: [PATCH]x86-tsc.c : fix compile warning

On Thu, 2009-06-18 at 12:57 +0530, Balbir Singh wrote:
> * Ingo Molnar <mingo@...e.hu> [2009-06-17 18:23:03]:
> 
> > 
> > * Frans Pop <elendil@...net.nl> wrote:
> > 
> > > On Wednesday 17 June 2009, Ingo Molnar wrote:
> > > > Ah, and you fixed in what a superior way: you improved the code in
> > > > the process :-) This is how warnings should be fixed really.
> > > 
> > > Hmm. Did you also see Pavel's reply to that patch [1]:
> > > ! But that's a bug to be fixed, I'd say? ... actually I believe you are
> > > ! introducing a bug here. Yes, old code would put random numbers in
> > > ! loops_per_jiffy_ref for !CPUFREQ_CONST_LOOPS, but you are introducing
> > > ! oops there.
> > > 
> > > Was his comment incorrect?
> > > 
> > > Cheers,
> > > FJP
> > > 
> > > [1] http://lkml.org/lkml/2009/5/24/159
> > 
> > hm, Pavel seems right - i missed that. Subrata, mind sending an 
> > updated patch?
> >
> 
> Hi, Ingo,
> 
> Yes, it does seem that we'll oops at *lpj, but to be honest the code
> is badly written, ideally the CONFIG_SMP part should be abstracted
> out, having that in a if loop makes reading it time consuming and
> kills a few neuro cells each time.

Balbir/Ingo,

I find this fixed in todayś Linus´s git tree. dummy has been removed,
and, so does lpj initialization taking place properly.

631 static int time_cpufreq_notifier(struct notifier_block *nb, unsigned
long val,
632                                 void *data)
633 {
634         struct cpufreq_freqs *freq = data;
635         unsigned long *lpj;
636 
637         if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC))
638                 return 0;
639 
640         lpj = &boot_cpu_data.loops_per_jiffy;

this gets initialized here for the first time on any system.

641 #ifdef CONFIG_SMP
642         if (!(freq->flags & CPUFREQ_CONST_LOOPS))
643                 lpj = &cpu_data(freq->cpu).loops_per_jiffy;
644 #endif

And gets re-assigned if CONFIG_SMP.

Regards--
Subrata

> 
> 

--
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