cacheinfo: Add use_arch[|_cache]_info field/function
authorPierre Gondois <pierre.gondois@arm.com>
Fri, 14 Apr 2023 08:14:52 +0000 (10:14 +0200)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 14 Apr 2023 09:13:39 +0000 (10:13 +0100)
commitef9f643a9f8b62bcbcc51f0e0af8599adc2e17ed
tree81f76375f260f1d9db748114d5d98d91c062f9ca
parent3522340199cc060b70f0094e3039bdb43c3f6ee1
cacheinfo: Add use_arch[|_cache]_info field/function

The cache information can be extracted from either a Device
Tree (DT), the PPTT ACPI table, or arch registers (clidr_el1
for arm64).

The clidr_el1 register is used only if DT/ACPI information is not
available. It does not states how caches are shared among CPUs.

Add a use_arch_cache_info field/function to identify when the
DT/ACPI doesn't provide cache information. Use this information
to assume L1 caches are privates and L2 and higher are shared among
all CPUs.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Link: https://lore.kernel.org/r/20230414081453.244787-5-pierre.gondois@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/base/cacheinfo.c
include/linux/cacheinfo.h