浏览代码

MIPS: Use current_cpu_type() in m4kc_tlbp_war()

Use current_cpu_type() to check for 4Kc processors instead of checking
the PRID directly. This will allow for the 4Kc case to be optimised out
of kernels that can't run on 4KC processors, thanks to __get_cpu_type()
and its unreachable() call.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16205/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Paul Burton 8 年之前
父节点
当前提交
5f930860e7
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      arch/mips/mm/tlbex.c

+ 1 - 2
arch/mips/mm/tlbex.c

@@ -153,8 +153,7 @@ static int scratchpad_offset(int i)
  */
  */
 static int m4kc_tlbp_war(void)
 static int m4kc_tlbp_war(void)
 {
 {
-	return (current_cpu_data.processor_id & 0xffff00) ==
-	       (PRID_COMP_MIPS | PRID_IMP_4KC);
+	return current_cpu_type() == CPU_4KC;
 }
 }
 
 
 /* Handle labels (which must be positive integers). */
 /* Handle labels (which must be positive integers). */