diff options
Diffstat (limited to 'arch/tile/include/asm')
-rw-r--r-- | arch/tile/include/asm/compat.h | 15 | ||||
-rw-r--r-- | arch/tile/include/asm/elf.h | 1 | ||||
-rw-r--r-- | arch/tile/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/tile/include/asm/switch_to.h | 5 | ||||
-rw-r--r-- | arch/tile/include/asm/syscalls.h | 20 | ||||
-rw-r--r-- | arch/tile/include/asm/unistd.h | 1 |
6 files changed, 27 insertions, 19 deletions
diff --git a/arch/tile/include/asm/compat.h b/arch/tile/include/asm/compat.h index 3063e6fc8daa..ca61fb4296b3 100644 --- a/arch/tile/include/asm/compat.h +++ b/arch/tile/include/asm/compat.h | |||
@@ -275,18 +275,14 @@ extern int compat_setup_rt_frame(int sig, struct k_sigaction *ka, | |||
275 | struct compat_sigaction; | 275 | struct compat_sigaction; |
276 | struct compat_siginfo; | 276 | struct compat_siginfo; |
277 | struct compat_sigaltstack; | 277 | struct compat_sigaltstack; |
278 | long compat_sys_execve(const char __user *path, | ||
279 | compat_uptr_t __user *argv, | ||
280 | compat_uptr_t __user *envp, struct pt_regs *); | ||
281 | long compat_sys_rt_sigaction(int sig, struct compat_sigaction __user *act, | 278 | long compat_sys_rt_sigaction(int sig, struct compat_sigaction __user *act, |
282 | struct compat_sigaction __user *oact, | 279 | struct compat_sigaction __user *oact, |
283 | size_t sigsetsize); | 280 | size_t sigsetsize); |
284 | long compat_sys_rt_sigqueueinfo(int pid, int sig, | 281 | long compat_sys_rt_sigqueueinfo(int pid, int sig, |
285 | struct compat_siginfo __user *uinfo); | 282 | struct compat_siginfo __user *uinfo); |
286 | long compat_sys_rt_sigreturn(struct pt_regs *); | 283 | long compat_sys_rt_sigreturn(void); |
287 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | 284 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, |
288 | struct compat_sigaltstack __user *uoss_ptr, | 285 | struct compat_sigaltstack __user *uoss_ptr); |
289 | struct pt_regs *); | ||
290 | long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high); | 286 | long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high); |
291 | long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high); | 287 | long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high); |
292 | long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, | 288 | long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, |
@@ -303,12 +299,7 @@ long compat_sys_fallocate(int fd, int mode, | |||
303 | long compat_sys_sched_rr_get_interval(compat_pid_t pid, | 299 | long compat_sys_sched_rr_get_interval(compat_pid_t pid, |
304 | struct compat_timespec __user *interval); | 300 | struct compat_timespec __user *interval); |
305 | 301 | ||
306 | /* These are the intvec_64.S trampolines. */ | 302 | /* Assembly trampoline to avoid clobbering r0. */ |
307 | long _compat_sys_execve(const char __user *path, | ||
308 | const compat_uptr_t __user *argv, | ||
309 | const compat_uptr_t __user *envp); | ||
310 | long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | ||
311 | struct compat_sigaltstack __user *uoss_ptr); | ||
312 | long _compat_sys_rt_sigreturn(void); | 303 | long _compat_sys_rt_sigreturn(void); |
313 | 304 | ||
314 | #endif /* _ASM_TILE_COMPAT_H */ | 305 | #endif /* _ASM_TILE_COMPAT_H */ |
diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h index f8ccf08f6934..b73e1039c911 100644 --- a/arch/tile/include/asm/elf.h +++ b/arch/tile/include/asm/elf.h | |||
@@ -148,6 +148,7 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, | |||
148 | #define compat_start_thread(regs, ip, usp) do { \ | 148 | #define compat_start_thread(regs, ip, usp) do { \ |
149 | regs->pc = ptr_to_compat_reg((void *)(ip)); \ | 149 | regs->pc = ptr_to_compat_reg((void *)(ip)); \ |
150 | regs->sp = ptr_to_compat_reg((void *)(usp)); \ | 150 | regs->sp = ptr_to_compat_reg((void *)(usp)); \ |
151 | single_step_execve(); \ | ||
151 | } while (0) | 152 | } while (0) |
152 | 153 | ||
153 | /* | 154 | /* |
diff --git a/arch/tile/include/asm/processor.h b/arch/tile/include/asm/processor.h index 8c4dd9ff91eb..879073e76586 100644 --- a/arch/tile/include/asm/processor.h +++ b/arch/tile/include/asm/processor.h | |||
@@ -211,6 +211,7 @@ static inline void start_thread(struct pt_regs *regs, | |||
211 | { | 211 | { |
212 | regs->pc = pc; | 212 | regs->pc = pc; |
213 | regs->sp = usp; | 213 | regs->sp = usp; |
214 | single_step_execve(); | ||
214 | } | 215 | } |
215 | 216 | ||
216 | /* Free all resources held by a thread. */ | 217 | /* Free all resources held by a thread. */ |
@@ -239,6 +240,9 @@ unsigned long get_wchan(struct task_struct *p); | |||
239 | #define KSTK_TOP(task) (task_ksp0(task) - STACK_TOP_DELTA) | 240 | #define KSTK_TOP(task) (task_ksp0(task) - STACK_TOP_DELTA) |
240 | #define task_pt_regs(task) \ | 241 | #define task_pt_regs(task) \ |
241 | ((struct pt_regs *)(task_ksp0(task) - KSTK_PTREGS_GAP) - 1) | 242 | ((struct pt_regs *)(task_ksp0(task) - KSTK_PTREGS_GAP) - 1) |
243 | #define current_pt_regs() \ | ||
244 | ((struct pt_regs *)((stack_pointer | (THREAD_SIZE - 1)) - \ | ||
245 | (KSTK_PTREGS_GAP - 1)) - 1) | ||
242 | #define task_sp(task) (task_pt_regs(task)->sp) | 246 | #define task_sp(task) (task_pt_regs(task)->sp) |
243 | #define task_pc(task) (task_pt_regs(task)->pc) | 247 | #define task_pc(task) (task_pt_regs(task)->pc) |
244 | /* Aliases for pc and sp (used in fs/proc/array.c) */ | 248 | /* Aliases for pc and sp (used in fs/proc/array.c) */ |
diff --git a/arch/tile/include/asm/switch_to.h b/arch/tile/include/asm/switch_to.h index 1d48c5fee8b7..b8f888cbe6b0 100644 --- a/arch/tile/include/asm/switch_to.h +++ b/arch/tile/include/asm/switch_to.h | |||
@@ -68,7 +68,10 @@ extern unsigned long get_switch_to_pc(void); | |||
68 | /* Support function for forking a new task. */ | 68 | /* Support function for forking a new task. */ |
69 | void ret_from_fork(void); | 69 | void ret_from_fork(void); |
70 | 70 | ||
71 | /* Called from ret_from_fork() when a new process starts up. */ | 71 | /* Support function for forking a new kernel thread. */ |
72 | void ret_from_kernel_thread(void *fn, void *arg); | ||
73 | |||
74 | /* Called from ret_from_xxx() when a new process starts up. */ | ||
72 | struct task_struct *sim_notify_fork(struct task_struct *prev); | 75 | struct task_struct *sim_notify_fork(struct task_struct *prev); |
73 | 76 | ||
74 | #endif /* !__ASSEMBLY__ */ | 77 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/tile/include/asm/syscalls.h b/arch/tile/include/asm/syscalls.h index 06f0464cfed9..369696d63e7b 100644 --- a/arch/tile/include/asm/syscalls.h +++ b/arch/tile/include/asm/syscalls.h | |||
@@ -51,8 +51,7 @@ long sys_cacheflush(unsigned long addr, unsigned long len, | |||
51 | 51 | ||
52 | #ifndef __tilegx__ | 52 | #ifndef __tilegx__ |
53 | /* mm/fault.c */ | 53 | /* mm/fault.c */ |
54 | long sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *); | 54 | long sys_cmpxchg_badaddr(unsigned long address); |
55 | long _sys_cmpxchg_badaddr(unsigned long address); | ||
56 | #endif | 55 | #endif |
57 | 56 | ||
58 | #ifdef CONFIG_COMPAT | 57 | #ifdef CONFIG_COMPAT |
@@ -63,14 +62,23 @@ long sys_truncate64(const char __user *path, loff_t length); | |||
63 | long sys_ftruncate64(unsigned int fd, loff_t length); | 62 | long sys_ftruncate64(unsigned int fd, loff_t length); |
64 | #endif | 63 | #endif |
65 | 64 | ||
65 | /* Provide versions of standard syscalls that use current_pt_regs(). */ | ||
66 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
67 | void __user *parent_tid, void __user *child_tid); | ||
68 | long sys_execve(const char __user *filename, | ||
69 | const char __user *const __user *argv, | ||
70 | const char __user *const __user *envp); | ||
71 | long sys_rt_sigreturn(void); | ||
72 | long sys_sigaltstack(const stack_t __user *, stack_t __user *); | ||
73 | #define sys_clone sys_clone | ||
74 | #define sys_execve sys_execve | ||
75 | #define sys_rt_sigreturn sys_rt_sigreturn | ||
76 | #define sys_sigaltstack sys_sigaltstack | ||
77 | |||
66 | /* These are the intvec*.S trampolines. */ | 78 | /* These are the intvec*.S trampolines. */ |
67 | long _sys_sigaltstack(const stack_t __user *, stack_t __user *); | ||
68 | long _sys_rt_sigreturn(void); | 79 | long _sys_rt_sigreturn(void); |
69 | long _sys_clone(unsigned long clone_flags, unsigned long newsp, | 80 | long _sys_clone(unsigned long clone_flags, unsigned long newsp, |
70 | void __user *parent_tid, void __user *child_tid); | 81 | void __user *parent_tid, void __user *child_tid); |
71 | long _sys_execve(const char __user *filename, | ||
72 | const char __user *const __user *argv, | ||
73 | const char __user *const __user *envp); | ||
74 | 82 | ||
75 | #include <asm-generic/syscalls.h> | 83 | #include <asm-generic/syscalls.h> |
76 | 84 | ||
diff --git a/arch/tile/include/asm/unistd.h b/arch/tile/include/asm/unistd.h index 6e032a0a268e..dab827dc8acb 100644 --- a/arch/tile/include/asm/unistd.h +++ b/arch/tile/include/asm/unistd.h | |||
@@ -16,4 +16,5 @@ | |||
16 | #define __ARCH_WANT_SYS_LLSEEK | 16 | #define __ARCH_WANT_SYS_LLSEEK |
17 | #endif | 17 | #endif |
18 | #define __ARCH_WANT_SYS_NEWFSTATAT | 18 | #define __ARCH_WANT_SYS_NEWFSTATAT |
19 | #define __ARCH_WANT_SYS_EXECVE | ||
19 | #include <uapi/asm/unistd.h> | 20 | #include <uapi/asm/unistd.h> |