aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/include/asm')
-rw-r--r--arch/tile/include/asm/compat.h15
-rw-r--r--arch/tile/include/asm/elf.h1
-rw-r--r--arch/tile/include/asm/processor.h4
-rw-r--r--arch/tile/include/asm/switch_to.h5
-rw-r--r--arch/tile/include/asm/syscalls.h20
-rw-r--r--arch/tile/include/asm/unistd.h1
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,
275struct compat_sigaction; 275struct compat_sigaction;
276struct compat_siginfo; 276struct compat_siginfo;
277struct compat_sigaltstack; 277struct compat_sigaltstack;
278long compat_sys_execve(const char __user *path,
279 compat_uptr_t __user *argv,
280 compat_uptr_t __user *envp, struct pt_regs *);
281long compat_sys_rt_sigaction(int sig, struct compat_sigaction __user *act, 278long 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);
284long compat_sys_rt_sigqueueinfo(int pid, int sig, 281long compat_sys_rt_sigqueueinfo(int pid, int sig,
285 struct compat_siginfo __user *uinfo); 282 struct compat_siginfo __user *uinfo);
286long compat_sys_rt_sigreturn(struct pt_regs *); 283long compat_sys_rt_sigreturn(void);
287long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, 284long 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 *);
290long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high); 286long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high);
291long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high); 287long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high);
292long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, 288long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count,
@@ -303,12 +299,7 @@ long compat_sys_fallocate(int fd, int mode,
303long compat_sys_sched_rr_get_interval(compat_pid_t pid, 299long 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. */
307long _compat_sys_execve(const char __user *path,
308 const compat_uptr_t __user *argv,
309 const compat_uptr_t __user *envp);
310long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr,
311 struct compat_sigaltstack __user *uoss_ptr);
312long _compat_sys_rt_sigreturn(void); 303long _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. */
69void ret_from_fork(void); 69void 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. */
72void ret_from_kernel_thread(void *fn, void *arg);
73
74/* Called from ret_from_xxx() when a new process starts up. */
72struct task_struct *sim_notify_fork(struct task_struct *prev); 75struct 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 */
54long sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *); 54long sys_cmpxchg_badaddr(unsigned long address);
55long _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);
63long sys_ftruncate64(unsigned int fd, loff_t length); 62long 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(). */
66long sys_clone(unsigned long clone_flags, unsigned long newsp,
67 void __user *parent_tid, void __user *child_tid);
68long sys_execve(const char __user *filename,
69 const char __user *const __user *argv,
70 const char __user *const __user *envp);
71long sys_rt_sigreturn(void);
72long 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. */
67long _sys_sigaltstack(const stack_t __user *, stack_t __user *);
68long _sys_rt_sigreturn(void); 79long _sys_rt_sigreturn(void);
69long _sys_clone(unsigned long clone_flags, unsigned long newsp, 80long _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);
71long _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>