Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp965871iog; Thu, 30 Jun 2022 14:00:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vhbSQUVvr6kSlHNDmmce8cS6fLchwJIMPBTqCqFEYYV6v5TLx8Z9Eow53axnsDBiNa47U5 X-Received: by 2002:a17:907:7f1d:b0:722:f2fe:8eaf with SMTP id qf29-20020a1709077f1d00b00722f2fe8eafmr10734802ejc.279.1656622854065; Thu, 30 Jun 2022 14:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656622854; cv=none; d=google.com; s=arc-20160816; b=lbstcdc4ymEaTqwsSg9rDmeFYBsNQyuwwJQEN0cy6vLa1uNqWdq9qcFNA33hMYCXxB V+PxqlxISgX/xf3WnY87q2tUf3xJTFK3HqkCJcuZt7JDBLobTaAP3HIy7UuaEDpnBmem jM637DOYqVOoocEi/+dKVPtgKzdeIsRso6lHhavaQVjIYUf6MF7vwTwwztpk7ofNzlpo zbcPo3nqMyQyJH07nYWyxnmptvENauYoPyrfJ4c7XtUQMxYmY2j3MOpAJKPAeTV8WUCx 1UVms9SFVBKmXF+vLu2tKRJ+xSWZ2pi8I+Xc+EVNtmYCF6St5/PyaRuIcZX4w/Zn3i40 UjlA== 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=STr2OyfaxzUnE5RdJ47RJO0T+CiHtWuU2A4bad5B7SE=; b=YlWe/h/mTTG3Ndet6+k2fEtHnjEHrtnmRLz2Y7CPZPPSNw5LetbQ+VEHu3wAFaRVwD pnbgtGTKxU30Ep0zx5N4fxmLrgqd7mkCnX+BEUBssaZb8OwmaaM3m44sTiXYLgQENY5m JeYw2sqfcduuthxAgylaTqsyBXfcHze2GtWuMzjbb5zyHJ2g/NqZHlvki/ov1zlvsh5u tW6mwexvMYp1h/QSyOy3wVX7/k8ZXafTwNkGB2kkg3pXXg2BGu1hyXWZ6P+5AawqVJ0u ZmEABljFft1IYiaLI3IbhV8EliiNAjQ1KFKFsBMeCsuAnSWAhbrKCxEAAjfUJRGdjV1e mWJA== 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 s1-20020a17090699c100b00726943e5de1si22422814ejn.579.2022.06.30.14.00.28; Thu, 30 Jun 2022 14:00:54 -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 S236881AbiF3UW6 (ORCPT + 99 others); Thu, 30 Jun 2022 16:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232654AbiF3UW4 (ORCPT ); Thu, 30 Jun 2022 16:22:56 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C1A1B28E19 for ; Thu, 30 Jun 2022 13:22:55 -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 C20242B; Thu, 30 Jun 2022 13:22:55 -0700 (PDT) Received: from bogus (unknown [10.57.39.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1147A3F5A1; Thu, 30 Jun 2022 13:22:52 -0700 (PDT) Date: Thu, 30 Jun 2022 21:21:41 +0100 From: Sudeep Holla To: Conor.Dooley@microchip.com Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, atishp@atishpatra.org, atishp@rivosinc.com, 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: <20220630202141.37p5qhppkiz6wrcb@bogus> References: <20220629195454.vbsjvcadmukiunt7@bogus> <03433f57-04ed-44a9-a2f6-5577df94f11e@microchip.com> <20220630103958.tcear5oz3orsqwg6@bogus> <9d9e80b8-17e2-b1d9-14fa-f1d8d7dfbd9a@microchip.com> <20220630173513.dyrrmjbpxzi3e6fe@bogus> <3840dbf7-ca18-b7ab-4d7a-92c9305476fa@microchip.com> <20220630200717.zlc6z6zcqbsw7euk@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Thu, Jun 30, 2022 at 08:13:55PM +0000, Conor.Dooley@microchip.com wrote: > > I didn't have the time to go digging into things, but the following > macro looked odd: > #define per_cpu_cacheinfo_idx(cpu, idx) \ > (per_cpu_cacheinfo(cpu) + (idx)) > Maybe it is just badly named, but is this getting the per_cpu_cacheinfo > and then incrementing intentionally, or is it meant to get the > per_cpu_cacheinfo of cpu + idx? OK, basically per_cpu_cacheinfo(cpu) get the information for a cpu while per_cpu_cacheinfo_idx(cpu, idx) will fetch the information for a given cpu and given index within the cpu. So we are incrementing the pointer by the index. These work just fine on arm64 platform. Not sure if compiler is optimising something as I still can't understand how we can end up with valid llc but fw_token as NULL. -- Regards, Sudeep