Commit e04083df authored by David Mosberger's avatar David Mosberger

ia64: Andrew changed his mind about the location of force_successful_syscall_return(),

	so move it back to ptrace.h.
parent e7efa217
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <asm/shmparam.h> #include <asm/shmparam.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/unistd.h>
unsigned long unsigned long
arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len, arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len,
......
...@@ -235,6 +235,20 @@ struct switch_stack { ...@@ -235,6 +235,20 @@ struct switch_stack {
!user_mode(_regs) && user_stack(_task, _regs); \ !user_mode(_regs) && user_stack(_task, _regs); \
}) })
/*
* System call handlers that, upon successful completion, need to return a negative value
* should call force_successful_syscall_return() right before returning. On architectures
* where the syscall convention provides for a separate error flag (e.g., alpha, ia64,
* ppc{,64}, sparc{,64}, possibly others), this macro can be used to ensure that the error
* flag will not get set. On architectures which do not support a separate error flag,
* the macro is a no-op and the spurious error condition needs to be filtered out by some
* other means (e.g., in user-level, by passing an extra argument to the syscall handler,
* or something along those lines).
*
* On ia64, we can clear the user's pt_regs->r8 to force a successful syscall.
*/
# define force_successful_syscall_return() (ia64_task_regs(current)->r8 = 0)
struct task_struct; /* forward decl */ struct task_struct; /* forward decl */
struct unw_frame_info; /* forward decl */ struct unw_frame_info; /* forward decl */
......
...@@ -349,30 +349,15 @@ waitpid (int pid, int *wait_stat, int flags) ...@@ -349,30 +349,15 @@ waitpid (int pid, int *wait_stat, int flags)
#endif /* __KERNEL_SYSCALLS__ */ #endif /* __KERNEL_SYSCALLS__ */
#include <asm/ptrace.h>
/* /*
* "Conditional" syscalls * "Conditional" syscalls
* *
* What we want is __attribute__((weak,alias("sys_ni_syscall"))), * What we want is __attribute__((weak,alias("sys_ni_syscall"))), but it doesn't work on
* but it doesn't work on all toolchains, so we just do it by hand * all toolchains, so we just do it by hand. Note, this macro can only be used in the
* file which defines sys_ni_syscall, i.e., in kernel/sys.c.
*/ */
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
/*
* System call handlers that, upon successful completion, need to return a negative value
* should call force_successful_syscall_return() right before returning. On architectures
* where the syscall convention provides for a separate error flag (e.g., alpha, ia64,
* ppc{,64}, sparc{,64}, possibly others), this macro can be used to ensure that the error
* flag will not get set. On architectures which do not support a separate error flag,
* the macro is a no-op and the spurious error condition needs to be filtered out by some
* other means (e.g., in user-level, by passing an extra argument to the syscall handler,
* or something along those lines).
*
* On ia64, we can clear the user's pt_regs->r8 to force a successful syscall.
*/
#define force_successful_syscall_return() (ia64_task_regs(current)->r8 = 0)
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_IA64_UNISTD_H */ #endif /* _ASM_IA64_UNISTD_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment