cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/lib/r3k_dump_tlb.c

Directory: arch/mips/lib
// 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

PersonTokensPropCommitsCommitProp
James Hogan43100.00%1100.00%
Total43100.00%1100.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(&current_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

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)14077.78%325.00%
Paul Burton137.22%18.33%
James Hogan116.11%325.00%
Ralf Bächle73.89%18.33%
David Daney42.22%18.33%
Isamu Mogi31.67%18.33%
Andrew Morton10.56%18.33%
Atsushi Nemoto10.56%18.33%
Total180100.00%12100.00%


void dump_tlb_all(void) { dump_tlb(0, current_cpu_data.tlbsize - 1); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1477.78%133.33%
Ralf Bächle316.67%133.33%
Andrew Morton15.56%133.33%
Total18100.00%3100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)17063.43%320.00%
James Hogan5821.64%426.67%
Paul Burton134.85%16.67%
Ralf Bächle103.73%16.67%
Isamu Mogi62.24%16.67%
Atsushi Nemoto41.49%213.33%
David Daney41.49%16.67%
Andrew Morton20.75%16.67%
Greg Kroah-Hartman10.37%16.67%
Total268100.00%15100.00%
Directory: arch/mips/lib
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.