sh4 support
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tue, 22 Dec 2009 08:03:25 +0000 (09:03 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 22 Dec 2009 08:03:25 +0000 (09:03 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch-sh.h [new file with mode: 0644]
arch/arch.h

diff --git a/arch/arch-sh.h b/arch/arch-sh.h
new file mode 100644 (file)
index 0000000..72183fa
--- /dev/null
@@ -0,0 +1,27 @@
+/* Renesas SH (32bit) only */
+
+#ifndef ARCH_SH_H
+#define ARCH_SH_H
+
+#define SH     (arch_sh)
+
+#ifndef __NR_ioprio_set
+#define __NR_ioprio_set        288
+#define __NR_ioprio_get        289
+#endif
+
+#ifndef __NR_fadvise64
+#define __NR_fadvise64 250
+#endif
+
+#ifndef __NR_sys_splice
+#define __NR_sys_splice                313
+#define __NR_sys_tee           315
+#define __NR_sys_vmsplice      316
+#endif
+
+#define nop             __asm__ __volatile__ ("nop": : :"memory")
+#define read_barrier()  __asm__ __volatile__ (" " : : : "memory")
+#define write_barrier() __asm__ __volatile__ (" " : : : "memory")
+
+#endif
index 0ad7b6ebdf8babc94affbf96e2f2f7a9b7114471..b4f26307c6eeee3bd34901091d1d668b59a5e587 100644 (file)
@@ -17,6 +17,7 @@ enum {
        arch_sparc,
        arch_sparc64,
        arch_arm,
+       arch_sh,
 
        arch_generic,
 };
@@ -41,6 +42,8 @@ enum {
 #include "arch-arm.h"
 #elif defined(__mips__) || defined(__mips64__)
 #include "arch-mips.h"
+#elif defined(__sh__)
+#include "arch-sh.h"
 #else
 #warning "Unknown architecture, attempting to use generic model."
 #include "arch-generic.h"