linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Jack Miller <jack@codezen.org>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Yazen.Ghannam@amd.com, x86@kernel.org
Subject: Re: [PATCH] x86/mce/AMD: Fix partial SMCA bank init when CPU 0 != thread 0
Date: Wed, 28 Jun 2017 11:22:19 +0200	[thread overview]
Message-ID: <20170628092219.4df52dhwe7q3iao5@pd.tnic> (raw)
In-Reply-To: <20170628000630.1973-1-jack@codezen.org>

On Tue, Jun 27, 2017 at 07:06:30PM -0500, Jack Miller wrote:
> After a call to firmware SwitchBSP(),

What is that and who does that?

> Linux can be booted with a thread
> that isn't the first in the system. That thread automatically becomes
> CPU 0.

Btw, you should be seeing other explosions too as a lot of code assumes
CPU 0 is the BSP.

...

> Signed-off-by: Jack Miller <jack@codezen.org>
> ---
>  arch/x86/kernel/cpu/mcheck/mce_amd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> index 6e4a047e4b68..9d74adcf34d2 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> @@ -170,8 +170,8 @@ static void get_smca_bank_info(unsigned int bank)
>  	struct smca_hwid *s_hwid;
>  	u32 high, instance_id;
>  
> -	/* Collect bank_info using CPU 0 for now. */
> -	if (cpu)
> +	/* Collect bank_info using hardware thread 0 for now. */
> +	if (apic->get_apic_id(apic->read(APIC_ID)) != 0)

Does

	if (cpu != boot_cpu_data.cpu_index)
		return;

work?


-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

  reply	other threads:[~2017-06-28  9:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  0:06 [PATCH] x86/mce/AMD: Fix partial SMCA bank init when CPU 0 != thread 0 Jack Miller
2017-06-28  9:22 ` Borislav Petkov [this message]
2017-06-28 17:44   ` Jack Miller
2017-06-28 18:00     ` Ghannam, Yazen
2017-06-28 18:53       ` Jack Miller
2017-06-28 18:58         ` Ghannam, Yazen
2017-06-29 16:22           ` Jack Miller
2017-06-29 17:58             ` Ghannam, Yazen
2017-06-28 18:16     ` Borislav Petkov
2017-06-28 18:51       ` Ghannam, Yazen
2017-06-28 18:55         ` Borislav Petkov
2017-06-29 18:08 ` [PATCH] x86/mce/AMD: Allow any CPU to initialize smca_banks array Yazen Ghannam
2017-06-30 15:57   ` Jack Miller
2017-07-17  5:19   ` Borislav Petkov

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=20170628092219.4df52dhwe7q3iao5@pd.tnic \
    --to=bp@suse.de \
    --cc=Yazen.Ghannam@amd.com \
    --cc=jack@codezen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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).