Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp213627rwe; Fri, 14 Apr 2023 01:20:58 -0700 (PDT) X-Google-Smtp-Source: AKy350bm9/28w/CgLeK75KCxucmClfNBpSv1Wpuirt0l+0VbNGsdRyRoJcJliJmzgnae1W2jRfBy X-Received: by 2002:a17:903:187:b0:1a2:8c7e:f301 with SMTP id z7-20020a170903018700b001a28c7ef301mr2533585plg.45.1681460458190; Fri, 14 Apr 2023 01:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681460458; cv=none; d=google.com; s=arc-20160816; b=fse48RJA/kxYqb8pZnKJ+7MpCnkGcuFSSIkU0V0DQDiXnXG0uzqkdYHdMwMZiOnWuU aF/kJCOMEK0+7mMizAaD0418WhEZ7NJQDsJpCUUGl+FJZ3uO5f6c9lQbi7aEg2Hd2C23 ys1iynzETgYuG1i7gAyDy8Jj57NZhubJhiV5hfsgoOM8ssV0PMaPVMCVKbnEtYHYXLIz eiSiep4l1c7jlzaBDK3aEgor4/4FewkW5ttoXhQ4OMpuBXbDbIY5AePODqHeP8Nh709T qKsJJ7UqjSPxGfpMgTrndck+vvWjpVka+umURghWk/J4Zw1k86ryRop0GeNMK4ftdCnN ioRg== 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=GGOoPcZzlrEzYrIBtcbHNvbVWfMaLepWUFht6ipsgdU=; b=Ncn1xWxFczIv0v55I8dpuccZp2eU+N+REkBdspa8w1cNJjXzvWSCEdSG+TJT/j6Tfn yaf+AHLEPvqAJSELdFsc6zSgM0SZDG27txa1wV5yd7slGTdUt+lLNvdOnYMM/pL/7xbk qlqHOC1Qee9cBbLh6tDjY4UXBkxQzrz1jTMMEZldjdkA2VRS8Tdxp9QfF93qzjpTlIJY eJA5m/R2vC8/Q8q0sKNzYfNnBSL66CTrtkeq8H2QzjUYpaIAsvJ1GiCNWAqYaF0vS8qe mLAfeyUZOCxHOuWchkbPzNk9LA/qbk3n346Z/o+9hrGNPN9MHRZKjv8t2GathMFvDwVO KO5Q== 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 r11-20020a1709028bcb00b001a522f321f6si3973687plo.29.2023.04.14.01.20.46; Fri, 14 Apr 2023 01:20:58 -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 S230083AbjDNIUK (ORCPT + 99 others); Fri, 14 Apr 2023 04:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbjDNIUH (ORCPT ); Fri, 14 Apr 2023 04:20:07 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 72AFF30EA for ; Fri, 14 Apr 2023 01:20:06 -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 AD03C2F4; Fri, 14 Apr 2023 01:20:50 -0700 (PDT) Received: from [10.57.19.162] (unknown [10.57.19.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F19343F6C4; Fri, 14 Apr 2023 01:20:01 -0700 (PDT) Message-ID: <2a05dac0-c57e-a3cd-ec4d-55cf32e6dce9@arm.com> Date: Fri, 14 Apr 2023 10:19:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v3 2/4] cacheinfo: Check cache properties are present in DT Content-Language: en-US To: Florian Fainelli , linux-kernel@vger.kernel.org Cc: Radu Rendec , Alexandre Ghiti , Conor Dooley , Will Deacon , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , Palmer Dabbelt , Gavin Shan References: <20230413091436.230134-1-pierre.gondois@arm.com> <20230413091436.230134-3-pierre.gondois@arm.com> <4da53918-839b-4d28-0634-66fd7f38c8bd@gmail.com> From: Pierre Gondois In-Reply-To: <4da53918-839b-4d28-0634-66fd7f38c8bd@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 Hello Florian, On 4/13/23 20:16, Florian Fainelli wrote: > On 4/13/23 02:14, Pierre Gondois wrote: >> If a Device Tree (DT) is used, the presence of cache properties is >> assumed. Not finding any is not considered. For arm64 platforms, >> cache information can be fetched from the clidr_el1 register. >> Checking whether cache information is available in the DT >> allows to switch to using clidr_el1. >> >> init_of_cache_level() >> \-of_count_cache_leaves() >> will assume there a 2 cache leaves (L1 data/instruction caches), which >> can be different from clidr_el1 information. >> >> cache_setup_of_node() tries to read cache properties in the DT. >> If there are none, this is considered a success. Knowing no >> information was available would allow to switch to using clidr_el1. >> >> Fixes: de0df442ee49 ("cacheinfo: Check 'cache-unified' property to count cache leaves") >> Reported-by: Alexandre Ghiti >> Link: https://lore.kernel.org/all/20230404-hatred-swimmer-6fecdf33b57a@spud/ >> Signed-off-by: Pierre Gondois > > Humm, it would appear that the cache levels and topology is still > provided, despite the lack of cache properties in the Device Tree which > is intended by this patch set however we lost the size/ways/sets > information, could we not complement the missing properties here? > > If this is out of the scope of what you are doing: > > Tested-by: Florian Fainelli I submitted a v4 at: https://lore.kernel.org/all/20230414081453.244787-1-pierre.gondois@arm.com/ I haven't included your Tested-by as there were some small changes. If you consider these changes are small enough to include your tag, please let know, Regards, Pierre