summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-mips/isadep.h41
-rw-r--r--include/asm-mips/wbflush.h34
2 files changed, 75 insertions, 0 deletions
diff --git a/include/asm-mips/isadep.h b/include/asm-mips/isadep.h
new file mode 100644
index 000000000..c3753dab0
--- /dev/null
+++ b/include/asm-mips/isadep.h
@@ -0,0 +1,41 @@
+/*
+ * Various ISA level dependant constants.
+ * Most of the following constants reflect the different layout
+ * of Coprocessor 0 registers.
+ *
+ * Copyright (c) 1998 Harald Koerfgen
+ *
+ * $Id: $
+ */
+#include <asm/sgidefs.h>
+
+#ifndef __ASM_MIPS_ISADEP_H
+#define __ASM_MIPS_ISADEP_H
+
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1)
+/*
+ * R2000 or R3000
+ */
+
+/*
+ * kernel or user mode? (CP0_STATUS)
+ */
+#define KU_MASK 0x08
+#define KU_USER 0x08
+#define KU_KERN 0x00
+
+#else
+/*
+ * R6000 or higher
+ */
+
+/*
+ * kernel or user mode?
+ */
+#define KU_MASK 0x18
+#define KU_USER 0x10
+#define KU_KERN 0x00
+
+#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS1) */
+
+#endif /* __ASM_MIPS_ISADEP_H */
diff --git a/include/asm-mips/wbflush.h b/include/asm-mips/wbflush.h
new file mode 100644
index 000000000..81c581a2f
--- /dev/null
+++ b/include/asm-mips/wbflush.h
@@ -0,0 +1,34 @@
+/*
+ * Header file for using the wbflush routine
+ *
+ * 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) 1998 Harald Koerfgen
+ *
+ * $Id: $
+ */
+#ifndef __ASM_MIPS_WBFLUSH_H
+#define __ASM_MIPS_WBFLUSH_H
+
+#include <asm/sgidefs.h>
+
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1)
+/*
+ * R2000 or R3000
+ */
+extern void (*__wbflush) (void);
+
+#define wbflush() __wbflush()
+
+#else
+/*
+ * we don't need no stinkin' wbflush
+ */
+
+#define wbflush()
+
+#endif
+
+#endif /* __ASM_MIPS_WBFLUSH_H */