Re: [PATCH v2] cacheinfo: don't propagate DT/ACPI error when arch supplies info (arm64)
From: Sudeep Holla
Date: Fri Jun 12 2026 - 08:53:04 EST
On Thu, Jun 11, 2026 at 04:55:13AM -0700, Breno Leitao wrote:
> cache_setup_properties() sets use_arch_info = true when DT/ACPI
> provide no cache nodes and the arch can derive the topology from
> CPU registers (e.g. arm64 reading CLIDR_EL1), but still returns the
> original -ENOENT. cache_shared_cpu_map_setup() bails on that error
> before the new flag can take effect, so the first CPU brought online
> always trips a misleading warning:
>
> cacheinfo: Unable to detect cache hierarchy for CPU 0
>
> Subsequent CPUs skip cache_setup_properties() entirely because
> use_arch_info is now true, which is why only CPU0 hits it. This is
> reproducible on arm64 with the QEMU 'virt' machine, whose default DT
> has no cache nodes.
>
> Clear ret after setting use_arch_info so the caller proceeds and
> populates the shared cpu map via the arch-supplied leaves.
>
LGTM,
Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxxxxx>
Greg,
Can you pick up this one as part of your next round of fixes if any or
for v7.2 ?
> Fixes: ef9f643a9f8b ("cacheinfo: Add use_arch[|_cache]_info field/function")
> Reviewed-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
> ---
> Cc; hruben@xxxxxxxx
> ---
> Changes in v2:
> - EDITME: describe what is new in this series revision.
> - EDITME: use bulletpoints and terse descriptions.
Ideally, good to update this or atleast drop these 😄.
--
Regards,
Sudeep