Re: [PATCH v2 03/29] ACPI / PPTT: Find cache level by cache-id

Gavin Shan
2025-10-03T00:23:42Z

On 9/11/25 6:42 AM, James Morse wrote:
> The MPAM table identifies caches by id. The MPAM driver also wants to know
> the cache level to determine if the platform is of the shape that can be
> managed via resctrl. Cacheinfo has this information, but only for CPUs that
> are online.
>
> Waiting for all CPUs to come online is a problem for platforms where
> CPUs are brought online late by user-space.
>
> Add a helper that walks every possible cache, until it finds the one
> identified by cache-id, then return the level.
>
> Signed-off-by: James Morse <james.morse@arm.com>
> ---
> Changes since v1:
> * Droppeed the cleanup based table freeing, use acpi_get_pptt() instead.
> * Removed a confusing comment.
> * Clarified the kernel doc.
>
> Changes since RFC:
> * acpi_count_levels() now returns a value.
> * Converted the table-get stuff to use Jonathan's cleanup helper.
> * Dropped Sudeep's Review tag due to the cleanup change.
> ---
> drivers/acpi/pptt.c | 62 ++++++++++++++++++++++++++++++++++++++++++++
> include/linux/acpi.h | 5 ++++
> 2 files changed, 67 insertions(+)
>

With existing comments addressed, especially those from Lorenzo Pieralisi:

Reviewed-by: Gavin Shan <gshan@redhat.com>