Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: Report all watch register masks in /proc/cpuinfo.
@ 2008-10-10 17:01 David Daney
  2008-10-10 17:56 ` David Daney
  0 siblings, 1 reply; 2+ messages in thread
From: David Daney @ 2008-10-10 17:01 UTC (permalink / raw)
  To: linux-mips

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 <ddaney@caviumnetworks.com>
---
 arch/mips/kernel/proc.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 0dda76c..87cab9f 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -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" : "",

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Report all watch register masks in /proc/cpuinfo.
  2008-10-10 17:01 [PATCH] MIPS: Report all watch register masks in /proc/cpuinfo David Daney
@ 2008-10-10 17:56 ` David Daney
  0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2008-10-10 17:56 UTC (permalink / raw)
  To: linux-mips

David Daney wrote:
> 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 <ddaney@caviumnetworks.com>
> ---

Drat!, That version has trailing white space.  I will send a corrected
patch.

David Daney

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-10 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 17:01 [PATCH] MIPS: Report all watch register masks in /proc/cpuinfo David Daney
2008-10-10 17:56 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox