Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / blackfin / include / asm / ptrace.h
blobc00491594b46d8b4adf2e75621090187bf778b5b
1 /*
2 * Copyright 2004-2008 Analog Devices Inc.
4 * Licensed under the GPL-2 or later.
5 */
6 #ifndef _BFIN_PTRACE_H
7 #define _BFIN_PTRACE_H
9 #include <uapi/asm/ptrace.h>
11 #ifndef __ASSEMBLY__
13 /* user_mode returns true if only one bit is set in IPEND, other than the
14 master interrupt enable. */
15 #define user_mode(regs) (!(((regs)->ipend & ~0x10) & (((regs)->ipend & ~0x10) - 1)))
17 #define arch_has_single_step() (1)
18 /* common code demands this function */
19 #define ptrace_disable(child) user_disable_single_step(child)
20 #define current_user_stack_pointer() rdusp()
22 extern int is_user_addr_valid(struct task_struct *child,
23 unsigned long start, unsigned long len);
26 * Get the address of the live pt_regs for the specified task.
27 * These are saved onto the top kernel stack when the process
28 * is not running.
30 * Note: if a user thread is execve'd from kernel space, the
31 * kernel stack will not be empty on entry to the kernel, so
32 * ptracing these tasks will fail.
34 #define task_pt_regs(task) \
35 (struct pt_regs *) \
36 ((unsigned long)task_stack_page(task) + \
37 (THREAD_SIZE - sizeof(struct pt_regs)))
39 #include <asm-generic/ptrace.h>
41 #endif /* __ASSEMBLY__ */
42 #endif /* _BFIN_PTRACE_H */