aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/stacktrace.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-12 18:33:56 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-12 18:33:56 -0700
commit4f70f7a91bffdcc39f088748dc678953eb9a3fbd (patch)
tree934591a9518fbed87c14b758a1744cc30c9dfbb8 /arch/sparc64/kernel/stacktrace.c
parente34456825de0d3ac4c4e8fe0bdc6b599404ea06f (diff)
sparc64: Implement IRQ stacks.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/stacktrace.c')
-rw-r--r--arch/sparc64/kernel/stacktrace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c
index e9d7f0660f2..237e7f8a40a 100644
--- a/arch/sparc64/kernel/stacktrace.c
+++ b/arch/sparc64/kernel/stacktrace.c
@@ -5,6 +5,8 @@
#include <asm/ptrace.h>
#include <asm/stacktrace.h>
+#include "kstack.h"
+
void save_stack_trace(struct stack_trace *trace)
{
unsigned long ksp, fp, thread_base;
@@ -24,17 +26,13 @@ void save_stack_trace(struct stack_trace *trace)
struct pt_regs *regs;
unsigned long pc;
- /* Bogus frame pointer? */
- if (fp < (thread_base + sizeof(struct thread_info)) ||
- fp > (thread_base + THREAD_SIZE - sizeof(struct sparc_stackf)))
+ if (!kstack_valid(tp, fp))
break;
sf = (struct sparc_stackf *) fp;
regs = (struct pt_regs *) (sf + 1);
- if (((unsigned long)regs <=
- (thread_base + THREAD_SIZE - sizeof(*regs))) &&
- (regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
+ if (kstack_is_trap_frame(tp, regs)) {
if (!(regs->tstate & TSTATE_PRIV))
break;
pc = regs->tpc;