Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4321401rwl; Tue, 28 Mar 2023 05:51:23 -0700 (PDT) X-Google-Smtp-Source: AK7set+fGPFaB4o6BGariQhFggV3g8bRum4DPr9l2Gevzg6++b+5gOPVTbwRvNQmGy/waQ65yKfL X-Received: by 2002:a05:6a20:8b9d:b0:dd:b941:5d90 with SMTP id m29-20020a056a208b9d00b000ddb9415d90mr13081669pzh.60.1680007883205; Tue, 28 Mar 2023 05:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680007883; cv=none; d=google.com; s=arc-20160816; b=bC6p+JArFenM/3Znlt9lCLyV4ZjoRVh6CfhKmSs36Lm/s5t7p93tAsTjwnbhzeAeLv BQ5//tlKfMSLaCtVe1e3yipoatq7IK6+5oUxh11K1HjIibob0wcJlwb1nAQ3VIdCA6Zx EYXa1NPAvb2FSimvBCmkMFUlxNkppsBVQ++nscsSvRVxJGCgG3lehQ+Fvf+k0BS6/N28 22IZ4wjyt18sZc1C2yNJJXKfeh9aI0vOT062UXszJy6p997IYNez3sLOtueqLJtG8aqW A8+z7H06XGxU+VycYSVVKtKq8ewr+uCiARDqQQtu6crai7bBeQkiuiUQJsBprQaTtKvI YCDg== 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=DGF293I58bo7hwE4ACwQH4t9aG2mGsCBwMR6ag8AbS0=; b=hyi7vFbZZGcZ7SoUzw7BXMtLatYJzXO8/KB2cmzZfAz/h1TsVzM6RqJr0oBZi9AVB/ WRPJioiCZiKdCzyxFQ8nPopMmR7OEWMRIwQKFDbyH1fWasJizTfxA9AkVau1y3WYnjr5 onhJPW8dSIPtb0nBYlgHUZ7uhFkYyyiMXOlMli2vhhr7HjZy98Yq7siQuM/y00N/EU7v vPVXA3VXr/n6Aa6L+So6d3tZZ03qJaq/lDYhO+dvj7sdSz/YsgbssfwVhyHx2yimVZt9 rGi76s1isTDkTZK7jevfpw0eBOvlfR0huOcAAFKVSIsvXNIqhs4OS3vwXlNuc4IT0D0I A7vw== 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 g20-20020a63e614000000b0050be80662a0si29012021pgh.683.2023.03.28.05.51.10; Tue, 28 Mar 2023 05:51:23 -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 S232898AbjC1MsM (ORCPT + 99 others); Tue, 28 Mar 2023 08:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232902AbjC1MsE (ORCPT ); Tue, 28 Mar 2023 08:48:04 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12A219767 for ; Tue, 28 Mar 2023 05:47:49 -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 B9C5AC14; Tue, 28 Mar 2023 05:48:09 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 322743F73F; Tue, 28 Mar 2023 05:47:24 -0700 (PDT) Date: Tue, 28 Mar 2023 13:47:21 +0100 From: Sudeep Holla To: Yicong Yang , gregkh@linuxfoundation.org Cc: rafael@kernel.org, pierre.gondois@arm.com, Sudeep Holla , palmer@rivosinc.com, linux-kernel@vger.kernel.org, prime.zeng@hisilicon.com, linuxarm@huawei.com, yangyicong@hisilicon.com Subject: Re: [PATCH v2] cacheinfo: Fix LLC is not exported through sysfs Message-ID: <20230328124721.f65amn4v5qmdg64g@bogus> References: <20230328114915.33340-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230328114915.33340-1-yangyicong@huawei.com> X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Tue, Mar 28, 2023 at 07:49:15PM +0800, Yicong Yang wrote: > From: Yicong Yang > > After entering 6.3-rc1 the LLC cacheinfo is not exported on our ACPI I would have preferred the commit causing the issue as you know and have it in the fixes tag, but info is there so I don't think it is worth another version churn. Sorry my bad for missing it earlier. > based arm64 server. This is because the LLC cacheinfo is partly reset > when secondary CPUs boot up. On arm64 the primary cpu will allocate > and setup cacheinfo: > init_cpu_topology() > for_each_possible_cpu() > fetch_cache_info() // Allocate cacheinfo and init levels > detect_cache_attributes() > cache_shared_cpu_map_setup() > if (!last_level_cache_is_valid()) // not valid, setup LLC > cache_setup_properties() // setup LLC > > On secondary CPU boot up: > detect_cache_attributes() > populate_cache_leaves() > get_cache_type() // Get cache type from clidr_el1, > // for LLC type=CACHE_TYPE_NOCACHE > cache_shared_cpu_map_setup() > if (!last_level_cache_is_valid()) // Valid and won't go to this branch, > // leave LLC's type=CACHE_TYPE_NOCACHE > > The last_level_cache_is_valid() use cacheinfo->{attributes, fw_token} to > test it's valid or not, but populate_cache_leaves() will only reset > LLC's type, so we won't try to re-setup LLC's type and leave it > CACHE_TYPE_NOCACHE and won't export it through sysfs. > > This patch tries to fix this by not re-populating the cache leaves if > the LLC is valid. > Reviewed-by: Sudeep Holla Hi Greg, Can you pick this up in your next round of fixes for v6.3 please ? -- Regards, Sudeep