aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-12-21 14:19:09 -0800
committerRalf Baechle <ralf@linux-mips.org>2011-01-18 19:30:22 +0100
commite77c32fe284a4da1b4e0994890a4d3527812eb61 (patch)
tree8bff97f0aeb8ce4ba0bf4af92f798e06b66f6e9f /arch/mips/kernel
parent487d70d0b8bd1c70d099a7526077ffefee412050 (diff)
downloadkernel_samsung_smdk4412-e77c32fe284a4da1b4e0994890a4d3527812eb61.zip
kernel_samsung_smdk4412-e77c32fe284a4da1b4e0994890a4d3527812eb61.tar.gz
kernel_samsung_smdk4412-e77c32fe284a4da1b4e0994890a4d3527812eb61.tar.bz2
MIPS: Probe for presence of KScratch registers.
Probe c0_config4 for KScratch registers and report them in /proc/cpuinfo. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1877/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/cpu-probe.c2
-rw-r--r--arch/mips/kernel/proc.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 68dae7b..f65d4c8 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -739,6 +739,8 @@ static inline unsigned int decode_config4(struct cpuinfo_mips *c)
&& cpu_has_tlb)
c->tlbsize += (config4 & MIPS_CONF4_MMUSIZEEXT) * 0x40;
+ c->kscratch_mask = (config4 >> 16) & 0xff;
+
return config4 & MIPS_CONF_M;
}
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 4195abb..e309665 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -74,6 +74,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
);
seq_printf(m, "shadow register sets\t: %d\n",
cpu_data[n].srsets);
+ seq_printf(m, "kscratch registers\t: %d\n",
+ hweight8(cpu_data[n].kscratch_mask));
seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core);
sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",