]> www.infradead.org Git - users/jedix/linux-maple.git/commit
openrisc: Add cacheinfo support
authorSahil Siddiq <sahilcdq0@gmail.com>
Sat, 19 Apr 2025 15:48:19 +0000 (21:18 +0530)
committerStafford Horne <shorne@gmail.com>
Sun, 20 Apr 2025 06:06:54 +0000 (07:06 +0100)
commit4e6d24a309e60251439f08f15de37b489465f17b
tree49cdf603d32fcf154001278ce7c72ed52f364c71
parent0c4a6e79ef522554bc509294dfe69b24ee78205d
openrisc: Add cacheinfo support

Add cacheinfo support for OpenRISC.

Currently, a few CPU cache attributes pertaining to OpenRISC processors
are exposed along with other unrelated CPU attributes in the procfs file
system (/proc/cpuinfo). However, a few cache attributes remain unexposed.

Provide a mechanism that the generic cacheinfo infrastructure can employ
to expose these attributes via the sysfs file system. These attributes
can then be exposed in /sys/devices/system/cpu/cpuX/cache/indexN. Move
the implementation to pull cache attributes from the processor's
registers from arch/openrisc/kernel/setup.c with a few modifications.

This implementation is based on similar work done for MIPS and LoongArch.

Link: https://raw.githubusercontent.com/openrisc/doc/master/openrisc-arch-1.4-rev0.pdf
Signed-off-by: Sahil Siddiq <sahilcdq0@gmail.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/Makefile
arch/openrisc/kernel/cacheinfo.c [new file with mode: 0644]
arch/openrisc/kernel/setup.c