[PATCH] MIPS: Report all watch register masks in /proc/cpuinfo.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
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" : "",


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux