All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yong Wang <yong.y.wang@linux.intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Arjan van de Ven <arjan@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] x86: under bios control, restore AP's APIC_LVTTHMR to the BSP value
Date: Mon, 9 Nov 2009 15:25:28 +0800	[thread overview]
Message-ID: <20091109072528.GA2646@ywang-moblin2.bj.intel.com> (raw)
In-Reply-To: <20091109070844.GA453@elte.hu>

On Mon, Nov 09, 2009 at 08:08:44AM +0100, Ingo Molnar wrote:
> 
> * Yong Wang <yong.y.wang@linux.intel.com> wrote:
> 
> > Changes since v2:
> > Incorporate Ingo's comments to get BSP's thermal init value in a
> > 'boot-CPU-only' function.
> 
> > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> > index e09f0e2..2323771 100644
> > --- a/arch/x86/kernel/setup.c
> > +++ b/arch/x86/kernel/setup.c
> > @@ -1002,6 +1002,7 @@ void __init setup_arch(char **cmdline_p)
> >  
> >  	init_apic_mappings();
> >  	ioapic_init_mappings();
> > +	get_bsp_lvtthmr_init();
> >  
> >  	/* need to wait for io_apic is mapped */
> >  	probe_nr_irqs_gsi();
> 
> Ok - it's almost good in this form - it would be nice to name the new 
> function something more generic, like mcheck_intel_therm_init(), and 
> call it from arch/x86/kernel/cpu/mcheck/mce.c's mcheck_init() function.
> 

I just checked that arch/x86/kernel/cpu/mcheck/mce.c's mcheck_init()
will not only run on BSP but also on APs. I put get_bsp_lvtthmr_init()
right behind init_apic_mappings() because init_apic_mappings() will
setup the fixmap for LAPIC so that I can call apic_read from inside
get_bsp_lvtthmr_init().

I can rename get_bsp_lvtthmr_init() to mcheck_intel_therm_init() to make
it more generic as we might add more stuff into it in the future.

Thanks for your comments.
-Yong

  reply	other threads:[~2009-11-09  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-09  4:21 [PATCH v3] x86: under bios control, restore AP's APIC_LVTTHMR to the BSP value Yong Wang
2009-11-09  7:08 ` Ingo Molnar
2009-11-09  7:25   ` Yong Wang [this message]
2009-11-09  7:59     ` Ingo Molnar
2009-11-09  8:31       ` Yong Wang
2009-11-09  9:06         ` Ingo Molnar

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=20091109072528.GA2646@ywang-moblin2.bj.intel.com \
    --to=yong.y.wang@linux.intel.com \
    --cc=arjan@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.