浏览代码

MIPS: Only write c0_framemask on CPUs which have this register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 16 年之前
父节点
当前提交
cde15b5927
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      arch/mips/mm/tlb-r4k.c

+ 4 - 1
arch/mips/mm/tlb-r4k.c

@@ -478,7 +478,10 @@ void __cpuinit tlb_init(void)
 	probe_tlb(config);
 	write_c0_pagemask(PM_DEFAULT_MASK);
 	write_c0_wired(0);
-	write_c0_framemask(0);
+	if (current_cpu_type() == CPU_R10000 ||
+	    current_cpu_type() == CPU_R12000 ||
+	    current_cpu_type() == CPU_R14000)
+		write_c0_framemask(0);
 	temp_tlb_entry = current_cpu_data.tlbsize - 1;
 
         /* From this point on the ARC firmware is dead.  */