From: Sudeep Holla <sudeep.holla@arm.com>
To: James Morse <james.morse@arm.com>
Cc: <linux-acpi@vger.kernel.org>, Rafael Wysocki <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, <jeremy.linton@arm.com>
Subject: Re: [PATCH 1/4] ACPI / PPTT: Add a helper to fill a cpumask from a processor container
Date: Mon, 23 Jun 2025 14:08:25 +0100 [thread overview]
Message-ID: <20250623-incredible-overjoyed-foxhound-baa930@sudeepholla> (raw)
In-Reply-To: <20250612171336.4858-2-james.morse@arm.com>
On Thu, Jun 12, 2025 at 05:13:33PM +0000, James Morse wrote:
> The PPTT describes CPUs and caches, as well as processor containers.
> The ACPI table for MPAM describes the set of CPUs that can access an MSC
> with the UID of a processor container.
>
> Add a helper to find the processor container by its id, then walk
> the possible CPUs to fill a cpumask with the CPUs that have this
> processor container as a parent.
>
> Signed-off-by: James Morse <james.morse@arm.com>
> ---
> drivers/acpi/pptt.c | 91 ++++++++++++++++++++++++++++++++++++++++++++
> include/linux/acpi.h | 6 +++
> 2 files changed, 97 insertions(+)
>
> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> index 54676e3d82dd..aaf9b5a26d07 100644
> --- a/drivers/acpi/pptt.c
> +++ b/drivers/acpi/pptt.c
> @@ -298,6 +298,97 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
> return NULL;
> }
>
> +/**
> + * acpi_pptt_get_child_cpus() - Find all the CPUs below a PPTT processor node
> + * @table_hdr: A reference to the PPTT table.
> + * @parent_node: A pointer to the processor node in the @table_hdr.
> + * @cpus: A cpumask to fill with the CPUs below @parent_node.
> + *
Is this cpus mask always cleared before acpi_pptt_get_child_cpus() is called.
Just checking if it makes sense to clear it before we start the loop in this
function or do we have a need to start with a pre-filled cpumask ?
Other than that, LGTM.
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
--
Regards,
Sudeep
next prev parent reply other threads:[~2025-06-23 13:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 17:13 [PATCH 0/4] ACPI / PPTT: Add helpers to fill cpumask from PPTT James Morse
2025-06-12 17:13 ` [PATCH 1/4] ACPI / PPTT: Add a helper to fill a cpumask from a processor container James Morse
2025-06-23 13:08 ` Sudeep Holla [this message]
2025-06-26 17:14 ` James Morse
2025-06-23 13:21 ` Sudeep Holla
2025-06-26 17:11 ` James Morse
2025-06-26 17:10 ` James Morse
2025-06-12 17:13 ` [PATCH 2/4] ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear levels James Morse
2025-06-23 13:10 ` Sudeep Holla
2025-06-26 17:11 ` James Morse
2025-06-12 17:13 ` [PATCH 3/4] ACPI / PPTT: Find cache level by cache-id James Morse
2025-06-23 13:21 ` Sudeep Holla
2025-06-12 17:13 ` [PATCH 4/4] ACPI / PPTT: Add a helper to fill a cpumask from a cache_id James Morse
2025-06-23 13:22 ` 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=20250623-incredible-overjoyed-foxhound-baa930@sudeepholla \
--to=sudeep.holla@arm.com \
--cc=james.morse@arm.com \
--cc=jeremy.linton@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox