patch-2.4.22 linux-2.4.22/arch/mips64/lib/dump_tlb.c
Next file: linux-2.4.22/arch/mips64/lib/ide-no.c
Previous file: linux-2.4.22/arch/mips64/lib/Makefile
Back to the patch index
Back to the overall index
- Lines: 103
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/mips64/lib/dump_tlb.c
- Orig date:
2002-08-02 17:39:43.000000000 -0700
diff -urN linux-2.4.21/arch/mips64/lib/dump_tlb.c linux-2.4.22/arch/mips64/lib/dump_tlb.c
@@ -36,22 +36,22 @@
unsigned long s_entryhi, entryhi, entrylo0, entrylo1, asid;
unsigned int s_index, pagemask, c0, c1, i;
- s_entryhi = get_entryhi();
- s_index = get_index();
+ s_entryhi = read_c0_entryhi();
+ s_index = read_c0_index();
asid = s_entryhi & 0xff;
for (i = first; i <= last; i++) {
- write_32bit_cp0_register(CP0_INDEX, i);
+ write_c0_index(i);
__asm__ __volatile__(
".set\tnoreorder\n\t"
"nop;nop;nop;nop\n\t"
"tlbr\n\t"
"nop;nop;nop;nop\n\t"
".set\treorder");
- pagemask = read_32bit_cp0_register(CP0_PAGEMASK);
- entryhi = get_entryhi();
- entrylo0 = get_entrylo0();
- entrylo1 = get_entrylo1();
+ pagemask = read_c0_pagemask();
+ entryhi = read_c0_entryhi();
+ entrylo0 = read_c0_entrylo0();
+ entrylo1 = read_c0_entrylo1();
/* Unused entries have a virtual address of CKSEG0. */
if ((entryhi & ~0x1ffffUL) != CKSEG0
@@ -81,22 +81,22 @@
}
printk("\n");
- set_entryhi(s_entryhi);
- set_index(s_index);
+ write_c0_entryhi(s_entryhi);
+ write_c0_index(s_index);
}
void dump_tlb_all(void)
{
- dump_tlb(0, mips_cpu.tlbsize - 1);
+ dump_tlb(0, current_cpu_data.tlbsize - 1);
}
void dump_tlb_wired(void)
{
int wired;
- wired = read_32bit_cp0_register(CP0_WIRED);
+ wired = read_c0_wired();
printk("Wired: %d", wired);
- dump_tlb(0, read_32bit_cp0_register(CP0_WIRED));
+ dump_tlb(0, read_c0_wired());
}
#define BARRIER \
@@ -107,19 +107,19 @@
void dump_tlb_addr(unsigned long addr)
{
- unsigned int flags, oldpid;
+ unsigned long flags, oldpid;
int index;
- __save_and_cli(flags);
- oldpid = get_entryhi() & 0xff;
+ local_irq_save(flags);
+ oldpid = read_c0_entryhi() & 0xff;
BARRIER;
- set_entryhi((addr & PAGE_MASK) | oldpid);
+ write_c0_entryhi((addr & PAGE_MASK) | oldpid);
BARRIER;
tlb_probe();
BARRIER;
- index = get_index();
- set_entryhi(oldpid);
- __restore_flags(flags);
+ index = read_c0_index();
+ write_c0_entryhi(oldpid);
+ local_irq_restore(flags);
if (index < 0) {
printk("No entry for address 0x%08lx in TLB\n", addr);
@@ -132,7 +132,7 @@
void dump_tlb_nonwired(void)
{
- dump_tlb(read_32bit_cp0_register(CP0_WIRED), mips_cpu.tlbsize - 1);
+ dump_tlb(read_c0_wired(), current_cpu_data.tlbsize - 1);
}
void dump_list_process(struct task_struct *t, void *address)
@@ -161,7 +161,7 @@
printk("pte == %08lx, ", (unsigned long) pte);
page = *pte;
- printk("page == %08lx\n", (unsigned long) pte_val(page));
+ printk("page == %08lx\n", pte_val(page));
val = pte_val(page);
if (val & _PAGE_PRESENT) printk("present ");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)