patch-2.4.25 linux-2.4.25/include/asm-mips64/hazards.h
Next file: linux-2.4.25/include/asm-mips64/io.h
Previous file: linux-2.4.25/include/asm-mips64/gdb-stub.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
2004-02-18 05:36:32.000000000 -0800
- Orig file:
linux-2.4.24/include/asm-mips64/hazards.h
- Orig date:
1969-12-31 16:00:00.000000000 -0800
diff -urN linux-2.4.24/include/asm-mips64/hazards.h linux-2.4.25/include/asm-mips64/hazards.h
@@ -0,0 +1,48 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 Ralf Baechle
+ */
+#ifndef _ASM_HAZARDS_H
+#define _ASM_HAZARDS_H
+
+#include <linux/config.h>
+
+#ifdef __ASSEMBLY__
+
+/*
+ * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
+ * use of the JTLB for instructions should not occur for 4 cpu cycles and use
+ * for data translations should not occur for 3 cpu cycles.
+ */
+#ifdef CONFIG_CPU_RM9000
+#define rm9000_tlb_hazard \
+ .set mips32; \
+ ssnop; ssnop; ssnop; ssnop; \
+ .set mips0
+#else
+#define rm9000_tlb_hazard
+#endif
+
+#else
+
+/*
+ * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
+ * use of the JTLB for instructions should not occur for 4 cpu cycles and use
+ * for data translations should not occur for 3 cpu cycles.
+ */
+#ifdef CONFIG_CPU_RM9000
+#define rm9000_tlb_hazard() \
+ __asm__ __volatile__( \
+ ".set\tmips32\n\t" \
+ "ssnop; ssnop; ssnop; ssnop\n\t" \
+ ".set\tmips0")
+#else
+#define rm9000_tlb_hazard() do { } while (0)
+#endif
+
+#endif
+
+#endif /* _ASM_HAZARDS_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)