Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3301107lfo; Mon, 23 May 2022 01:06:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLPTolD4hNQ21k1OqVwKm0HDnlOqedszymd7WNCxyFxEhBWa6ju+GliJrb0HsvZ52v5RQ8 X-Received: by 2002:a17:902:a9c6:b0:15e:fe5d:cf67 with SMTP id b6-20020a170902a9c600b0015efe5dcf67mr21844892plr.74.1653293210149; Mon, 23 May 2022 01:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293210; cv=none; d=google.com; s=arc-20160816; b=Jt1lPf7tlfI99np70prTlFVKZi2SIYZBSsp5Rt1OfPd3z8JLXzQeAQleH7K+I+4p+o mFHxjRn04AmmzH0MQV0ROa8pXPDzVEZJ2Hl5C4aLoIQP3G/iKLyaHahGTDywSJ1u61p/ NPkCSAY5v/YCbSKjfFDAp5fe6c6kAYRRf5McWN6PtZ7MLp+3o1Tbb/Ud9jHNd4xvyQ/f QGOjC38tJRZ8okiMEMWDVJpEHKS5qMdsIpnYjMozm/h8BB3kPqKOub3SNqtForMSGh7l MFFuKTUyhRsfpemdSaMOcjasPcgqGbe5SSd4H2SYbCy6nH+wtk0UD1z2jZiJDWKaPRJa Yt3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=qPLEcTWQjk16KVHCFeYGexoPgEwSqTJFpEx0ZZS3NEA=; b=f+rNo8b+z5Ldti5EzsoMBs4R6LQ3jihlMSfcZNfn23rLNiO8eCxVwj/XVYmUe6Vl/+ y6bAKCqkNY7Hg5liuV+LB+0cM+5VbjoYHmEBpAYJXcLa+kwR476VBTCw8/CJiu1o7g8j qpxWobzlttpycZ7Qg+wZUYGcB+5j1HnWm3aYeR6B3YYncfH3QY7n8rNaE7dNHD2WMDIG DxJz2s/izNSTzN0KBI9Q0gNChUQ2iryKUApQWfvyZXD1ghfP6+1oHyEfT7n0a0U85Yai tcCtgU1pUujtifSiqPKHQzJ1f025dQhnkivcZ/LUKcFbaDM+xPH9aXyB8d0iWf+y/rMj QnQw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i1-20020a170902c94100b0015852f2a130si9580780pla.620.2022.05.23.01.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:06:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3678917FC2D; Mon, 23 May 2022 00:06:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349431AbiETMeV (ORCPT + 99 others); Fri, 20 May 2022 08:34:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349421AbiETMeG (ORCPT ); Fri, 20 May 2022 08:34:06 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B44AD166467 for ; Fri, 20 May 2022 05:34:02 -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 7FF431477; Fri, 20 May 2022 05:34:02 -0700 (PDT) Received: from [172.29.1.145] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BDF0A3F718; Fri, 20 May 2022 05:33:59 -0700 (PDT) Message-ID: <087176fc-1018-b107-06cc-055d7926b500@arm.com> Date: Fri, 20 May 2022 14:33:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v2 8/8] arch_topology: Add support to build llc_sibling on DT platforms Content-Language: en-US To: Sudeep Holla , Atish Patra , linux-kernel@vger.kernel.org Cc: Atish Patra , Vincent Guittot , Morten Rasmussen , Qing Wang , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Rob Herring References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> From: Dietmar Eggemann In-Reply-To: <20220518093325.2070336-9-sudeep.holla@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 18/05/2022 11:33, Sudeep Holla wrote: > ACPI PPTT provides cache identifiers and especially the last level cache > identifier is used in obtaining last level cache siblings amongst CPUs. > > While we have the cpu map representing all the CPUs sharing last level > cache in the cacheinfo driver, it is populated quite late in the boot > while the information is needed to build scheduler domains quite early. > > On DT platforms we can use the pointer to the last level cache as the > firmware identifier for the last level cache and build the cpumap sharing > the last level cache based on the same. [...] > diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h > index 58cbe18d825c..d8a36b0e27c9 100644 > --- a/include/linux/arch_topology.h > +++ b/include/linux/arch_topology.h > @@ -69,6 +69,7 @@ struct cpu_topology { > int cluster_id; > int package_id; > int llc_id; > + void *llc_fw_node; Would be nicer if you could set llc_id directly to avoid all this addition sync `llc_id and llc_fw_node` code. ACPI PPTT has this ACPI_PTR_DIFF() macro which IMHO lets it create distinct ids. > cpumask_t thread_sibling; > cpumask_t core_sibling; > cpumask_t cluster_sibling;