7 #include <linux/kernel.h>
12 #include <asm/pgtable.h>
15 static inline const char *msk2str(
unsigned int mask)
18 case PM_4K:
return "4kb";
19 case PM_16K:
return "16kb";
20 case PM_64K:
return "64kb";
22 #ifdef CONFIG_CPU_CAVIUM_OCTEON
23 case PM_8K:
return "8kb";
24 case PM_32K:
return "32kb";
27 case PM_2M:
return "2Mb";
28 case PM_8M:
return "8Mb";
29 case PM_32M:
return "32Mb";
31 #ifndef CONFIG_CPU_VR41XX
32 case PM_1M:
return "1Mb";
33 case PM_4M:
return "4Mb";
34 case PM_16M:
return "16Mb";
35 case PM_64M:
return "64Mb";
37 case PM_1G:
return "1Gb";
44 __asm__ __volatile__( \
45 ".set\tnoreorder\n\t" \
46 "nop;nop;nop;nop;nop;nop;nop\n\t" \
49 static void dump_tlb(
int first,
int last)
51 unsigned long s_entryhi, entryhi,
asid;
52 unsigned long long entrylo0, entrylo1;
53 unsigned int s_index, s_pagemask, pagemask, c0, c1,
i;
58 asid = s_entryhi & 0xff;
60 for (i = first; i <= last; i++) {
71 if ((entryhi & ~0x1ffffUL) !=
CKSEG0
72 && (entryhi & 0xff) == asid) {
81 printk(
"Index: %2d pgmask=%s ", i, msk2str(pagemask));
83 c0 = (entrylo0 >> 3) & 7;
84 c1 = (entrylo1 >> 3) & 7;
86 printk(
"va=%0*lx asid=%02lx\n",
87 width, (entryhi & ~0x1fffUL),
89 printk(
"\t[pa=%0*llx c=%d d=%d v=%d g=%d] ",
92 (entrylo0 & 4) ? 1 : 0,
93 (entrylo0 & 2) ? 1 : 0,
94 (entrylo0 & 1) ? 1 : 0);
95 printk(
"[pa=%0*llx c=%d d=%d v=%d g=%d]\n",
98 (entrylo1 & 4) ? 1 : 0,
99 (entrylo1 & 2) ? 1 : 0,
100 (entrylo1 & 1) ? 1 : 0);