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@xxxxxxx> > --- > 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@xxxxxxx> -- Regards, Sudeep