Release 4.14 arch/mips/lib/r3k_dump_tlb.c
// SPDX-License-Identifier: GPL-2.0
/*
* Dump R3000 TLB for debugging purposes.
*
* Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
* Copyright (C) 1999 by Silicon Graphics, Inc.
* Copyright (C) 1999 by Harald Koerfgen
*/
#include <linux/kernel.h>
#include <linux/mm.h>
#include <asm/mipsregs.h>
#include <asm/mmu_context.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/tlbdebug.h>
extern int r3k_have_wired_reg;
void dump_tlb_regs(void)
{
pr_info("Index : %0x\n", read_c0_index());
pr_info("EntryHi : %0lx\n", read_c0_entryhi());
pr_info("EntryLo : %0lx\n", read_c0_entrylo0());
if (r3k_have_wired_reg)
pr_info("Wired : %0x\n", read_c0_wired());
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
James Hogan | 43 | 100.00% | 1 | 100.00% |
Total | 43 | 100.00% | 1 | 100.00% |
static void dump_tlb(int first, int last)
{
int i;
unsigned int asid;
unsigned long entryhi, entrylo0, asid_mask;
asid_mask = cpu_asid_mask(¤t_cpu_data);
asid = read_c0_entryhi() & asid_mask;
for (i = first; i <= last; i++) {
write_c0_index(i<<8);
__asm__ __volatile__(
".set\tnoreorder\n\t"
"tlbr\n\t"
"nop\n\t"
".set\treorder");
entryhi = read_c0_entryhi();
entrylo0 = read_c0_entrylo0();
/* Unused entries have a virtual address of KSEG0. */
if ((entryhi & PAGE_MASK) != KSEG0 &&
(entrylo0 & R3K_ENTRYLO_G ||
(entryhi & asid_mask) == asid)) {
/*
* Only print entries in use
*/
printk("Index: %2d ", i);
pr_cont("va=%08lx asid=%08lx"
" [pa=%06lx n=%d d=%d v=%d g=%d]",
entryhi & PAGE_MASK,
entryhi & asid_mask,
entrylo0 & PAGE_MASK,
(entrylo0 & R3K_ENTRYLO_N) ? 1 : 0,
(entrylo0 & R3K_ENTRYLO_D) ? 1 : 0,
(entrylo0 & R3K_ENTRYLO_V) ? 1 : 0,
(entrylo0 & R3K_ENTRYLO_G) ? 1 : 0);
}
}
printk("\n");
write_c0_entryhi(asid);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 140 | 77.78% | 3 | 25.00% |
Paul Burton | 13 | 7.22% | 1 | 8.33% |
James Hogan | 11 | 6.11% | 3 | 25.00% |
Ralf Bächle | 7 | 3.89% | 1 | 8.33% |
David Daney | 4 | 2.22% | 1 | 8.33% |
Isamu Mogi | 3 | 1.67% | 1 | 8.33% |
Andrew Morton | 1 | 0.56% | 1 | 8.33% |
Atsushi Nemoto | 1 | 0.56% | 1 | 8.33% |
Total | 180 | 100.00% | 12 | 100.00% |
void dump_tlb_all(void)
{
dump_tlb(0, current_cpu_data.tlbsize - 1);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 14 | 77.78% | 1 | 33.33% |
Ralf Bächle | 3 | 16.67% | 1 | 33.33% |
Andrew Morton | 1 | 5.56% | 1 | 33.33% |
Total | 18 | 100.00% | 3 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 170 | 63.43% | 3 | 20.00% |
James Hogan | 58 | 21.64% | 4 | 26.67% |
Paul Burton | 13 | 4.85% | 1 | 6.67% |
Ralf Bächle | 10 | 3.73% | 1 | 6.67% |
Isamu Mogi | 6 | 2.24% | 1 | 6.67% |
Atsushi Nemoto | 4 | 1.49% | 2 | 13.33% |
David Daney | 4 | 1.49% | 1 | 6.67% |
Andrew Morton | 2 | 0.75% | 1 | 6.67% |
Greg Kroah-Hartman | 1 | 0.37% | 1 | 6.67% |
Total | 268 | 100.00% | 15 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.