Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp940999iog; Wed, 29 Jun 2022 13:31:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uR9jhlI3bOYXordnV/Nvdnp5xQcTalKcKg+rdkLz8np0pgvIzFmPjf50RXsi0sx8+KXkwo X-Received: by 2002:aa7:8bd3:0:b0:527:d84d:fa83 with SMTP id s19-20020aa78bd3000000b00527d84dfa83mr7833017pfd.30.1656534674796; Wed, 29 Jun 2022 13:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656534674; cv=none; d=google.com; s=arc-20160816; b=kUdQuwKBndiwwyiSjOc9POYQaYGwnUHeZbuW+3lyWOQjFW6yLUJ+1m367VkziRWy3+ BQF4KXg+zWrJEq+PtCBW9lldMOzS9GLLJHT34F4q9JCouGKBbuUvVj3fUXRn/E+4nJd2 XDm/5qni9LzulYVX0FIhJ1EePH7f0cENLcMySgs5DY53bnScy9RX0bT1qxOt39NVIK5M Ur28GWqiLfWEo1UniCwWiAWo5faGyenfofEVj8hCns2zFNrkj2SsaCP+q8pcZwr/JuQz owPAc94cToWQ/Xzzt9gwQ3Lza3ABynMakF0lOvCGSbGZ878PF/SAiOxfwrUtQ/8Qcgn9 SdkQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xdanAHR+oC1vgndf+iPrN9GHQkcZIGiGf8K/8BMswQ4=; b=bmj1YyLGAq6gEwBVlpbn/9d42+wRrI+M80Lw78P6bvHVd1zlF3R5e08NagXkISIA0y 2C+DeB+Xxkuuy+nsyA4+73KJVr2HYWYXy/KTJlEk+vfshNkNjQdYXFznw5tGH2+PaFNw CIoT6NH0V6ZdC8eqqb9r3ihzymH6bkAjYwExkgbTX0zXItLaENmDhgxc07IPkqFbqhSG ZFZMoWsMVpG9G75oCYbxBACNeuKxrT7PP/7KpXeNK/s3nW8V1PXNIn3ISJVvkMwcBH1z +l1cZo24X226wWF8LAY1+a1xRCnb5mC/61FLQN3mt4Uz/+efg/5bj1GP57wC+Pmbtcp5 hzCQ== 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 s7-20020a632c07000000b0040dea78bf74si13138985pgs.686.2022.06.29.13.31.02; Wed, 29 Jun 2022 13:31:14 -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 S231271AbiF2Toy (ORCPT + 99 others); Wed, 29 Jun 2022 15:44:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230281AbiF2Tow (ORCPT ); Wed, 29 Jun 2022 15:44:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2EC122A94F for ; Wed, 29 Jun 2022 12:44:51 -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 1F4A51480; Wed, 29 Jun 2022 12:44:51 -0700 (PDT) Received: from bogus (unknown [10.57.39.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D0A83F792; Wed, 29 Jun 2022 12:44:48 -0700 (PDT) Date: Wed, 29 Jun 2022 20:43:37 +0100 From: Sudeep Holla To: Conor.Dooley@microchip.com Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, atishp@atishpatra.org, atishp@rivosinc.com, Sudeep Holla , vincent.guittot@linaro.org, dietmar.eggemann@arm.com, wangqing@vivo.com, robh+dt@kernel.org, rafael@kernel.org, ionela.voinescu@arm.com, pierre.gondois@arm.com, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, gshan@redhat.com, Valentina.FernandezAlanis@microchip.com Subject: Re: [PATCH v5 09/19] arch_topology: Use the last level cache information from the cacheinfo Message-ID: <20220629194337.3cmrqed2xbalihif@bogus> References: <20220627165047.336669-1-sudeep.holla@arm.com> <20220627165047.336669-10-sudeep.holla@arm.com> <3656a067-cc3f-fd5b-e339-5925a856cce1@microchip.com> <20220629184708.x5exgjoy4sblyqml@bogus> <88ef07ea-fbde-b997-6c0c-99f5fb7be201@microchip.com> <20220629191250.mg3dybgl6hnlnqee@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 On Wed, Jun 29, 2022 at 07:25:41PM +0000, Conor.Dooley@microchip.com wrote: > > > On 29/06/2022 20:12, Sudeep Holla wrote: > > On Wed, Jun 29, 2022 at 06:56:29PM +0000, Conor.Dooley@microchip.com wrote: > >> On 29/06/2022 19:47, Sudeep Holla wrote: > >>> On Wed, Jun 29, 2022 at 06:18:25PM +0000, Conor.Dooley@microchip.com wrote: > >>>> On 29/06/2022 18:49, Conor.Dooley@microchip.com wrote: > >>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>>>> > >>>>> On 27/06/2022 17:50, Sudeep Holla wrote: > >>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>>>>> > >>>>>> 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. > >>>>> > >>>>> Hey Sudeep, > >>>>> I bisected broken boot on PolarFire SoC to this patch in next-20220629 :/ > >>>>> I suspect the issue is a missing "next-level-cache" in the the dt: > >>>>> arch/riscv/boot/dts/microchip/mpfs.dtsi > >>> > >>> Good that I included this in -next, I had not received any feedback from > >>> RISC-V even after 5 iterations. > >> > >> I'll be honest, I saw the titles and CC list and made some incorrect > >> assumptions as to whether looking at it was worthwhile! I am not at > >> this all too long and what is/isn't important to look at often is not > >> obvious to me. > > > > No worries, that's why I thought better to include in -next to get some > > attention and I did get it this time, hurray! ???? > > > >> But hey, our CI boots -next every day for a reason ;) > >> > > > > Good to know and that is really great. Anyways let me know if the diff I sent > > helps. I strongly suspect that is the reason, but I may be wrong. > > Aye, I'll get back to you on that one in a moment or two > Sure, take your time. > > > >>> I also see this DTS is very odd. It also > >>> states CPU0 doesn't have L1-D$ while the other 4 CPUs have L1-D$. Is that > >>> a mistake or is it the reality ? > >> > >> AFAIK, reality. It's the same for the SiFive fu540 (with which this shares > >> a core complex. See page 12: > >> https://static.dev.sifive.com/FU540-C000-v1.0.pdf > >> > >>> Another breakage in userspace cacheinfo > >>> sysfs entry of cpu0 has both I$ and D$. > >> > >> Could you clarify what this means please? > > > > Ignore me if the cpu0 really doesn't have L1-D$. However the userspace > > sysfs cacheinfo is incomplete without linking L2, so it can be considered > > as wrong info presented to the user. > > Yeah, I'll send a patch hooking up the L2. > It wasn't in the initial fu540 dtsi so I guess it was added after the > initial dts for my stuff was created based on that. > Thanks! > > > > Check /sys/devices/system/cpu/cpu/cache/index/*. > > L2 won't be present there as the link with next-level-cache is missing. > > So userspace can interpret this as absence of L2. > > > > # cat /sys/devices/system/cpu/cpu0/cache/index0/ > coherency_line_size shared_cpu_list type > level shared_cpu_map uevent > number_of_sets size ways_of_associativity > # ls /sys/devices/system/cpu/cpu0/cache/ > index0 index1 uevent > # cat /sys/devices/system/cpu/cpu0/cache/index0/level > 1 > # cat /sys/devices/system/cpu/cpu0/cache/index1/level > 1 > Ideally there must /sys/devices/system/cpu/cpu*/cache/index2/level which reads 2 once you link it in the DT. > cpu0 is /not/ the one with only instruction cache, that is not > running Linux. Ah, so there Linux runs only on cpu 1-4 ? -- Regards, Sudeep