1
0
Fork 0

[MIPS] SMTC: Fix TLB sizing bug for TLB of 64 >= entries

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
hifive-unleashed-5.1
Ralf Baechle 2007-01-19 14:35:14 +00:00
parent 89c07fd14f
commit a0b6218037
1 changed files with 5 additions and 2 deletions

View File

@ -270,9 +270,12 @@ void smtc_configure_tlb(void)
* of their initialization in smtc_cpu_setup().
*/
tlbsiz = tlbsiz & 0x3f; /* MIPS32 limits TLB indices to 64 */
cpu_data[0].tlbsize = tlbsiz;
/* MIPS32 limits TLB indices to 64 */
if (tlbsiz > 64)
tlbsiz = 64;
cpu_data[0].tlbsize = current_cpu_data.tlbsize = tlbsiz;
smtc_status |= SMTC_TLB_SHARED;
local_flush_tlb_all();
printk("TLB of %d entry pairs shared by %d VPEs\n",
tlbsiz, vpes);