From: Ralf Baechle Date: Fri, 19 Jan 2007 14:35:14 +0000 (+0000) Subject: [MIPS] SMTC: Fix TLB sizing bug for TLB of 64 >= entries X-Git-Tag: v2.6.20-rc6~1^2~5 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=a0b6218037b5cf50737a7dc0fc5464ea3f8781cd;p=powerpc.git [MIPS] SMTC: Fix TLB sizing bug for TLB of 64 >= entries Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 44238ab2fc..c37e83b173 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c @@ -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);