static int kstack_depth_to_print = 24;
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
unsigned long *stack;
int i;
dik_show_trace(sp, loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
void
die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)
{
EXPORT_SYMBOL(show_stacktrace);
/* Expected by sched Code */
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
{
show_stacktrace(tsk, NULL, loglvl);
}
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
- show_stack_loglvl(tsk, sp, KERN_DEFAULT);
-}
-
/* Another API expected by schedular, shows up in "ps" as Wait Channel
* Of course just returning schedule( ) would be pointless so unwind until
* the function is not in schedular code
}
#endif
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
{
dump_backtrace(NULL, tsk, loglvl);
barrier();
}
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
- show_stack_loglvl(tsk, sp, KERN_DEFAULT);
-}
-
#ifdef CONFIG_PREEMPT
#define S_PREEMPT " PREEMPT"
#elif defined(CONFIG_PREEMPT_RT)
put_task_stack(tsk);
}
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
{
dump_backtrace(NULL, tsk, loglvl);
barrier();
}
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
- show_stack_loglvl(tsk, sp, KERN_DEFAULT);
-}
-
#ifdef CONFIG_PREEMPT
#define S_PREEMPT " PREEMPT"
#elif defined(CONFIG_PREEMPT_RT)
printk("%s\n", loglvl);
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
+void show_stack(struct task_struct *task, unsigned long *stack,
const char *loglvl)
{
unsigned long *p, *endstack;
show_trace(stack, endstack, loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
- show_stack_loglvl(task, stack, KERN_DEBUG);
-}
-
int is_valid_bugaddr(unsigned long addr)
{
return __kernel_text_address(addr);
trace_sys_exit(regs, syscall_get_return_value(current, regs));
}
-extern void show_stack(struct task_struct *task, unsigned long *stack);
+extern void show_stack(struct task_struct *task, unsigned long *stack, const char *loglvl);
void show_regs(struct pt_regs *fp)
{
unsigned long *sp;
}
pr_cont("\n");
- show_stack(NULL, (unsigned long *)fp->regs[4]);
+ show_stack(NULL, (unsigned long *)fp->regs[4], KERN_INFO);
return;
}
return false;
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
pr_cont("Call Trace:\n");
walk_stackframe(task, NULL, print_trace_address, (void *)loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- pr_cont("Call Trace:\n");
- walk_stackframe(task, NULL, print_trace_address, KERN_INFO);
-}
-
static bool save_wchan(unsigned long pc, void *arg)
{
if (!in_sched_functions(pc)) {
static int kstack_depth_to_print = 24;
-void show_stack_loglvl(struct task_struct *task, unsigned long *esp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *esp, const char *loglvl)
{
unsigned long *stack, addr;
int i;
}
printk("%s\n", loglvl);
}
-
-void show_stack(struct task_struct *task, unsigned long *esp)
-{
- show_stack_loglvl(task, esp, KERN_INFO);
-}
}
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *fp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *fp, const char *loglvl)
{
/* Saved link reg is one word above FP */
do_show_stack(task, fp, 0, loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *fp)
-{
- show_stack_loglvl(task, fp, 0, KERN_INFO);
-}
-
int die(const char *str, struct pt_regs *regs, long err)
{
static struct {
if (read_trylock(&tasklist_lock)) {
do_each_thread (g, t) {
printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);
- show_stack(t, NULL);
+ show_stack(t, NULL, KERN_DEFAULT);
} while_each_thread (g, t);
read_unlock(&tasklist_lock);
}
}
void
-show_stack_loglvl (struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+show_stack (struct task_struct *task, unsigned long *sp, const char *loglvl)
{
if (!task)
unw_init_running(ia64_do_show_stack, (void *)loglvl);
}
}
-void
-show_stack (struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
void
show_regs (struct pt_regs *regs)
{
((i == sof - 1) || (i % 3) == 2) ? "\n" : " ");
}
} else
- show_stack(NULL, NULL);
+ show_stack(NULL, NULL, KERN_DEFAULT);
}
/* local support for deprecated console_print */
default:
pr_cont("\n");
}
- show_stack(NULL, (unsigned long *)addr);
+ show_stack(NULL, (unsigned long *)addr, KERN_INFO);
pr_info("Code:");
set_fs(KERNEL_DS);
pr_cont("\n");
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *stack,
+ const char *loglvl)
{
unsigned long *p;
unsigned long *endstack;
show_trace(stack, loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
- show_stack_loglvl(task, stack, KERN_INFO);
-}
-
/*
* The vector number returned in the frame pointer may also contain
* the "fs" (Fault Status) bits on ColdFire. These are in the bottom
}
__setup("kstack=", kstack_setup);
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
unsigned long words_to_show;
u32 fp = (u32) sp;
debug_show_held_locks(task);
}
-
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_INFO);
-}
show_backtrace(task, regs, loglvl);
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
struct pt_regs regs;
mm_segment_t old_fs = get_fs();
set_fs(old_fs);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT)
-}
-
static void show_code(unsigned int __user *pc)
{
long i;
printk("%s\n", loglvl);
}
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
{
unsigned long *base_reg;
barrier();
}
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
- show_stack_loglvl(tsk, sp, KERN_EMERG);
-}
-
DEFINE_SPINLOCK(die_lock);
/*
}
/*
- * The show_stack(), show_stack_loglvl() are external API
- * which we do not use ourselves.
+ * The show_stack() is external API which we do not use ourselves.
*/
int kstack_depth_to_print = 48;
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *stack,
+ const char *loglvl)
{
unsigned long *endstack, addr;
int i;
printk("%s\n", loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
- show_stack_loglvl(task, stack, KERN_EMERG);
-}
-
void __init trap_init(void)
{
/* Nothing to do here */
}
/* displays a short stack trace */
-void show_stack_loglvl(struct task_struct *task, unsigned long *esp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *esp, const char *loglvl)
{
if (esp == NULL)
esp = (unsigned long *)&esp;
unwind_stack((void *)loglvl, esp, print_trace);
}
-void show_stack(struct task_struct *task, unsigned long *esp)
-{
- show_stack_loglvl(task, esp, KERN_EMERG);
-}
-
void show_registers(struct pt_regs *regs)
{
int i;
if (in_kernel) {
printk("\nStack: ");
- show_stack(NULL, (unsigned long *)esp);
+ show_stack(NULL, (unsigned long *)esp, KERN_EMERG);
printk("\nCode: ");
if (regs->pc < PAGE_OFFSET)
do_show_stack(&info, loglvl);
}
-void show_stack_loglvl(struct task_struct *t, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *t, unsigned long *sp, const char *loglvl)
{
parisc_show_stack(t, NULL, loglvl);
}
-void show_stack(struct task_struct *t, unsigned long *sp)
-{
- show_stack_loglvl(t, sp, KERN_CRIT)
-}
-
int is_valid_bugaddr(unsigned long iaoq)
{
return 1;
printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip);
printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link);
#endif
- show_stack(current, (unsigned long *) regs->gpr[1]);
+ show_stack(current, (unsigned long *) regs->gpr[1], KERN_DEFAULT);
if (!user_mode(regs))
show_instructions(regs);
}
static int kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *stack,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *stack,
+ const char *loglvl)
{
unsigned long sp, ip, lr, newsp;
int count = 0;
put_task_stack(tsk);
}
-void show_stack(struct task_struct *tsk, unsigned long *stack)
-{
- show_stack_loglvl(tsk, stack, KERN_DEFAULT);
-}
-
#ifdef CONFIG_PPC64
/* Called with hard IRQs off */
void notrace __ppc64_runlatch_on(void)
pr_cont(" current pointer corrupt? (%px)\n", p->__current);
pr_warn("Back trace of paca->saved_r1 (0x%016llx) (possibly stale):\n", p->saved_r1);
- show_stack(p->__current, (unsigned long *)p->saved_r1);
+ show_stack(p->__current, (unsigned long *)p->saved_r1, KERN_WARNING);
}
}
return false;
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
pr_cont("Call Trace:\n");
walk_stackframe(task, NULL, print_trace_address, (void *)loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
static bool save_wchan(unsigned long pc, void *arg)
{
if (!in_sched_functions(pc)) {
return -EINVAL;
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
+void show_stack(struct task_struct *task, unsigned long *stack,
const char *loglvl)
{
struct unwind_state state;
debug_show_held_locks(task ? : current);
}
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
- show_stack_loglvl(task, stack, KERN_DEFAULT);
-}
-
static void show_last_breaking_event(struct pt_regs *regs)
{
printk("Last Breaking-Event-Address:\n");
show_registers(regs);
/* Show stack backtrace if pt_regs is from kernel mode */
if (!user_mode(regs))
- show_stack(NULL, (unsigned long *) regs->gprs[15]);
+ show_stack(NULL, (unsigned long *) regs->gprs[15], KERN_DEFAULT);
show_last_breaking_event(regs);
}
debug_show_held_locks(tsk);
}
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
{
unsigned long stack;
(unsigned long)task_stack_page(tsk));
show_trace(tsk, sp, NULL, loglvl);
}
-
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
}
/*
- * The show_stack(), show_stack_loglvl() are external APIs which
- * we do not use ourselves.
+ * The show_stack() is external API which we do not use ourselves.
* The oops is printed in die_if_kernel.
*/
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *_ksp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *_ksp, const char *loglvl)
{
unsigned long pc, fp;
unsigned long task_base;
printk("%s\n", loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
/*
* Free current thread data structures etc..
*/
regs->u_regs[15]);
printk("RPC: <%pS>\n", (void *) regs->u_regs[15]);
show_regwindow(regs);
- show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]);
+ show_stack(current, (unsigned long *)regs->u_regs[UREG_FP], KERN_DEFAULT);
}
union global_cpu_snapshot global_cpu_snapshot[NR_CPUS];
printk("\n");
}
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *_ksp,
- const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *_ksp, const char *loglvl)
{
unsigned long fp, ksp;
struct thread_info *tp;
} while (++count < 16);
}
-void show_stack(struct task_struct *tsk, unsigned long *_ksp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
static inline struct reg_window *kernel_stack_up(struct reg_window *rw)
{
unsigned long fp = rw->ins[6];
{
struct task_struct *task = arg;
- show_stack(task, NULL);
+ show_stack(task, NULL, KERN_INFO);
}
/*
.address = _print_addr
};
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
+void show_stack(struct task_struct *task, unsigned long *stack,
const char *loglvl)
{
struct pt_regs *segv_regs = current->thread.segv_regs;
dump_trace(current, &stackops, (void *)loglvl);
printk("%s\n", loglvl);
}
-
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
- show_stack_loglvl(task, stack, KERN_INFO);
-}
c_backtrace(fp, loglvl);
}
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
+void show_stack(struct task_struct *tsk, unsigned long *sp,
const char *loglvl)
{
dump_backtrace(NULL, tsk, loglvl);
barrier();
}
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
- show_stack_loglvl(tsk, sp, KERN_DEFAULT)
-}
-
static int __die(const char *str, int err, struct thread_info *thread,
struct pt_regs *regs)
{
return;
dump = 1;
- show_stack_loglvl(NULL, NULL, KERN_ERR);
+ show_stack(NULL, NULL, KERN_ERR);
debug_dma_dump_mappings(NULL);
}
#endif
}
}
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
+void show_stack(struct task_struct *task, unsigned long *sp,
const char *loglvl)
{
task = task ? : current;
show_trace_log_lvl(task, NULL, sp, loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
void show_stack_regs(struct pt_regs *regs)
{
show_trace_log_lvl(current, regs, NULL, KERN_DEFAULT);
#define STACK_DUMP_LINE_SIZE 32
static size_t kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
size_t len;
show_trace(task, sp, loglvl);
}
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
- show_stack_loglvl(task, sp, KERN_INFO);
-}
-
DEFINE_SPINLOCK(die_lock);
void die(const char * str, struct pt_regs * regs, long err)
pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter, pr);
show_regs(regs);
if (!user_mode(regs))
- show_stack(NULL, (unsigned long*)regs->areg[1]);
+ show_stack(NULL, (unsigned long *)regs->areg[1], KERN_INFO);
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
spin_unlock_irq(&die_lock);
struct dpm_watchdog *wd = from_timer(wd, t, timer);
dev_emerg(wd->dev, "**** DPM device timeout ****\n");
- show_stack_loglvl(wd->tsk, NULL, KERN_EMERG);
+ show_stack(wd->tsk, NULL, KERN_EMERG);
panic("%s %s: unrecoverable failure\n",
dev_driver_string(wd->dev), dev_name(wd->dev));
}
raw_spin_lock_irqsave(&show_lock, flags);
pr_info("CPU%d:\n", smp_processor_id());
- show_stack_loglvl(NULL, NULL, KERN_INFO);
+ show_stack(NULL, NULL, KERN_INFO);
raw_spin_unlock_irqrestore(&show_lock, flags);
}
* task), SP is the stack pointer of the first frame that should be shown in the back
* trace (or NULL if the entire call-chain of the task should be shown).
*/
-extern void show_stack(struct task_struct *task, unsigned long *sp);
-extern void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
- const char *loglvl);
+extern void show_stack(struct task_struct *task, unsigned long *sp,
+ const char *loglvl);
extern void sched_show_task(struct task_struct *p);
kdb_dump_stack_on_cpu(kdb_process_cpu(p));
console_loglevel = old_lvl;
} else {
- show_stack_loglvl(p, addr, KERN_EMERG);
+ show_stack(p, addr, KERN_EMERG);
}
kdb_trap_printk--;
printk("\n%s/%d's [blocked] stackdump:\n\n",
task->comm, task_pid_nr(task));
- show_stack_loglvl(task, NULL, KERN_DEFAULT);
+ show_stack(task, NULL, KERN_DEFAULT);
printk("\n%s/%d's [current] stackdump:\n\n",
current->comm, task_pid_nr(current));
dump_stack();
(unsigned long)task_thread_info(p)->flags);
print_worker_info(KERN_INFO, p);
- show_stack_loglvl(p, NULL, KERN_INFO);
+ show_stack(p, NULL, KERN_INFO);
put_task_stack(p);
}
EXPORT_SYMBOL_GPL(sched_show_task);
static void __dump_stack(void)
{
dump_stack_print_info(KERN_DEFAULT);
- show_stack_loglvl(NULL, NULL, KERN_DEFAULT);
+ show_stack(NULL, NULL, KERN_DEFAULT);
}
/**