Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753904AbbD2QHZ (ORCPT ); Wed, 29 Apr 2015 12:07:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45585 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753618AbbD2QHU (ORCPT ); Wed, 29 Apr 2015 12:07:20 -0400 Date: Wed, 29 Apr 2015 18:06:59 +0200 From: Borislav Petkov To: Aravind Gopalakrishnan Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, hecmargi@upv.es, dave.hansen@linux.intel.com, mgorman@suse.de, pbonzini@redhat.com, jacob.w.shin@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86, amd: Set X86_FEATURE_EXTD_APICID for future processors Message-ID: <20150429160658.GC13807@pd.tnic> References: <1430148351-9013-1-git-send-email-Aravind.Gopalakrishnan@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1430148351-9013-1-git-send-email-Aravind.Gopalakrishnan@amd.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1950 Lines: 54 On Mon, Apr 27, 2015 at 10:25:51AM -0500, Aravind Gopalakrishnan wrote: > Decision to use a 4-bit mask or 8-bit mask in default_get_apic_id() > is controlled by setting capability bit X86_FEATURE_EXTD_APICID. > > Currently, we detect extended APIC ID support by accessing Link > Transaction Control register D18F0x68 in PCI config space. > > But, not even that is needed as we can safely postulate that future > AMD processors will support 8-bit APIC IDs and we can simply set that > feature bit on them, without the PCI access. > > Signed-off-by: Aravind Gopalakrishnan > --- > arch/x86/kernel/cpu/amd.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c > index fd470eb..20b6813 100644 > --- a/arch/x86/kernel/cpu/amd.c > +++ b/arch/x86/kernel/cpu/amd.c > @@ -520,8 +520,16 @@ static void early_init_amd(struct cpuinfo_x86 *c) > set_cpu_cap(c, X86_FEATURE_K6_MTRR); > #endif > #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) > - /* check CPU config space for extended APIC ID */ > - if (cpu_has_apic && c->x86 >= 0xf) { > + /* > + * ApicID can always be treated as a 8bit value for > + * AMD APIC versions >= 0x10. So, we can safely set Expanded the version aspect to: /* * ApicID can always be treated as a 8bit value for AMD APIC versions * >= 0x10 but even old K8s came out of reset with version 0x10. So, we * can safely set X86_FEATURE_EXTD_APICID unconditionally for families * after 16h. */ and applied. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/