Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4124498iog; Tue, 21 Jun 2022 12:32:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vr8AY2oHKSQqzWvOay64cXB6h1PtfndEv1y/QMlI4thRLcLSDml6fkHNpm5RcnM677eE0Q X-Received: by 2002:a17:90b:4c4e:b0:1ec:bc42:47c2 with SMTP id np14-20020a17090b4c4e00b001ecbc4247c2mr8614368pjb.180.1655839968772; Tue, 21 Jun 2022 12:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655839968; cv=none; d=google.com; s=arc-20160816; b=VXOX3cje+kMgfvycgsZicF3WSPjBs/rxauB5TWNPtLUrHBW2Rt8PJ0LfLTgD5ymH+4 +35NFkLu0ObbzlRjNpYTx/+2yGspDGI8RrohX9saF7bYBPmMCSyDnX9CKIOZG0oqWWQy /uvI24ciBnpVwxFJM6Ge++S/sDY0EvbkhVS6TCbKUEsgYY5jLrZiuCbSd0uYN55nnrzo 2vxAk2WpujtJvjLYvRnqnbdisw9iQHx7QTXx2pOufvEXCAXDN39GPnlTIJaX5ZDloHMd /odwzMuJS3wwcRbvuIqI8wKKRzg9iDwTvJRVk+/wmvh6txAkWLyMBL3p3gUIP6nzRsgR BYVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zM3D7qKOGgIuSQ6mteOFPKwemX5/SMrMIpD1kDtH3Xk=; b=epuAaTk6GqtbMk4f15lFYtvOIAyngVa3QCnTSEReaR+cZIa37EnZd42RPHzq9CNLfv vKdsNipfNiaX2Fr39XpCydqowQTe5AfOR7EJrMS07ICumzheT+2wSXI/SFkF/D7Oh+NB JDDKYPl7m8waPcst+x8DoAB46eSKz8XMlZxmKX+CgPXbrDGJnM0hC/ZRO9vt5QYyIiNB mY7kjWwQwv6865NDNtwBGAOMDF2xgjWVbLJbwqQWRGNFYsNTkIOQhPoM+xWjnhJ9SFQ8 g8X4sqLUQbsDKyxemhO5AkqySeBEGeGejkGrqqwb2Zqqz/uufDWUw+NsGgTsar0VWm3F QV2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb8-20020a17090ae7c800b001e6a0a4c86asi22459504pjb.178.2022.06.21.12.32.35; Tue, 21 Jun 2022 12:32:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353555AbiFUTVb (ORCPT + 99 others); Tue, 21 Jun 2022 15:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352905AbiFUTVG (ORCPT ); Tue, 21 Jun 2022 15:21:06 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 005711174 for ; Tue, 21 Jun 2022 12:21:04 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6380165C; Tue, 21 Jun 2022 12:21:04 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DEB8E3F792; Tue, 21 Jun 2022 12:21:02 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, Greg KH Cc: Sudeep Holla , Atish Patra , Atish Patra , Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Ionela Voinescu , Pierre Gondois , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Gavin Shan Subject: [PATCH v4 09/20] arch_topology: Use the last level cache information from the cacheinfo Date: Tue, 21 Jun 2022 20:20:23 +0100 Message-Id: <20220621192034.3332546-10-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621192034.3332546-1-sudeep.holla@arm.com> References: <20220621192034.3332546-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The cacheinfo is now initialised early along with the CPU topology initialisation. Instead of relying on the LLC ID information parsed separately only with ACPI PPTT elsewhere, migrate to use the similar information from the cacheinfo. This is generic for both DT and ACPI systems. The ACPI LLC ID information parsed separately can now be removed from arch specific code. Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla --- drivers/base/arch_topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 23cb52180ce3..c314c7064397 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -668,7 +668,8 @@ const struct cpumask *cpu_coregroup_mask(int cpu) /* not numa in package, lets use the package siblings */ core_mask = &cpu_topology[cpu].core_sibling; } - if (cpu_topology[cpu].llc_id != -1) { + + if (last_level_cache_is_valid(cpu)) { if (cpumask_subset(&cpu_topology[cpu].llc_sibling, core_mask)) core_mask = &cpu_topology[cpu].llc_sibling; } @@ -699,7 +700,7 @@ void update_siblings_masks(unsigned int cpuid) for_each_online_cpu(cpu) { cpu_topo = &cpu_topology[cpu]; - if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) { + if (last_level_cache_is_shared(cpu, cpuid)) { cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); } -- 2.36.1