Re: [PATCH] arm64: cacheinfo: Simplify init_cache_level()
From: Thorsten Blum
Date: Wed Nov 04 2026 - 06:11:33 EST
Hi Ben,
On Wed, Nov 04, 2026 at 10:32:58AM +0000, Ben Horgan wrote:
> Hi Thorsten,
>
> On 04/11/2026 08:36, Thorsten Blum wrote:
> > acpi_get_cache_info() already sets fw_level to 0 on failure, so drop the
> > redundant check and the manual assignment.
>
> This doesn't seem to be the case when CONFIG_ACPI_PPTT is not defined. Can the dummy implementation
> in include/linux/cacheinfo.h be called from init_cache_level()? For the implementation in
On arm64, ACPI_PPTT is selected when ACPI is enabled. When ACPI is
disabled, acpi_disabled = 1 and init_cache_level() won't call the stub.
> drivers/acpi/pptt.c levels is documented as "Number of levels if success." and so would be good to
> mention what happens in the error case if it needs to be relied on.
Below the parameter descriptions, it already says:
"Errors caused by lack of a PPTT table, or otherwise, return 0
indicating we didn't find any cache levels."
Thanks,
Thorsten