From: Sudeep Holla <sudeep.holla@arm.com>
To: yunhui cui <cuiyunhui@bytedance.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>,
rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu,
linux-riscv@lists.infradead.org
Subject: Re: [External] Re: [PATCH 1/2] ACPI: PPTT: Populate cacheinfo entirely with PPTT
Date: Fri, 12 Apr 2024 17:27:23 +0100 [thread overview]
Message-ID: <Zhlg67dbl_S1GD0u@bogus> (raw)
In-Reply-To: <ZhlcYRolZwm7UwJu@bogus>
On Fri, Apr 12, 2024 at 05:08:01PM +0100, Sudeep Holla wrote:
> diff --git i/arch/riscv/kernel/cacheinfo.c w/arch/riscv/kernel/cacheinfo.c
> index 09e9b88110d1..92ab73ed5234 100644
> --- i/arch/riscv/kernel/cacheinfo.c
> +++ w/arch/riscv/kernel/cacheinfo.c
> @@ -79,6 +79,27 @@ int populate_cache_leaves(unsigned int cpu)
> struct device_node *prev = NULL;
> int levels = 1, level = 1;
>
> + if (!acpi_disabled) {
> + int ret, fw_levels, split_levels;
> +
> + ret = acpi_get_cache_info(cpu, &fw_levels, &split_levels);
> + if (ret)
> + return ret;
> +
> + /* must be set, so we can drop num_leaves assignment below */
> + this_cpu_ci->num_leaves = fw_levels + split_levels;
> +
> + for (idx = 0; level <= this_cpu_ci->num_levels &&
> + idx < this_cpu_ci->num_leaves; idx++, level++) {
> + if (level <= split_levels) {
> + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
> + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
> + } else {
> + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
> + }
> + }
Ofcourse we need to add here,
return 0;
> + }
> +
> if (of_property_read_bool(np, "cache-size"))
> ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
> if (of_property_read_bool(np, "i-cache-size"))
>
--
Regards,
Sudeep
WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: yunhui cui <cuiyunhui@bytedance.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>,
rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu,
linux-riscv@lists.infradead.org
Subject: Re: [External] Re: [PATCH 1/2] ACPI: PPTT: Populate cacheinfo entirely with PPTT
Date: Fri, 12 Apr 2024 17:27:23 +0100 [thread overview]
Message-ID: <Zhlg67dbl_S1GD0u@bogus> (raw)
In-Reply-To: <ZhlcYRolZwm7UwJu@bogus>
On Fri, Apr 12, 2024 at 05:08:01PM +0100, Sudeep Holla wrote:
> diff --git i/arch/riscv/kernel/cacheinfo.c w/arch/riscv/kernel/cacheinfo.c
> index 09e9b88110d1..92ab73ed5234 100644
> --- i/arch/riscv/kernel/cacheinfo.c
> +++ w/arch/riscv/kernel/cacheinfo.c
> @@ -79,6 +79,27 @@ int populate_cache_leaves(unsigned int cpu)
> struct device_node *prev = NULL;
> int levels = 1, level = 1;
>
> + if (!acpi_disabled) {
> + int ret, fw_levels, split_levels;
> +
> + ret = acpi_get_cache_info(cpu, &fw_levels, &split_levels);
> + if (ret)
> + return ret;
> +
> + /* must be set, so we can drop num_leaves assignment below */
> + this_cpu_ci->num_leaves = fw_levels + split_levels;
> +
> + for (idx = 0; level <= this_cpu_ci->num_levels &&
> + idx < this_cpu_ci->num_leaves; idx++, level++) {
> + if (level <= split_levels) {
> + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
> + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
> + } else {
> + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
> + }
> + }
Ofcourse we need to add here,
return 0;
> + }
> +
> if (of_property_read_bool(np, "cache-size"))
> ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
> if (of_property_read_bool(np, "i-cache-size"))
>
--
Regards,
Sudeep
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-04-12 16:27 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 12:38 [PATCH 1/2] ACPI: PPTT: Populate cacheinfo entirely with PPTT Yunhui Cui
2024-04-07 12:38 ` Yunhui Cui
2024-04-07 12:38 ` [PATCH 2/2] RISC-V: Select ACPI PPTT drivers Yunhui Cui
2024-04-07 12:38 ` Yunhui Cui
2024-04-09 6:11 ` [PATCH 1/2] ACPI: PPTT: Populate cacheinfo entirely with PPTT yunhui cui
2024-04-09 6:11 ` yunhui cui
2024-04-10 1:29 ` Jeremy Linton
2024-04-10 1:29 ` Jeremy Linton
2024-04-11 2:28 ` [External] " yunhui cui
2024-04-11 2:28 ` yunhui cui
2024-04-12 15:03 ` Jeremy Linton
2024-04-12 15:03 ` Jeremy Linton
2024-04-12 16:08 ` Sudeep Holla
2024-04-12 16:08 ` Sudeep Holla
2024-04-12 16:27 ` Sudeep Holla [this message]
2024-04-12 16:27 ` Sudeep Holla
2024-04-14 2:40 ` yunhui cui
2024-04-14 2:40 ` yunhui cui
2024-04-11 9:30 ` Sudeep Holla
2024-04-11 9:30 ` Sudeep Holla
2024-04-12 2:10 ` [External] " yunhui cui
2024-04-12 2:10 ` yunhui cui
2024-04-12 9:29 ` Sudeep Holla
2024-04-12 9:29 ` Sudeep Holla
2024-04-12 9:42 ` yunhui cui
2024-04-12 9:42 ` yunhui cui
2024-04-12 9:46 ` Sudeep Holla
2024-04-12 9:46 ` Sudeep Holla
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=Zhlg67dbl_S1GD0u@bogus \
--to=sudeep.holla@arm.com \
--cc=aou@eecs.berkeley.edu \
--cc=cuiyunhui@bytedance.com \
--cc=jeremy.linton@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.