patch-2.4.25 linux-2.4.25/arch/mips/sibyte/sb1250/bus_watcher.c

Next file: linux-2.4.25/arch/mips/sibyte/sb1250/smp.c
Previous file: linux-2.4.25/arch/mips/sibyte/cfe/smp.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/arch/mips/sibyte/sb1250/bus_watcher.c linux-2.4.25/arch/mips/sibyte/sb1250/bus_watcher.c
@@ -174,10 +174,24 @@
 {
 	struct bw_stats_struct *stats = data;
 	unsigned long cntr;
+#ifdef CONFIG_SIBYTE_BW_TRACE
+	int i;
+#endif
 #ifndef CONFIG_PROC_FS
 	char bw_buf[1024];
 #endif
 
+#ifdef CONFIG_SIBYTE_BW_TRACE
+	csr_out32(M_SCD_TRACE_CFG_FREEZE, IO_SPACE_BASE | A_SCD_TRACE_CFG);
+	csr_out32(M_SCD_TRACE_CFG_START_READ, IO_SPACE_BASE | A_SCD_TRACE_CFG);
+
+	for (i=0; i<256*6; i++)
+		printk("%016llx\n", in64(IO_SPACE_BASE | A_SCD_TRACE_READ));
+
+	csr_out32(M_SCD_TRACE_CFG_RESET, IO_SPACE_BASE | A_SCD_TRACE_CFG);
+	csr_out32(M_SCD_TRACE_CFG_START, IO_SPACE_BASE | A_SCD_TRACE_CFG);
+#endif
+
 	/* Destructive read, clears register and interrupt */
 	stats->status = csr_in32(IO_SPACE_BASE | A_SCD_BUS_ERR_STATUS);
 	stats->status_printed = 0;
@@ -226,6 +240,14 @@
 	create_proc_decoder(&bw_stats);
 #endif
 
+#ifdef CONFIG_SIBYTE_BW_TRACE
+	csr_out32((M_SCD_TRSEQ_ASAMPLE | M_SCD_TRSEQ_DSAMPLE |
+	       K_SCD_TRSEQ_TRIGGER_ALL),
+	      IO_SPACE_BASE | A_SCD_TRACE_SEQUENCE_0);
+	csr_out32(M_SCD_TRACE_CFG_RESET, IO_SPACE_BASE | A_SCD_TRACE_CFG);
+	csr_out32(M_SCD_TRACE_CFG_START, IO_SPACE_BASE | A_SCD_TRACE_CFG);
+#endif
+
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)