Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108354
b: refs/heads/master
c: 6f63e78
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Aug 14, 2008
1 parent c093523 commit 99bcc83
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f70f7a91bffdcc39f088748dc678953eb9a3fbd
refs/heads/master: 6f63e781eaf6a741fc65f773017154b20ed4ce3b
38 changes: 20 additions & 18 deletions trunk/arch/sparc64/kernel/kstack.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp)
sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
return true;

base = (unsigned long) hardirq_stack[tp->cpu];
if (sp >= base &&
sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
return true;
base = (unsigned long) softirq_stack[tp->cpu];
if (sp >= base &&
sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
return true;

if (hardirq_stack[tp->cpu]) {
base = (unsigned long) hardirq_stack[tp->cpu];
if (sp >= base &&
sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
return true;
base = (unsigned long) softirq_stack[tp->cpu];
if (sp >= base &&
sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
return true;
}
return false;
}

Expand All @@ -37,15 +38,16 @@ static inline bool kstack_is_trap_frame(struct thread_info *tp, struct pt_regs *
addr <= (base + THREAD_SIZE - sizeof(*regs)))
goto check_magic;

base = (unsigned long) hardirq_stack[tp->cpu];
if (addr >= base &&
addr <= (base + THREAD_SIZE - sizeof(*regs)))
goto check_magic;
base = (unsigned long) softirq_stack[tp->cpu];
if (addr >= base &&
addr <= (base + THREAD_SIZE - sizeof(*regs)))
goto check_magic;

if (hardirq_stack[tp->cpu]) {
base = (unsigned long) hardirq_stack[tp->cpu];
if (addr >= base &&
addr <= (base + THREAD_SIZE - sizeof(*regs)))
goto check_magic;
base = (unsigned long) softirq_stack[tp->cpu];
if (addr >= base &&
addr <= (base + THREAD_SIZE - sizeof(*regs)))
goto check_magic;
}
return false;

check_magic:
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/sparc64/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

void save_stack_trace(struct stack_trace *trace)
{
unsigned long ksp, fp, thread_base;
struct thread_info *tp = task_thread_info(current);
unsigned long ksp, fp;

stack_trace_flush();

Expand All @@ -20,7 +20,6 @@ void save_stack_trace(struct stack_trace *trace)
);

fp = ksp + STACK_BIAS;
thread_base = (unsigned long) tp;
do {
struct sparc_stackf *sf;
struct pt_regs *regs;
Expand Down

0 comments on commit 99bcc83

Please sign in to comment.