From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751511AbdF1JWw (ORCPT ); Wed, 28 Jun 2017 05:22:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:33467 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751501AbdF1JWp (ORCPT ); Wed, 28 Jun 2017 05:22:45 -0400 Date: Wed, 28 Jun 2017 11:22:19 +0200 From: Borislav Petkov To: Jack Miller 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 Message-ID: <20170628092219.4df52dhwe7q3iao5@pd.tnic> References: <20170628000630.1973-1-jack@codezen.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170628000630.1973-1-jack@codezen.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > --- > 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) --