xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Keir Fraser <keir.xen@gmail.com>
Cc: Jinsong Liu <jinsong.liu@intel.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] x86/mce: CPU notifiers must not be registered a second time during resume
Date: Fri, 18 Mar 2011 16:35:54 +0000	[thread overview]
Message-ID: <4D8397FA0200007800037494@vpn.id2.novell.com> (raw)
In-Reply-To: <C9A92E38.150A6%keir.xen@gmail.com>

>>> On 18.03.11 at 16:43, Keir Fraser <keir.xen@gmail.com> wrote:
> On 18/03/2011 15:07, "Jan Beulich" <JBeulich@novell.com> wrote:
> 
>> While c/s 22964:f71212f712fd and 23051:93c864c16ab1 fixed issues with
>> CPU onlining, they introduced a problem with resume: mcheck_init() is
>> also being called on that path, and hence checking whether it's running
>> on CPU 0, which is generally not a really good thing, is particularly
>> inappropriate here.
> 
> Just have a 'static bool_t early_init_done' or similar in
> intel_mcheck_init().

And another in mcheck_init(). If the proliferates, an alternative I
would like a little better would be to just have a global variable (e.g.
extending early_boot).

> if ( !early_init_done ) {
>  BUG_ON(smp_processor_id() != 0);
>  ...
>  early_init_done = 1;
> }
> 
> It's clearer anyway -- we're simply protecting one-time-only early-boot-time
> initialisation stuff.

What's wrong with doing the protection by passing down the
necessary information?

Jan

  reply	other threads:[~2011-03-18 16:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 15:07 [PATCH] x86/mce: CPU notifiers must not be registered a second time during resume Jan Beulich
2011-03-18 15:43 ` Keir Fraser
2011-03-18 16:35   ` Jan Beulich [this message]
2011-03-18 17:11     ` Keir Fraser
2011-03-19 15:53   ` Liu, Jinsong
2011-03-19 22:20     ` Keir Fraser
2011-03-21  8:22     ` Jan Beulich
2011-03-21 13:18       ` Liu, Jinsong

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=4D8397FA0200007800037494@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=jinsong.liu@intel.com \
    --cc=keir.xen@gmail.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).