Browse Source

[MIPS] R2: Instruction hazard barrier.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 19 năm trước cách đây
mục cha
commit
bce1a28686
1 tập tin đã thay đổi với 15 bổ sung0 xóa
  1. 15 0
      arch/mips/kernel/entry.S

+ 15 - 0
arch/mips/kernel/entry.S

@@ -119,3 +119,18 @@ syscall_exit_work:
 	li	a1, 1
 	li	a1, 1
 	jal	do_syscall_trace
 	jal	do_syscall_trace
 	b	resume_userspace
 	b	resume_userspace
+
+#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_MIPS_MT)
+
+/*
+ * MIPS32R2 Instruction Hazard Barrier - must be called
+ *
+ * For C code use the inline version named instruction_hazard().
+ */
+LEAF(mips_ihb)
+	.set	mips32r2
+	jr.hb	ra
+	nop
+	END(mips_ihb)
+
+#endif /* CONFIG_CPU_MIPSR2 or CONFIG_MIPS_MT */