MIPS: Report all watch register masks in /proc/cpuinfo.
PATCH 1/1 MIPS: Report all watch register masks in /proc/cpuinfo.
Report all watch register masks in /proc/cpuinfo.
Some CPUs have heterogeneous watch register properties. Let's show them all.
Signed-off-by David Daney <[email protected]>
---arch/mips/kernel/proc.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
arch/mips/kernel/proc.c +0 -0
@@ -23,6 +23,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned int fp_vers; unsigned long n = (unsigned long) v - 1; char fmt [64];
+ int i;
preempt_disable(); version = current_cpu_data.processor_id; @@ -59,11 +60,14 @@ static int show_cpuinfo(struct seq_file *m, void *v) cpu_has_divec ? "yes" : "no"); seq_printf(m, "hardware watchpoint\t: %s", cpu_has_watch ? "yes, " : "no\n"); - if (cpu_has_watch) - seq_printf(m, - "count: %d, address/irw mask: 0x%04x\n", - cpu_data[n].watch_reg_count, - cpu_data[n].watch_reg_masks[0]);
+ if (cpu_has_watch) {
+ seq_printf(m, "count: %d, address/irw mask: [", + cpu_data[n].watch_reg_count);
+ for (i = 0; i < cpu_data[n].watch_reg_count; i++)
+ seq_printf(m, "%s0x%04x", i ? ", " : "" ,
+ cpu_data[n].watch_reg_masks[i]);
+ seq_printf(m, "]\n");
+ }
seq_printf(m, "ASEs implemented\t:%s%s%s%s%s%s\n", cpu_has_mips16 ? " mips16" : "", cpu_has_mdmx ? " mdmx" : "",
Quoted 7 lines · David Daney
Report all watch register masks in
/proc/cpuinfo.Some CPUs have heterogeneous watch register properties. Let's show them all.
Signed-off-by David Daney <[email protected]>---
Drat!, That version has trailing white space. I will send a corrected patch.
David Daney