Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753818AbdG3DtY (ORCPT ); Sat, 29 Jul 2017 23:49:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:52087 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753234AbdG3DtX (ORCPT ); Sat, 29 Jul 2017 23:49:23 -0400 Date: Sun, 30 Jul 2017 05:48:34 +0200 From: Borislav Petkov To: Suravee Suthikulpanit Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [PATCH v2] x86/amd: Derive L3 shared_cpu_map from cpu_llc_shared_mask Message-ID: <20170730034834.GA22240@nazgul.tnic> References: <1501206755-2396-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1501206755-2396-1-git-send-email-suravee.suthikulpanit@amd.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 25 On Thu, Jul 27, 2017 at 08:52:35PM -0500, Suravee Suthikulpanit wrote: > For system with X86_FEATURE_TOPOEXT, current logic use APIC ID to > calculate shared_cpu_map. However, since APIC IDs are not guaranteed > to be contiguous for cores across different L3 (e.g. family17h system > w/ downcore configuration). This breaks the logic, and results in > incorrect L3 shared_cpu_map. > > Instead, always use the previously calculated cpu_llc_shared_mask of > each cpu to derive L3 shared_cpu_map. This has been tested on > family15h and family17h systems, which has L3 and support > X86_FEATURE_TOPOEXT. > > Signed-off-by: Suravee Suthikulpanit > --- > arch/x86/kernel/cpu/intel_cacheinfo.c | 32 ++++++++++++++++++-------------- > 1 file changed, 18 insertions(+), 14 deletions(-) Applied, thanks. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --