From c28b912f77c3dafbdcdcf4def2c8c1f9c127100c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 1 Sep 2009 07:23:57 +0200 Subject: [PATCH] MIPS support Signed-off-by: Jens Axboe --- arch/arch-mips.h | 25 +++++++++++++++++++++++++ arch/arch.h | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 arch/arch-mips.h diff --git a/arch/arch-mips.h b/arch/arch-mips.h new file mode 100644 index 00000000..759d3a9f --- /dev/null +++ b/arch/arch-mips.h @@ -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 diff --git a/arch/arch.h b/arch/arch.h index 28c66326..87db222e 100644 --- a/arch/arch.h +++ b/arch/arch.h @@ -31,6 +31,8 @@ enum { #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 -- 2.25.1