]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/sys_sh.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / sys_sh.c
index 5083b6ed4b39a5b1fe07bb32a9a1e9bc42d47383..d545a686a201a9d010a616861e40f44cf1d4fdaf 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
 #include <linux/file.h>
 #include <linux/utsname.h>
 #include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/ipc.h>
 #include <asm/cacheflush.h>
 #include <asm/uaccess.h>
-#include <asm/ipc.h>
 #include <asm/unistd.h>
 
 /*
@@ -314,6 +314,12 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
 #endif
 }
 
+#if defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH2A)
+#define SYSCALL_ARG3   "trapa #0x23"
+#else
+#define SYSCALL_ARG3   "trapa #0x13"
+#endif
+
 /*
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
@@ -324,7 +330,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[])
        register long __sc4 __asm__ ("r4") = (long) filename;
        register long __sc5 __asm__ ("r5") = (long) argv;
        register long __sc6 __asm__ ("r6") = (long) envp;
-       __asm__ __volatile__ ("trapa    #0x13" : "=z" (__sc0)
+       __asm__ __volatile__ (SYSCALL_ARG3 : "=z" (__sc0)       
                        : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6)
                        : "memory");
        return __sc0;