Skip to contentSkip to conversation

MIPS: Add cacheinfo support

PATCH New [email protected] 1 participant 1 message Dec 16, 2016 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Add cacheinfo support

From: Justin Chen <[email protected]>

Add cacheinfo support for MIPS architectures.

Use information from the cpuinfo_mips struct to populate the cacheinfo struct. This allows an architecture agnostic approach, however this also means if cache information is not properly populated within the cpuinfo_mips struct, there is nothing we can do. (I.E. c-r3k.c)

---
 arch/mips/kernel/Makefile    |  2 +-
 arch/mips/kernel/cacheinfo.c | 85 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/kernel/cacheinfo.c
arch/mips/kernel/Makefile +1 -1
index 4a603a3..904a9c4 100644
@@ -7,7 +7,7 @@ extra-y		:= head.o vmlinux.lds
 obj-y		+= cpu-probe.o branch.o elf.o entry.o genex.o idle.o irq.o \
 		   process.o prom.o ptrace.o reset.o setup.o signal.o \
 		   syscall.o time.o topology.o traps.o unaligned.o watch.o \
-		   vdso.o
+		   vdso.o cacheinfo.o
 
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_ftrace.o = -pg
arch/mips/kernel/cacheinfo.c new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
2.10.2