K 10 svn:author V 8 jchandra K 8 svn:date V 27 2013-04-12T17:22:12.392537Z K 7 svn:log V 661 Move MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c Having MIPS_MAX_TLB_ENTRIES defined to 128 is misleading, since it used to be 64 in older releases of MIPS architecture (where it could be read from Config1) and can be much more than 128 for the newer processors. For now, move the definition to the only file using it (mips/mips/tlb.c) and define MIPS_MAX_TLB_ENTRIES depending on the MIPS cpu defined. Also add few checks so that we do not write beyond the end of the tlb_state array. This fixes a kernel data corruption seen in Netlogic XLP, which was casued by tlb_save() writing beyond the end of tlb_state array when breaking into debugger. END