From 0535c813973dad89b6124622263ee25d1ab11570 Mon Sep 17 00:00:00 2001 From: Zhang Le Date: Sat, 21 Mar 2009 21:19:44 +0800 Subject: [PATCH] added cache size to /proc/cpuinfo Signed-off-by: Zhang Le --- arch/mips/kernel/proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 26760cad8b6..78a75256362 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c @@ -22,6 +22,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) unsigned long n = (unsigned long) v - 1; unsigned int version = cpu_data[n].processor_id; unsigned int fp_vers = cpu_data[n].fpu_id; + unsigned int scache_size = cpu_data[n].scache.ways + * cpu_data[n].scache.sets * cpu_data[n].scache.linesz; char fmt [64]; int i; @@ -45,6 +47,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n", cpu_data[n].udelay_val / (500000/HZ), (cpu_data[n].udelay_val / (5000/HZ)) % 100); + seq_printf(m, "cache size\t\t: %ukB\n", scache_size >> 10); seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no"); seq_printf(m, "microsecond timers\t: %s\n", cpu_has_counter ? "yes" : "no"); -- 2.11.4.GIT