diff options
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index d940234b09ec..1f8d2f10a432 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -1281,21 +1281,19 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp, | |||
1281 | catch_memory_errors = 0; | 1281 | catch_memory_errors = 0; |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | static int xmon_depth_to_print = 64; | ||
1285 | |||
1286 | #define LRSAVE_OFFSET (STACK_FRAME_LR_SAVE * sizeof(unsigned long)) | 1284 | #define LRSAVE_OFFSET (STACK_FRAME_LR_SAVE * sizeof(unsigned long)) |
1287 | #define MARKER_OFFSET (STACK_FRAME_MARKER * sizeof(unsigned long)) | 1285 | #define MARKER_OFFSET (STACK_FRAME_MARKER * sizeof(unsigned long)) |
1288 | 1286 | ||
1289 | static void xmon_show_stack(unsigned long sp, unsigned long lr, | 1287 | static void xmon_show_stack(unsigned long sp, unsigned long lr, |
1290 | unsigned long pc) | 1288 | unsigned long pc) |
1291 | { | 1289 | { |
1290 | int max_to_print = 64; | ||
1292 | unsigned long ip; | 1291 | unsigned long ip; |
1293 | unsigned long newsp; | 1292 | unsigned long newsp; |
1294 | unsigned long marker; | 1293 | unsigned long marker; |
1295 | int count = 0; | ||
1296 | struct pt_regs regs; | 1294 | struct pt_regs regs; |
1297 | 1295 | ||
1298 | do { | 1296 | while (max_to_print--) { |
1299 | if (sp < PAGE_OFFSET) { | 1297 | if (sp < PAGE_OFFSET) { |
1300 | if (sp != 0) | 1298 | if (sp != 0) |
1301 | printf("SP (%lx) is in userspace\n", sp); | 1299 | printf("SP (%lx) is in userspace\n", sp); |
@@ -1366,7 +1364,7 @@ static void xmon_show_stack(unsigned long sp, unsigned long lr, | |||
1366 | break; | 1364 | break; |
1367 | 1365 | ||
1368 | sp = newsp; | 1366 | sp = newsp; |
1369 | } while (count++ < xmon_depth_to_print); | 1367 | } |
1370 | } | 1368 | } |
1371 | 1369 | ||
1372 | static void backtrace(struct pt_regs *excp) | 1370 | static void backtrace(struct pt_regs *excp) |