Root/
Source at commit 0de2b2b3be81048189a32f7a3d3ba0ba9ec817b6 created 11 years 11 months ago. By Maarten ter Huurne, MIPS: JZ4740: Fixed value for round robin constant. | |
---|---|
1 | /* |
2 | * arch/sh/kernel/sys_sh64.c |
3 | * |
4 | * Copyright (C) 2000, 2001 Paolo Alberelli |
5 | * |
6 | * This file contains various random system calls that |
7 | * have a non-standard calling sequence on the Linux/SH5 |
8 | * platform. |
9 | * |
10 | * This file is subject to the terms and conditions of the GNU General Public |
11 | * License. See the file "COPYING" in the main directory of this archive |
12 | * for more details. |
13 | */ |
14 | #include <linux/errno.h> |
15 | #include <linux/rwsem.h> |
16 | #include <linux/sched.h> |
17 | #include <linux/mm.h> |
18 | #include <linux/fs.h> |
19 | #include <linux/smp.h> |
20 | #include <linux/sem.h> |
21 | #include <linux/msg.h> |
22 | #include <linux/shm.h> |
23 | #include <linux/stat.h> |
24 | #include <linux/mman.h> |
25 | #include <linux/file.h> |
26 | #include <linux/syscalls.h> |
27 | #include <linux/ipc.h> |
28 | #include <asm/uaccess.h> |
29 | #include <asm/ptrace.h> |
30 | #include <asm/unistd.h> |
31 | |
32 | /* |
33 | * Do a system call from kernel instead of calling sys_execve so we |
34 | * end up with proper pt_regs. |
35 | */ |
36 | int kernel_execve(const char *filename, |
37 | const char *const argv[], |
38 | const char *const envp[]) |
39 | { |
40 | register unsigned long __sc0 __asm__ ("r9") = ((0x13 << 16) | __NR_execve); |
41 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) filename; |
42 | register unsigned long __sc3 __asm__ ("r3") = (unsigned long) argv; |
43 | register unsigned long __sc4 __asm__ ("r4") = (unsigned long) envp; |
44 | __asm__ __volatile__ ("trapa %1 !\t\t\t execve(%2,%3,%4)" |
45 | : "=r" (__sc0) |
46 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) ); |
47 | __asm__ __volatile__ ("!dummy %0 %1 %2 %3" |
48 | : : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) : "memory"); |
49 | return __sc0; |
50 | } |
51 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9