Re: [PATCH v5 04/34] ACPI / PPTT: Find cache level by cache-id

From: Jonathan Cameron

Date: Tue Nov 18 2025 - 10:33:12 EST


On Mon, 17 Nov 2025 16:59:43 +0000
Ben Horgan <ben.horgan@xxxxxxx> wrote:

> From: James Morse <james.morse@xxxxxxx>
>
> 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@xxxxxxx>
> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
> Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
> Reviewed-by: Fenghua Yu <fenghuay@xxxxxxxxxx>
> Tested-by: Fenghua Yu <fenghuay@xxxxxxxxxx>
> Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> Tested-by: Carl Worth <carl@xxxxxxxxxxxxxxxxxxxxxx>
> Tested-by: Gavin Shan <gshan@xxxxxxxxxx>
> Tested-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>