Skip to contentSkip to conversation

MIPS: Report all watch register masks in /proc/cpuinfo (version 2).

PATCH Applied David Daney 2 participants 2 messages Oct 10, 2008 – Oct 11, 2008 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Report all watch register masks in /proc/cpuinfo (version 2).

Report all watch register masks in /proc/cpuinfo.

This version actually passes checkpatch.pl!

Some CPUs have heterogeneous watch register properties. Let's show them all.

---
arch/mips/kernel/proc.c | 14 +++++++++-----

1 files changed, 9 insertions(+), 5 deletions(-)
arch/mips/kernel/proc.c +0 -0
index 0dda76c..87cab9f 100644
@@ -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" : "",
Applied
#1 lore raw
Quoted 8 lines · David Daney

Report all watch register masks in /proc/cpuinfo.

This version actually passes checkpatch.pl!

Some CPUs have heterogeneous watch register properties. Let's show them all.

Thanks, applied / folded into the original patch for Linus.

Ralf