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: <20091108155925.GB15663@elte.hu>
Date:	Sun, 8 Nov 2009 16:59:25 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Yong Wang <yong.y.wang@...ux.intel.com>
Cc:	Suresh Siddha <suresh.b.siddha@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86, therm: Only read the initial value of thermal LVT
 entry on BSP


* Yong Wang <yong.y.wang@...ux.intel.com> wrote:

> On Sun, Nov 08, 2009 at 02:16:55PM +0100, Ingo Molnar wrote:
> > 
> > * Yong Wang <yong.y.wang@...ux.intel.com> wrote:
> > 
> > > On Sun, Nov 08, 2009 at 11:25:21AM +0100, Ingo Molnar wrote:
> > > > 
> > > > i dont disagree with the fix, but could we please do it a bit cleaner, 
> > > > and initialize a proper file-scope lvtthrm_init value from a different 
> > > > boot-CPU-only function? (not intel_init_thermal)
> > > > 
> > > 
> > > Thanks for your comments. Just want to make sure I understand correctly.
> > > By 'file-scope', do you want me to define lvtthrm_init as a static
> > > variable but not to define it in any function?
> > 
> > Correct - i'd suggest to put it next to other file-scope variables at 
> > the top of the .c file. Maybe make it __read_mostly as well.
> > 
> 
> OK, will do.
> 
> > > > that makes it cleaner, and also it will work if we dont boot on 
> > > > cpu==0. (should that ever occur)
> > > > 
> > > 
> > > May I know when will this happen?
> > 
> > It's not really expected - we factorize the CPU IDs (which are logical) 
> > so that the boot CPU is 0. But relying on cpu==0 is the boot cpu is not 
> > clean and the resulting code is harder to read.
> > 
> 
> There does not seem to be 'boot-CPU-only function' in that .c file. What
> about changing cpu==0 to cpu==boot_cpu_id? Does that help?

Then create one and call it - it's still cleaner that way.

	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