diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 18:29:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 18:29:33 -0400 |
commit | fd2f261053b2f125d5f6882b6d095ce2f4076fe5 (patch) | |
tree | 5be548353e3c8b3a7e1e5e01e41b88777ad6d249 /arch/s390/kernel/stacktrace.c | |
parent | 99e1221d1a1edac316f7f8116c781f75733b1159 (diff) | |
parent | a07a5b336f699e21d405764931a9d5426dc4f945 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] Fix broken logic, SIGA flags must be bitwise ORed
[S390] cio: Dont print trailing \0 in modalias_show().
[S390] Simplify stack trace.
[S390] z/VM unit record device driver
[S390] vmcp cleanup
[S390] qdio: output queue stall on FCP and network devices
[S390] Fix disassembly of RX_URRD, SI_URD & PC-relative instructions.
[S390] Update default configuration.
Diffstat (limited to 'arch/s390/kernel/stacktrace.c')
-rw-r--r-- | arch/s390/kernel/stacktrace.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c index 515ff9011dd7..da6924729964 100644 --- a/arch/s390/kernel/stacktrace.c +++ b/arch/s390/kernel/stacktrace.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kallsyms.h> | 12 | #include <linux/kallsyms.h> |
13 | 13 | ||
14 | static unsigned long save_context_stack(struct stack_trace *trace, | 14 | static unsigned long save_context_stack(struct stack_trace *trace, |
15 | unsigned int *skip, | ||
16 | unsigned long sp, | 15 | unsigned long sp, |
17 | unsigned long low, | 16 | unsigned long low, |
18 | unsigned long high) | 17 | unsigned long high) |
@@ -28,10 +27,10 @@ static unsigned long save_context_stack(struct stack_trace *trace, | |||
28 | sf = (struct stack_frame *)sp; | 27 | sf = (struct stack_frame *)sp; |
29 | while(1) { | 28 | while(1) { |
30 | addr = sf->gprs[8] & PSW_ADDR_INSN; | 29 | addr = sf->gprs[8] & PSW_ADDR_INSN; |
31 | if (!(*skip)) | 30 | if (!trace->skip) |
32 | trace->entries[trace->nr_entries++] = addr; | 31 | trace->entries[trace->nr_entries++] = addr; |
33 | else | 32 | else |
34 | (*skip)--; | 33 | trace->skip--; |
35 | if (trace->nr_entries >= trace->max_entries) | 34 | if (trace->nr_entries >= trace->max_entries) |
36 | return sp; | 35 | return sp; |
37 | low = sp; | 36 | low = sp; |
@@ -48,10 +47,10 @@ static unsigned long save_context_stack(struct stack_trace *trace, | |||
48 | return sp; | 47 | return sp; |
49 | regs = (struct pt_regs *)sp; | 48 | regs = (struct pt_regs *)sp; |
50 | addr = regs->psw.addr & PSW_ADDR_INSN; | 49 | addr = regs->psw.addr & PSW_ADDR_INSN; |
51 | if (!(*skip)) | 50 | if (!trace->skip) |
52 | trace->entries[trace->nr_entries++] = addr; | 51 | trace->entries[trace->nr_entries++] = addr; |
53 | else | 52 | else |
54 | (*skip)--; | 53 | trace->skip--; |
55 | if (trace->nr_entries >= trace->max_entries) | 54 | if (trace->nr_entries >= trace->max_entries) |
56 | return sp; | 55 | return sp; |
57 | low = sp; | 56 | low = sp; |
@@ -65,20 +64,17 @@ void save_stack_trace(struct stack_trace *trace) | |||
65 | unsigned long orig_sp, new_sp; | 64 | unsigned long orig_sp, new_sp; |
66 | 65 | ||
67 | orig_sp = sp & PSW_ADDR_INSN; | 66 | orig_sp = sp & PSW_ADDR_INSN; |
68 | 67 | new_sp = save_context_stack(trace, orig_sp, | |
69 | new_sp = save_context_stack(trace, &trace->skip, orig_sp, | 68 | S390_lowcore.panic_stack - PAGE_SIZE, |
70 | S390_lowcore.panic_stack - PAGE_SIZE, | 69 | S390_lowcore.panic_stack); |
71 | S390_lowcore.panic_stack); | ||
72 | if (new_sp != orig_sp) | 70 | if (new_sp != orig_sp) |
73 | return; | 71 | return; |
74 | new_sp = save_context_stack(trace, &trace->skip, new_sp, | 72 | new_sp = save_context_stack(trace, new_sp, |
75 | S390_lowcore.async_stack - ASYNC_SIZE, | 73 | S390_lowcore.async_stack - ASYNC_SIZE, |
76 | S390_lowcore.async_stack); | 74 | S390_lowcore.async_stack); |
77 | if (new_sp != orig_sp) | 75 | if (new_sp != orig_sp) |
78 | return; | 76 | return; |
79 | 77 | save_context_stack(trace, new_sp, | |
80 | save_context_stack(trace, &trace->skip, new_sp, | ||
81 | S390_lowcore.thread_info, | 78 | S390_lowcore.thread_info, |
82 | S390_lowcore.thread_info + THREAD_SIZE); | 79 | S390_lowcore.thread_info + THREAD_SIZE); |
83 | return; | ||
84 | } | 80 | } |