From 557e1995a92d318206910d8b5c62075fe02b37e0 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 10 Oct 2012 13:17:31 -0400 Subject: h8300: generic kernel_thread() Signed-off-by: Al Viro --- arch/h8300/include/asm/processor.h | 2 -- arch/h8300/include/asm/ptrace.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/h8300/include/asm') diff --git a/arch/h8300/include/asm/processor.h b/arch/h8300/include/asm/processor.h index 4c9f6f8..4b0ca49 100644 --- a/arch/h8300/include/asm/processor.h +++ b/arch/h8300/include/asm/processor.h @@ -107,8 +107,6 @@ static inline void release_thread(struct task_struct *dead_task) { } -extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); - /* * Free current thread data structures etc.. */ diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h index d09c440..00502a6 100644 --- a/arch/h8300/include/asm/ptrace.h +++ b/arch/h8300/include/asm/ptrace.h @@ -60,6 +60,8 @@ struct pt_regs { #define user_mode(regs) (!((regs)->ccr & PS_S)) #define instruction_pointer(regs) ((regs)->pc) #define profile_pc(regs) instruction_pointer(regs) +#define current_pt_regs() ((struct pt_regs *) \ + (THREAD_SIZE + (unsigned long)current_thread_info()) - 1) #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif /* _H8300_PTRACE_H */ -- cgit v1.1 From 71915d21e59c153c1202e3198916817c2d18da32 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 10 Oct 2012 13:31:13 -0400 Subject: h8300: generic sys_execve() Signed-off-by: Al Viro --- arch/h8300/include/asm/unistd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/h8300/include/asm') diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h index 5cd8828..07afcfa 100644 --- a/arch/h8300/include/asm/unistd.h +++ b/arch/h8300/include/asm/unistd.h @@ -356,6 +356,7 @@ #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND +#define __ARCH_WANT_SYS_EXECVE /* * "Conditional" syscalls -- cgit v1.1 From 3416e8098aa4c0eea1b2e5c4efc68cf61a848864 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 27 Oct 2012 00:07:24 -0400 Subject: h8300: switch to generic fork/vfork/clone Signed-off-by: Al Viro --- arch/h8300/include/asm/unistd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/h8300/include/asm') diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h index 07afcfa..c2c2f5c7 100644 --- a/arch/h8300/include/asm/unistd.h +++ b/arch/h8300/include/asm/unistd.h @@ -357,6 +357,9 @@ #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_EXECVE +#define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_SYS_VFORK +#define __ARCH_WANT_SYS_CLONE /* * "Conditional" syscalls -- cgit v1.1 From 4f4202fe5ae9a43e59303f20d700571f695d7b1b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 5 Nov 2012 12:59:15 -0500 Subject: unify default ptrace_signal_deliver Signed-off-by: Al Viro --- arch/h8300/include/asm/signal.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/h8300/include/asm') diff --git a/arch/h8300/include/asm/signal.h b/arch/h8300/include/asm/signal.h index fd8b66e..c43c0a7 100644 --- a/arch/h8300/include/asm/signal.h +++ b/arch/h8300/include/asm/signal.h @@ -154,8 +154,6 @@ typedef struct sigaltstack { #include #undef __HAVE_ARCH_SIG_BITOPS -#define ptrace_signal_deliver(regs, cookie) do { } while (0) - #endif /* __KERNEL__ */ #endif /* _H8300_SIGNAL_H */ -- cgit v1.1 From 22062a96300dabfef93368a28c34bdf35c9b8308 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 5 Nov 2012 13:00:27 -0500 Subject: new helper: signal_pt_regs() Always equal to task_pt_regs(current); defined only when we are in signal delivery. It may be different from current_pt_regs() - e.g. architectures like m68k may have pt_regs location on exception different from that on a syscall and signals (just as ptrace handling) may happen on exceptions as well as on syscalls. When they are equal, it's often better to have signal_pt_regs defined (in asm/ptrace.h) as current_pt_regs - that tends to be optimized better than default would be. However, optimisation is the only reason why we might want an arch-specific definition; if current_pt_regs() and task_pt_regs(current) have different values, the latter one is right. Signed-off-by: Al Viro --- arch/h8300/include/asm/ptrace.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/h8300/include/asm') diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h index 00502a6..7468589 100644 --- a/arch/h8300/include/asm/ptrace.h +++ b/arch/h8300/include/asm/ptrace.h @@ -62,6 +62,7 @@ struct pt_regs { #define profile_pc(regs) instruction_pointer(regs) #define current_pt_regs() ((struct pt_regs *) \ (THREAD_SIZE + (unsigned long)current_thread_info()) - 1) +#define signal_pt_regs() ((struct pt_regs *)current->thread.esp0) #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif /* _H8300_PTRACE_H */ -- cgit v1.1