From: Yong Wang <yong.y.wang@linux.intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yong Wang <yong.y.wang@linux.intel.com>,
Suresh Siddha <suresh.b.siddha@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86, therm: Only read the initial value of thermal LVT entry on BSP
Date: Sun, 8 Nov 2009 21:19:39 +0800 [thread overview]
Message-ID: <20091108131939.GA1005@ywang-moblin2.bj.intel.com> (raw)
In-Reply-To: <20091108131655.GA12837@elte.hu>
On Sun, Nov 08, 2009 at 02:16:55PM +0100, Ingo Molnar wrote:
>
> * Yong Wang <yong.y.wang@linux.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?
Thanks
-Yong
next prev parent reply other threads:[~2009-11-08 13:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-07 0:17 [PATCH] x86, therm: Only read the initial value of thermal LVT entry on BSP Yong Wang
2009-11-07 2:56 ` Suresh Siddha
2009-11-07 9:52 ` Yong Wang
2009-11-08 10:25 ` Ingo Molnar
2009-11-08 12:38 ` Yong Wang
2009-11-08 13:16 ` Ingo Molnar
2009-11-08 13:19 ` Yong Wang [this message]
2009-11-08 15:59 ` Ingo Molnar
2009-11-08 13:42 ` Cyrill Gorcunov
-- strict thread matches above, loose matches on Subject: below --
2009-11-06 5:46 Yong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091108131939.GA1005@ywang-moblin2.bj.intel.com \
--to=yong.y.wang@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox