MIPS: dump_tlb: Take global bit into account
[linux-2.6-block.git] / arch / mips / lib / r3k_dump_tlb.c
index e210f04b2bc30e8891ed433cc22d83c34f56c8c6..1335e4394e33558392d32f1f579a1c7e1f0b3f8c 100644 (file)
@@ -35,8 +35,9 @@ static void dump_tlb(int first, int last)
                entrylo0 = read_c0_entrylo0();
 
                /* Unused entries have a virtual address of KSEG0.  */
-               if ((entryhi & PAGE_MASK) != KSEG0
-                   && (entryhi & ASID_MASK) == asid) {
+               if ((entryhi & PAGE_MASK) != KSEG0 &&
+                   (entrylo0 & R3K_ENTRYLO_G ||
+                    (entryhi & ASID_MASK) == asid)) {
                        /*
                         * Only print entries in use
                         */