From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49526C4332F for ; Fri, 25 Nov 2022 15:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jLIk9z20z2pbqqXDaouWO1wStIHB/2YC2I42rLeGxv8=; b=x+boKsq4r3MvVA 41svweML2djQoCQIZZgpWfjJIoOKDvHzDvylDox5Z0Jm2sjFJBoYO1hMNDGF1SvVpLzRWbnT1Iq3h uVfFF/dNg00gJM+m+EbGHBCEaGUzKbZM4aKW7tZDOYPEj2ZmZlyWpHg2hBvUaOMGxVWumFmT3I98Y XLAqwa+nyfHYgLBI7902zQdcHDxYafIEc7Zhivd9FdmzObgaX/OsN2uafXHocYFhg8g1mZ9PBFaVi NgmcoSPiS+tPDcnYyo+e58MWGwNXayRcTR7gXgO4UhkTUt5LRnOJDSd8ZrbPc681EzJ0V+qYv7sbt cNz8cz8GMEmdp31ePhNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyaVN-00HS3b-7z; Fri, 25 Nov 2022 15:20:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyaTf-00HQpA-HW; Fri, 25 Nov 2022 15:18:57 +0000 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 6F5142B; Fri, 25 Nov 2022 07:18:59 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 48CE23F587; Fri, 25 Nov 2022 07:18:50 -0800 (PST) Date: Fri, 25 Nov 2022 15:18:47 +0000 From: Sudeep Holla To: Pierre Gondois Cc: linux-kernel@vger.kernel.org, Ionela.Voinescu@arm.com, Rob.Herring@arm.com, Jeremy Linton , Catalin Marinas , Sudeep Holla , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Conor Dooley , Gavin Shan , Peter Chen , SeongJae Park , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v2 4/5] ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info() Message-ID: <20221125151847.ortklu4ptaftua6u@bogus> References: <20221121171217.3581004-1-pierre.gondois@arm.com> <20221121171217.3581004-5-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221121171217.3581004-5-pierre.gondois@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221125_071855_673037_3A776041 X-CRM114-Status: GOOD ( 22.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 21, 2022 at 06:12:12PM +0100, Pierre Gondois wrote: > acpi_find_last_cache_level() allows to find the last level of cache > for a given CPU. The function is only called on arm64 ACPI based > platforms to check for cache information that would be missing in > the CLIDR_EL1 register. > To allow populating (struct cpu_cacheinfo).num_leaves by only parsing > a PPTT, update acpi_find_last_cache_level() to get the 'split_levels', > i.e. the number of cache levels being split in data/instruction > caches. > > It is assumed that there will not be data/instruction caches above a > unified cache. > If a split level consist of one data cache and no instruction cache > (or opposite), then the missing cache will still be populated > by default with minimal cache information, and maximal cpumask > (all non-existing caches have the same fw_token). > > Suggested-by: Jeremy Linton > Signed-off-by: Pierre Gondois > Reviewed-by: Jeremy Linton > --- > arch/arm64/kernel/cacheinfo.c | 9 +++-- > drivers/acpi/pptt.c | 76 +++++++++++++++++++++++------------ > include/linux/cacheinfo.h | 8 ++-- > 3 files changed, 61 insertions(+), 32 deletions(-) > > diff --git a/arch/arm64/kernel/cacheinfo.c b/arch/arm64/kernel/cacheinfo.c > index 97c42be71338..164255651d64 100644 > --- a/arch/arm64/kernel/cacheinfo.c > +++ b/arch/arm64/kernel/cacheinfo.c > @@ -46,7 +46,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, > int init_cache_level(unsigned int cpu) > { > unsigned int ctype, level, leaves; > - int fw_level; > + int fw_level, ret; > struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); > > for (level = 1, leaves = 0; level <= MAX_CACHE_LEVEL; level++) { > @@ -61,8 +61,11 @@ int init_cache_level(unsigned int cpu) > > if (acpi_disabled) > fw_level = of_find_last_cache_level(cpu); > - else > - fw_level = acpi_find_last_cache_level(cpu); > + else { You need to add braces to if as well in such cases. I think checkpatch might tell you that. Just found this by chance. Anyways, this looks good to me. Reviewed-by: Sudeep Holla -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel