aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 15:29:33 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 15:29:33 -0700
commitfd2f261053b2f125d5f6882b6d095ce2f4076fe5 (patch)
tree5be548353e3c8b3a7e1e5e01e41b88777ad6d249 /arch/s390/kernel
parent99e1221d1a1edac316f7f8116c781f75733b1159 (diff)
parenta07a5b336f699e21d405764931a9d5426dc4f945 (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')
-rw-r--r--arch/s390/kernel/dis.c7
-rw-r--r--arch/s390/kernel/stacktrace.c26
2 files changed, 15 insertions, 18 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index a057ebf108a..d3057318f2b 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -240,8 +240,8 @@ static const unsigned char formats[][7] = {
[INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 },/* e.g. ley */
[INSTR_RX_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, /* e.g. ae */
[INSTR_RX_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, /* e.g. l */
- [INSTR_RX_URRD] = { 0x00, U4_8,D_20,X_12,B_16,0,0 }, /* e.g. bc */
- [INSTR_SI_URD] = { 0x00, D_20,B_16,U8_8,0,0,0 }, /* e.g. cli */
+ [INSTR_RX_URRD] = { 0xff, U4_8,D_20,X_12,B_16,0,0 }, /* e.g. bc */
+ [INSTR_SI_URD] = { 0xff, D_20,B_16,U8_8,0,0,0 }, /* e.g. cli */
[INSTR_SIY_URD] = { 0xff, D20_20,B_16,U8_8,0,0,0 }, /* e.g. tmy */
[INSTR_SSE_RDRD] = { 0xff, D_20,B_16,D_36,B_32,0,0 }, /* e.g. mvsdk */
[INSTR_SS_L0RDRD] = { 0xff, D_20,L8_8,B_16,D_36,B_32,0 },
@@ -1190,7 +1190,8 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
else if (operand->flags & OPERAND_CR)
ptr += sprintf(ptr, "%%c%i", value);
else if (operand->flags & OPERAND_PCREL)
- ptr += sprintf(ptr, "%lx", value + addr);
+ ptr += sprintf(ptr, "%lx", (signed int) value
+ + addr);
else if (operand->flags & OPERAND_SIGNED)
ptr += sprintf(ptr, "%i", value);
else
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index 515ff9011dd..da692472996 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -12,7 +12,6 @@
#include <linux/kallsyms.h>
static unsigned long save_context_stack(struct stack_trace *trace,
- unsigned int *skip,
unsigned long sp,
unsigned long low,
unsigned long high)
@@ -28,10 +27,10 @@ static unsigned long save_context_stack(struct stack_trace *trace,
sf = (struct stack_frame *)sp;
while(1) {
addr = sf->gprs[8] & PSW_ADDR_INSN;
- if (!(*skip))
+ if (!trace->skip)
trace->entries[trace->nr_entries++] = addr;
else
- (*skip)--;
+ trace->skip--;
if (trace->nr_entries >= trace->max_entries)
return sp;
low = sp;
@@ -48,10 +47,10 @@ static unsigned long save_context_stack(struct stack_trace *trace,
return sp;
regs = (struct pt_regs *)sp;
addr = regs->psw.addr & PSW_ADDR_INSN;
- if (!(*skip))
+ if (!trace->skip)
trace->entries[trace->nr_entries++] = addr;
else
- (*skip)--;
+ trace->skip--;
if (trace->nr_entries >= trace->max_entries)
return sp;
low = sp;
@@ -65,20 +64,17 @@ void save_stack_trace(struct stack_trace *trace)
unsigned long orig_sp, new_sp;
orig_sp = sp & PSW_ADDR_INSN;
-
- new_sp = save_context_stack(trace, &trace->skip, orig_sp,
- S390_lowcore.panic_stack - PAGE_SIZE,
- S390_lowcore.panic_stack);
+ new_sp = save_context_stack(trace, orig_sp,
+ S390_lowcore.panic_stack - PAGE_SIZE,
+ S390_lowcore.panic_stack);
if (new_sp != orig_sp)
return;
- new_sp = save_context_stack(trace, &trace->skip, new_sp,
- S390_lowcore.async_stack - ASYNC_SIZE,
- S390_lowcore.async_stack);
+ new_sp = save_context_stack(trace, new_sp,
+ S390_lowcore.async_stack - ASYNC_SIZE,
+ S390_lowcore.async_stack);
if (new_sp != orig_sp)
return;
-
- save_context_stack(trace, &trace->skip, new_sp,
+ save_context_stack(trace, new_sp,
S390_lowcore.thread_info,
S390_lowcore.thread_info + THREAD_SIZE);
- return;
}