[MIPS] SMTC: Fix TLB sizing bug for TLB of 64 >= entries
authorRalf Baechle <ralf@linux-mips.org>
Fri, 19 Jan 2007 14:35:14 +0000 (14:35 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 24 Jan 2007 19:23:21 +0000 (19:23 +0000)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/smtc.c

index 44238ab2fc99ff803836e263f42e7a2860fd3996..c37e83b173e9d077eb6f79653aa56455d8886c4f 100644 (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);