]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: cacheinfo: Implement cache_get_priv_group with a generic ops structure
authorYash Shah <yash.shah@sifive.com>
Thu, 20 Feb 2020 05:15:18 +0000 (10:45 +0530)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 20 May 2020 22:05:05 +0000 (15:05 -0700)
commit8d834b36bc49ff28ad2e13f90ad5e08c85b56227
treec88139e8678336fcfa439c7ddf91d96bf05d45be
parent0afc94a5738a52d1ca972c87a81ecf0f7252aa74
riscv: cacheinfo: Implement cache_get_priv_group with a generic ops structure

Implement cache_get_priv_group() that will make use of a generic ops
structure to return a private attribute group for custom cache info.

Using riscv_set_cacheinfo_ops() users can hook their own custom function
to return the private attribute group for cacheinfo. In future we can
add more ops to this generic ops structure for SOC specific cacheinfo.

Signed-off-by: Yash Shah <yash.shah@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/cacheinfo.h [new file with mode: 0644]
arch/riscv/kernel/cacheinfo.c