patch-2.4.19 linux-2.4.19/arch/mips/lib/r3k_dump_tlb.c
Next file: linux-2.4.19/arch/mips/lib/strlen_user.S
Previous file: linux-2.4.19/arch/mips/lib/memcpy.S
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/mips/lib/r3k_dump_tlb.c
- Orig date:
Sun Jul 9 22:18:15 2000
diff -urN linux-2.4.18/arch/mips/lib/r3k_dump_tlb.c linux-2.4.19/arch/mips/lib/r3k_dump_tlb.c
@@ -12,11 +12,12 @@
#include <asm/bootinfo.h>
#include <asm/cachectl.h>
+#include <asm/cpu.h>
#include <asm/mipsregs.h>
#include <asm/page.h>
#include <asm/pgtable.h>
-#define mips_tlb_entries 64
+extern int r3k_have_wired_reg; /* defined in tlb-r3k.c */
void
dump_tlb(int first, int last)
@@ -65,16 +66,16 @@
void
dump_tlb_all(void)
{
- dump_tlb(0, mips_tlb_entries - 1);
+ dump_tlb(0, mips_cpu.tlbsize - 1);
}
void
dump_tlb_wired(void)
{
- int wired = 7;
+ int wired = r3k_have_wired_reg ? get_wired() : 8;
printk("Wired: %d", wired);
- dump_tlb(0, read_32bit_cp0_register(CP0_WIRED));
+ dump_tlb(0, wired - 1);
}
void
@@ -103,7 +104,8 @@
void
dump_tlb_nonwired(void)
{
- dump_tlb(8, mips_tlb_entries - 1);
+ int wired = r3k_have_wired_reg ? get_wired() : 8;
+ dump_tlb(wired, mips_cpu.tlbsize - 1);
}
void
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)