public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Yong Wang <yong.y.wang@linux.intel.com>
Cc: 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 14:16:55 +0100	[thread overview]
Message-ID: <20091108131655.GA12837@elte.hu> (raw)
In-Reply-To: <20091108123812.GA877@ywang-moblin2.bj.intel.com>


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

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

	Ingo

  reply	other threads:[~2009-11-08 13:16 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 [this message]
2009-11-08 13:19         ` Yong Wang
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=20091108131655.GA12837@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=yong.y.wang@linux.intel.com \
    /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