MIPS support
authorJens Axboe <jens.axboe@oracle.com>
Tue, 1 Sep 2009 05:23:57 +0000 (07:23 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 1 Sep 2009 05:23:57 +0000 (07:23 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch-mips.h [new file with mode: 0644]
arch/arch.h

diff --git a/arch/arch-mips.h b/arch/arch-mips.h
new file mode 100644 (file)
index 0000000..759d3a9
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef ARCH_MIPS64_H
+#define ARCH_MIPS64_H
+
+#define ARCH   (arch_mips)
+
+#ifndef __NR_ioprio_set
+#define __NR_ioprio_set                314
+#define __NR_ioprio_get                315
+#endif
+
+#ifndef __NR_fadvise64
+#define __NR_fadvise64         215
+#endif
+
+#ifndef __NR_sys_splice
+#define __NR_sys_splice                263
+#define __NR_sys_tee           265
+#define __NR_sys_vmsplice      266
+#endif
+
+#define read_barrier()         __asm__ __volatile__("": : :"memory")
+#define write_barrier()                __asm__ __volatile__("": : :"memory")
+#define nop                    __asm__ __volatile__("": : :"memory")
+
+#endif
index 28c6632638c7c61dd32d1edff73c865fe85b4737..87db222efa8c2c7f721739fcc581f7571314fb28 100644 (file)
@@ -31,6 +31,8 @@ enum {
 #include "arch-sparc64.h"
 #elif defined(__arm__)
 #include "arch-arm.h"
 #include "arch-sparc64.h"
 #elif defined(__arm__)
 #include "arch-arm.h"
+#elif defined(__mips__) || defined(__mips64__)
+#include "arch-mips.h"
 #else
 #error "Unsupported arch"
 #endif
 #else
 #error "Unsupported arch"
 #endif