diff options
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 00fd7647f807..52c74780f403 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -1243,15 +1243,12 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp, | |||
1243 | 1243 | ||
1244 | static int xmon_depth_to_print = 64; | 1244 | static int xmon_depth_to_print = 64; |
1245 | 1245 | ||
1246 | #ifdef CONFIG_PPC64 | 1246 | #define LRSAVE_OFFSET (STACK_FRAME_LR_SAVE * sizeof(unsigned long)) |
1247 | #define LRSAVE_OFFSET 0x10 | 1247 | #define MARKER_OFFSET (STACK_FRAME_MARKER * sizeof(unsigned long)) |
1248 | #define REG_FRAME_MARKER 0x7265677368657265ul /* "regshere" */ | 1248 | |
1249 | #define MARKER_OFFSET 0x60 | 1249 | #ifdef __powerpc64__ |
1250 | #define REGS_OFFSET 0x70 | 1250 | #define REGS_OFFSET 0x70 |
1251 | #else | 1251 | #else |
1252 | #define LRSAVE_OFFSET 4 | ||
1253 | #define REG_FRAME_MARKER 0x72656773 | ||
1254 | #define MARKER_OFFSET 8 | ||
1255 | #define REGS_OFFSET 16 | 1252 | #define REGS_OFFSET 16 |
1256 | #endif | 1253 | #endif |
1257 | 1254 | ||
@@ -1317,7 +1314,7 @@ static void xmon_show_stack(unsigned long sp, unsigned long lr, | |||
1317 | /* Look for "regshere" marker to see if this is | 1314 | /* Look for "regshere" marker to see if this is |
1318 | an exception frame. */ | 1315 | an exception frame. */ |
1319 | if (mread(sp + MARKER_OFFSET, &marker, sizeof(unsigned long)) | 1316 | if (mread(sp + MARKER_OFFSET, &marker, sizeof(unsigned long)) |
1320 | && marker == REG_FRAME_MARKER) { | 1317 | && marker == STACK_FRAME_REGS_MARKER) { |
1321 | if (mread(sp + REGS_OFFSET, ®s, sizeof(regs)) | 1318 | if (mread(sp + REGS_OFFSET, ®s, sizeof(regs)) |
1322 | != sizeof(regs)) { | 1319 | != sizeof(regs)) { |
1323 | printf("Couldn't read registers at %lx\n", | 1320 | printf("Couldn't read registers at %lx\n", |