diff -Nru linux/arch/mips/mm/r4xx0.c.orig linux/arch/mips/mm/r4xx0.c --- linux/arch/mips/mm/r4xx0.c.orig Mon Mar 19 21:17:02 2001 +++ linux/arch/mips/mm/r4xx0.c Fri Jun 1 19:17:37 2001 @@ -2121,10 +2121,6 @@ #undef DEBUG_TLB #undef DEBUG_TLBUPDATE -#define NTLB_ENTRIES 48 /* Fixed on all R4XX0 variants... */ - -#define NTLB_ENTRIES_HALF 24 /* Fixed on all R4XX0 variants... */ - void flush_tlb_all(void) { unsigned long flags; @@ -2146,7 +2142,7 @@ entry = get_wired(); /* Blast 'em all away. */ - while(entry < NTLB_ENTRIES) { + while(entry < mips_cpu.tlbsize) { set_index(entry); BARRIER; tlb_write_indexed(); @@ -2188,7 +2184,7 @@ __save_and_cli(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; - if(size <= NTLB_ENTRIES_HALF) { + if(size <= mips_cpu.tlbsize/2) { int oldpid = (get_entryhi() & 0xff); int newpid = (mm->context & 0xff);