linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: linux-kernel@vger.kernel.org, Ionela.Voinescu@arm.com,
	Rob.Herring@arm.com, Jeremy Linton <jeremy.linton@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Will Deacon <will@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Conor Dooley <conor.dooley@microchip.com>,
	Gavin Shan <gshan@redhat.com>, Peter Chen <peter.chen@kernel.org>,
	SeongJae Park <sj@kernel.org>, Jakub Kicinski <kuba@kernel.org>,
	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()
Date: Fri, 25 Nov 2022 15:18:47 +0000	[thread overview]
Message-ID: <20221125151847.ortklu4ptaftua6u@bogus> (raw)
In-Reply-To: <20221121171217.3581004-5-pierre.gondois@arm.com>

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 <jeremy.linton@arm.com>
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  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 <sudeep.holla@arm.com>


-- 
Regards,
Sudeep

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-11-25 15:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 17:12 [PATCH v2 0/5] [PATCH 0/5] arch_topology: Build cacheinfo from primary CPU Pierre Gondois
2022-11-21 17:12 ` [PATCH v2 1/5] cacheinfo: Use RISC-V's init_cache_level() as generic OF implementation Pierre Gondois
2022-12-02 17:57   ` Palmer Dabbelt
2022-11-21 17:12 ` [PATCH v2 2/5] cacheinfo: Return error code in init_of_cache_level() Pierre Gondois
2022-11-21 17:12 ` [PATCH v2 3/5] ACPI: PPTT: Remove acpi_find_cache_levels() Pierre Gondois
2022-11-21 17:12 ` [PATCH v2 4/5] ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info() Pierre Gondois
2022-11-25 15:18   ` Sudeep Holla [this message]
2022-11-21 17:12 ` [PATCH v2 5/5] arch_topology: Build cacheinfo from primary CPU Pierre Gondois
2022-11-25 15:13   ` Sudeep Holla
2022-11-23 14:30 ` [PATCH v2 0/5] [PATCH 0/5] " Rafael J. Wysocki
2022-12-09  1:24 ` Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221125151847.ortklu4ptaftua6u@bogus \
    --to=sudeep.holla@arm.com \
    --cc=Ionela.Voinescu@arm.com \
    --cc=Rob.Herring@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=catalin.marinas@arm.com \
    --cc=conor.dooley@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gshan@redhat.com \
    --cc=jeremy.linton@arm.com \
    --cc=kuba@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peter.chen@kernel.org \
    --cc=pierre.gondois@arm.com \
    --cc=rafael@kernel.org \
    --cc=sj@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).