diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 13:42:18 +0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-11 18:30:38 +0400 |
commit | bf90e1eab682dcb79b7765989fb65835ce9d6165 (patch) | |
tree | cb1bb4364862d878e1d361d371f8392d08f606d7 /arch/arc/include/asm/ptrace.h | |
parent | 4adeefe161a74369e44cc8e663f240ece0470dc3 (diff) | |
download | linux-bf90e1eab682dcb79b7765989fb65835ce9d6165.tar.xz |
ARC: Process-creation/scheduling/idle-loop
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arc/include/asm/ptrace.h')
-rw-r--r-- | arch/arc/include/asm/ptrace.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h index 4c9359477ded..3afadefe335f 100644 --- a/arch/arc/include/asm/ptrace.h +++ b/arch/arc/include/asm/ptrace.h @@ -91,6 +91,14 @@ struct callee_regs { #define in_syscall(regs) (((regs->orig_r8) >= 0 && \ (regs->orig_r8 <= NR_syscalls)) ? 1 : 0) +#define current_pt_regs() \ +({ \ + /* open-coded current_thread_info() */ \ + register unsigned long sp asm ("sp"); \ + unsigned long pg_start = (sp & ~(THREAD_SIZE - 1)); \ + (struct pt_regs *)(pg_start + THREAD_SIZE - 4) - 1; \ +}) + #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ |