Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp608013rwl; Wed, 12 Apr 2023 01:13:12 -0700 (PDT) X-Google-Smtp-Source: AKy350Yu/HDus7YUrFJXXOnifn0B9h5w4gdDxgXGI8NJQ+hZN2di1KxCSnmuyUGjJqvj4kka7R1k X-Received: by 2002:a17:902:da89:b0:1a5:5c9e:df8d with SMTP id j9-20020a170902da8900b001a55c9edf8dmr18043206plx.25.1681287192331; Wed, 12 Apr 2023 01:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681287192; cv=none; d=google.com; s=arc-20160816; b=MfN183VAPjm6zSw9+YMEnDCGnuTtkTZe8neIXbXRqXSiPm/TcVlT7r39evEmKM6aVJ QSeTLInjtXg5X3P2+GYRhqwe2oQcVnRLYEdZiGc/UOJ+lyOahP7AaJ3qFBl56qeOYW9Q df8pqc7ZH/btbOCttFKSh1n2ritFicDHYL9Bqlym0Ju9NnhCo1NTeRO4K6vKq2AGSz1w 9NRAZqVY3QwC3+cm42PO8J2CnWxDY1YHY6jlwdp50FVEnFv+5nmaaYtYRXmEz07f//mw uvg0T/CIqsLI9/2fX1TSbZAQ1hdLTNaKGdUoz3h3oxybQVyTegvZEMuGu/v5tY8H84EP j/0w== 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=aWUyySSw85385WnHUoQsL+8FNbT5gZAEEQ2XB0zTfPQ=; b=hAYn8+b/cRVuLnvqeTn3SLTLdf1oijOqaYW7uPKt7BNpM12MoXMAUTp1I4eqjCyqu+ rByZbo+uykFtMOUCDqyHjnNLK1lnzs0X9qWXG0yuTbILjmtfojmaEVjfT2Pr3pgY8Z3e V+ofEm/YEYIeNJKbiRBIYhe5Q40+yo/MrYbkpwrNZg1DhXhtUXgJmKZyulSJkmiODgBm W4wzMEeKpsDjyB82o04VxhnBx4VdsiSqjCbe7UH8irhLGFzeVbtmxPoziqQKghBnJsWH jGdfb5L8bdNB3FDWSfkrAhfJuP2K4/8RUcBPwDlzhjiyQttpHXuGp1XjwxuQvisY2If0 xRpw== 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 n3-20020a6546c3000000b00514141872eesi14852602pgr.454.2023.04.12.01.13.00; Wed, 12 Apr 2023 01:13:12 -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 S229982AbjDLIMo (ORCPT + 99 others); Wed, 12 Apr 2023 04:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbjDLIMj (ORCPT ); Wed, 12 Apr 2023 04:12:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0745C61B8 for ; Wed, 12 Apr 2023 01:12:36 -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 1D87CD75; Wed, 12 Apr 2023 01:13:20 -0700 (PDT) Received: from [10.34.100.129] (pierre123.nice.arm.com [10.34.100.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0C8D33F587; Wed, 12 Apr 2023 01:12:33 -0700 (PDT) Message-ID: <3eac7e96-f3b3-ff66-d3f9-afb21fe17921@arm.com> Date: Wed, 12 Apr 2023 10:12:29 +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 v2 2/3] cacheinfo: Check cache properties are present in DT Content-Language: en-US To: Conor Dooley Cc: linux-kernel@vger.kernel.org, Radu Rendec , Alexandre Ghiti , Will Deacon , Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Palmer Dabbelt , Gavin Shan References: <20230412071809.12670-1-pierre.gondois@arm.com> <20230412071809.12670-3-pierre.gondois@arm.com> <20230412-cone-mousiness-23326e149592@wendy> From: Pierre Gondois In-Reply-To: <20230412-cone-mousiness-23326e149592@wendy> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 Conor, On 4/12/23 09:55, Conor Dooley wrote: > Hey Pierre! > > On Wed, Apr 12, 2023 at 09:18:05AM +0200, 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. > > Hmm, w/ this series I am still seeing a: > [ 0.306736] Early cacheinfo failed, ret = -22 > > Not finding any cacheinfo is totally valid, right? > > A basic RISC-V QEMU setup is sufficient to reproduce, for instance: > | $(qemu) \ > | -m 2G -smp 5 \ > | -M virt -nographic \ > | -kernel $(vmlinux_bin) Sorry I forgot to remove the: pr_err("Early cacheinfo failed, ret = %d\n", ret); I ll wait until tomorrow to send a v3 with this fixed. Thanks for testing, Regards, Pierre > > Cheers, > Conor. >