aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/ptrace.h
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-07-25 04:47:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:39 -0400
commitf22ab814a24e654b1de24db0c5f8b57b5ab2026a (patch)
tree827f3fe1c94ba9cfd180f199ea6d2dc2dfa885df /include/asm-parisc/ptrace.h
parentbc64efd220dcd4449aef8dd2564d73127b583b09 (diff)
include/asm/ptrace.h userspace headers cleanup
This patch contains the following cleanups for the asm/ptrace.h userspace headers: - include/asm-generic/Kbuild.asm already lists ptrace.h, remove the superfluous listings in the Kbuild files of the following architectures: - cris - frv - powerpc - x86 - don't expose function prototypes and macros to userspace: - arm - blackfin - cris - mn10300 - parisc - remove #ifdef CONFIG_'s around #define's: - blackfin - m68knommu - sh: AFAIK __SH5__ should work in both kernel and userspace, no need to leak CONFIG_SUPERH64 to userspace - xtensa: cosmetical change to remove empty #ifndef __ASSEMBLY__ #else #endif from the userspace headers Not changed by this patch is the fact that the following architectures have a different struct pt_regs depending on CONFIG_ variables: - h8300 - m68knommu - mips This does not work in userspace. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: <linux-arch@vger.kernel.org> Cc: Roland McGrath <roland@redhat.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Grant Grundler <grundler@parisc-linux.org> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Chris Zankel <chris@zankel.net> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-parisc/ptrace.h')
-rw-r--r--include/asm-parisc/ptrace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-parisc/ptrace.h b/include/asm-parisc/ptrace.h
index 93f990e418f1..3e94c5d85ff5 100644
--- a/include/asm-parisc/ptrace.h
+++ b/include/asm-parisc/ptrace.h
@@ -33,7 +33,6 @@ struct pt_regs {
33 unsigned long ipsw; /* CR22 */ 33 unsigned long ipsw; /* CR22 */
34}; 34};
35 35
36#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
37/* 36/*
38 * The numbers chosen here are somewhat arbitrary but absolutely MUST 37 * The numbers chosen here are somewhat arbitrary but absolutely MUST
39 * not overlap with any of the number assigned in <linux/ptrace.h>. 38 * not overlap with any of the number assigned in <linux/ptrace.h>.
@@ -43,8 +42,11 @@ struct pt_regs {
43 * since we have taken branch traps too) 42 * since we have taken branch traps too)
44 */ 43 */
45#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ 44#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
45
46#ifdef __KERNEL__ 46#ifdef __KERNEL__
47 47
48#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
49
48/* XXX should we use iaoq[1] or iaoq[0] ? */ 50/* XXX should we use iaoq[1] or iaoq[0] ? */
49#define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) 51#define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0)
50#define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0) 52#define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0)