Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3282186lfo; Mon, 23 May 2022 00:37:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcEhSPPE9uQKFqcA572xn4D87AcHXTgF9VfvgsnPd0HBw0WpuJ78Q8Rl57rOhywe+D6AkH X-Received: by 2002:a17:902:8c98:b0:15f:3e78:dc43 with SMTP id t24-20020a1709028c9800b0015f3e78dc43mr21623759plo.120.1653291475634; Mon, 23 May 2022 00:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653291475; cv=none; d=google.com; s=arc-20160816; b=q9kx7Wh0PmYg8ovsPgaQbBENYL4plAi2jduC1Iq3IphmovRYeifjhCidqq6WyQsvQV 2ltjhIyb4Vrmf1sEkfRwNm4Pr9lY1z39y4qi12fWFgRwK7l/sFAMHzfNYy87Ek2+V+z9 h+uP8Nw+SshT/l3ABQ00wBHUfTq7iMyk+pHIsb23UXw11Lc7uZEIrrYl5B59QBb1/MnG 90ao9CJhu4ltW3w3Kg2i/Rg501OpbVydZu79PXrYcakDVQKS51jdt55+rXP4E52kJcGA EBvgEVW1PXNE/FlcOJqFZJiek01PhIYWYDfWkMD15MB5Ezf7WxOjSnm5KHrC0Nt8a2NZ /G5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=82Xl1tHoFY9sBZ8RdTRQiCUg6JTzhiUo/9lCZdMNNA4=; b=Z66BTNiAGPkXPK0HT5mriJ4+yMMchJvrMUa6iMJ69QBBvnmhvCgEjygw9fS7iv9AoI gRCDjwVDYIuWbo5VqBNPovLJMwwwrt6jd+Tni6G0gfmmTbDYObBPSknLXSnB++udlG5R 8FAyI5TXe7qZi7tSRaJ1Wx5WOltKEjg6ZvqkQrE5Z3joXmK3ZewYsas8lYdh9trqMH1H 1Z1p2bA8AknMxljWgvE2b0rXQMeV4LpRMkDF6W0m8K0Vfsrzl9NjVFed266BYb83NAP+ hzz3Jy8EvkzNRailiIOnqnUHHgG8kmujELOoEgnvrMjunvOYqbZCirheC7IED4nuqDGH lB3g== 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 g2-20020a17090ae58200b001df799bfae2si11530274pjz.123.2022.05.23.00.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:37:55 -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 ED1DF1D526D; Sun, 22 May 2022 23:48:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350524AbiETO4u (ORCPT + 99 others); Fri, 20 May 2022 10:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231347AbiETO4t (ORCPT ); Fri, 20 May 2022 10:56:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 549DF1737EF for ; Fri, 20 May 2022 07:56:48 -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 F0AB51477; Fri, 20 May 2022 07:56:47 -0700 (PDT) Received: from bogus (unknown [10.57.66.157]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 989AE3F73D; Fri, 20 May 2022 07:56:45 -0700 (PDT) Date: Fri, 20 May 2022 15:56:39 +0100 From: Sudeep Holla To: Dietmar Eggemann Cc: Atish Patra , linux-kernel@vger.kernel.org, Atish Patra , Sudeep Holla , Vincent Guittot , Morten Rasmussen , Qing Wang , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Rob Herring Subject: Re: [PATCH v2 8/8] arch_topology: Add support to build llc_sibling on DT platforms Message-ID: <20220520145639.xb33e2z5otdu264y@bogus> References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> <087176fc-1018-b107-06cc-055d7926b500@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <087176fc-1018-b107-06cc-055d7926b500@arm.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, May 20, 2022 at 02:33:46PM +0200, Dietmar Eggemann wrote: > 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. > Indeed, I initially thought so, but they are 64 bit pointers and choosing one reference is difficult to take some sort of diff while in ACPI it is in a static table and we could use the reference to the top of the table. -- Regards, Sudeep