···11+/*22+ * arch/sh/kernel/stacktrace.c33+ *44+ * Stack trace management functions55+ *66+ * Copyright (C) 2006 Paul Mundt77+ *88+ * This file is subject to the terms and conditions of the GNU General Public99+ * License. See the file "COPYING" in the main directory of this archive1010+ * for more details.1111+ */1212+#include <linux/sched.h>1313+#include <linux/stacktrace.h>1414+#include <linux/thread_info.h>1515+#include <asm/ptrace.h>1616+1717+/*1818+ * Save stack-backtrace addresses into a stack_trace buffer.1919+ */2020+void save_stack_trace(struct stack_trace *trace, struct task_struct *task)2121+{2222+ unsigned long *sp;2323+2424+ if (!task)2525+ task = current;2626+ if (task == current)2727+ sp = (unsigned long *)current_stack_pointer;2828+ else2929+ sp = (unsigned long *)task->thread.sp;3030+3131+ while (!kstack_end(sp)) {3232+ unsigned long addr = *sp++;3333+3434+ if (__kernel_text_address(addr)) {3535+ if (trace->skip > 0)3636+ trace->skip--;3737+ else3838+ trace->entries[trace->nr_entries++] = addr;3939+ if (trace->nr_entries >= trace->max_entries)4040+ break;4141+ }4242+ }4343+}
+3
arch/sh/mm/fault.c
···3737 int si_code;3838 siginfo_t info;39394040+ trace_hardirqs_on();4141+ local_irq_enable();4242+4043#ifdef CONFIG_SH_KGDB4144 if (kgdb_nofault && kgdb_bus_err_hook)4245 kgdb_bus_err_hook();