summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPierre Gondois <pierre.gondois@arm.com>2025-10-20 20:36:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-07 00:12:13 +0300
commita6d0510f295d99739abe16349a9c5d7a7f0ee55d (patch)
tree0932a7ab1e3378242c123a27514d4e3c14c24c14 /include/linux
parentd88b3051d4f977272547f2221378be48de583f82 (diff)
downloadlinux-a6d0510f295d99739abe16349a9c5d7a7f0ee55d.tar.xz
cacheinfo: Use RISC-V's init_cache_level() as generic OF implementation
[ Upstream commit c3719bd9eeb2edf84bd263d662e36ca0ba262a23 ] RISC-V's implementation of init_of_cache_level() is following the Devicetree Specification v0.3 regarding caches, cf.: - s3.7.3 'Internal (L1) Cache Properties' - s3.8 'Multi-level and Shared Cache Nodes' Allow reusing the implementation by moving it. Also make 'levels', 'leaves' and 'level' unsigned int. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Link: https://lore.kernel.org/r/20230104183033.755668-2-pierre.gondois@arm.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Wen Yang <wen.yang@linux.dev> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cacheinfo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
index 00b7a6ae8617..ff0328f3fbb0 100644
--- a/include/linux/cacheinfo.h
+++ b/include/linux/cacheinfo.h
@@ -80,6 +80,7 @@ struct cpu_cacheinfo {
struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu);
int init_cache_level(unsigned int cpu);
+int init_of_cache_level(unsigned int cpu);
int populate_cache_leaves(unsigned int cpu);
int cache_setup_acpi(unsigned int cpu);
bool last_level_cache_is_valid(unsigned int cpu);