From: Ingo Molnar <mingo@elte.hu>
To: Yong Wang <yong.y.wang@linux.intel.com>,
Borislav Petkov <borislav.petkov@amd.com>
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 08:59:57 +0100 [thread overview]
Message-ID: <20091109075957.GH453@elte.hu> (raw)
In-Reply-To: <20091109072528.GA2646@ywang-moblin2.bj.intel.com>
* Yong Wang <yong.y.wang@linux.intel.com> wrote:
> 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().
That's true in Linus's tree but Boris Petkov fixed the MCE init
functions naming mess in the x86 tree, in these commits:
b33a636: x86, mce: Add a global MCE init helper
5e09954: x86, mce: Fix up MCE naming nomenclature
Please base your patch on:
http://people.redhat.com/mingo/tip.git/README
to have the latest MCE code. So if you stick that init function into
mcheck_init() in -tip it should be called once per bootup only. (I have
not checked the other boot dependencies, please do that.)
Thanks,
Ingo
next prev parent reply other threads:[~2009-11-09 8:00 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
2009-11-09 7:59 ` Ingo Molnar [this message]
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=20091109075957.GH453@elte.hu \
--to=mingo@elte.hu \
--cc=arjan@infradead.org \
--cc=borislav.petkov@amd.com \
--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