summaryrefslogtreecommitdiffstats
path: root/arch/h8300/kernel
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2016-01-15 09:07:32 +0100
committerYoshinori Sato <ysato@users.sourceforge.jp>2016-01-20 15:28:00 +0100
commitbf24eec39a6b0df1fcc1ff92db39fe2f2a60f737 (patch)
tree58d236445d7af899cb01adcd17625c407fa6154f /arch/h8300/kernel
parenth8300: Restraint of warning. (diff)
downloadlinux-bf24eec39a6b0df1fcc1ff92db39fe2f2a60f737.tar.xz
linux-bf24eec39a6b0df1fcc1ff92db39fe2f2a60f737.zip
h8300: show_stack cleanup
- fix stack limit. h8300's stack not aligned 4byte. - pritty output form. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'arch/h8300/kernel')
-rw-r--r--arch/h8300/kernel/traps.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c
index 1b2d7cdd6591..044a36125846 100644
--- a/arch/h8300/kernel/traps.c
+++ b/arch/h8300/kernel/traps.c
@@ -125,17 +125,18 @@ void show_stack(struct task_struct *task, unsigned long *esp)
pr_info("Stack from %08lx:", (unsigned long)stack);
for (i = 0; i < kstack_depth_to_print; i++) {
- if (((unsigned long)stack & (THREAD_SIZE - 1)) == 0)
+ if (((unsigned long)stack & (THREAD_SIZE - 1)) >=
+ THREAD_SIZE-4)
break;
if (i % 8 == 0)
- pr_info("\n ");
- pr_info(" %08lx", *stack++);
+ pr_info(" ");
+ pr_cont(" %08lx", *stack++);
}
- pr_info("\nCall Trace:");
+ pr_info("\nCall Trace:\n");
i = 0;
stack = esp;
- while (((unsigned long)stack & (THREAD_SIZE - 1)) != 0) {
+ while (((unsigned long)stack & (THREAD_SIZE - 1)) < THREAD_SIZE-4) {
addr = *stack++;
/*
* If the address is either in the text segment of the
@@ -147,15 +148,10 @@ void show_stack(struct task_struct *task, unsigned long *esp)
*/
if (check_kernel_text(addr)) {
if (i % 4 == 0)
- pr_info("\n ");
- pr_info(" [<%08lx>]", addr);
+ pr_info(" ");
+ pr_cont(" [<%08lx>]", addr);
i++;
}
}
pr_info("\n");
}
-
-void show_trace_task(struct task_struct *tsk)
-{
- show_stack(tsk, (unsigned long *)tsk->thread.esp0);
-}