summaryrefslogtreecommitdiff
path: root/arch/nds32
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-20 14:44:47 +0300
committerGreentime Hu <green.hu@gmail.com>2021-02-25 09:31:49 +0300
commit9d63fecfcb2c7d379b6dd06892c534068a03a470 (patch)
treef0d87fe907dd5048e8cb5174ad2cfdb536b99b18 /arch/nds32
parente99da8af9cbc8f68e27c28ddeb57a40ee1006081 (diff)
downloadlinux-9d63fecfcb2c7d379b6dd06892c534068a03a470.tar.xz
nds32: remove dump_instr
dump_inst has a return before actually doing anything, so just drop the whole thing. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Nick Hu <nickhu@andestech.com> Acked-by: Greentime Hu <green.hu@gmail.com> Signed-off-by: Greentime Hu <green.hu@gmail.com>
Diffstat (limited to 'arch/nds32')
-rw-r--r--arch/nds32/kernel/traps.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/nds32/kernel/traps.c b/arch/nds32/kernel/traps.c
index 6a9772ba7392..b66f889bc6df 100644
--- a/arch/nds32/kernel/traps.c
+++ b/arch/nds32/kernel/traps.c
@@ -62,40 +62,6 @@ void dump_mem(const char *lvl, unsigned long bottom, unsigned long top)
EXPORT_SYMBOL(dump_mem);
-static void dump_instr(struct pt_regs *regs)
-{
- unsigned long addr = instruction_pointer(regs);
- mm_segment_t fs;
- char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str;
- int i;
-
- return;
- /*
- * We need to switch to kernel mode so that we can use __get_user
- * to safely read from kernel space. Note that we now dump the
- * code first, just in case the backtrace kills us.
- */
- fs = get_fs();
- set_fs(KERNEL_DS);
-
- pr_emerg("Code: ");
- for (i = -4; i < 1; i++) {
- unsigned int val, bad;
-
- bad = __get_user(val, &((u32 *) addr)[i]);
-
- if (!bad) {
- p += sprintf(p, i == 0 ? "(%08x) " : "%08x ", val);
- } else {
- p += sprintf(p, "bad PC value");
- break;
- }
- }
- pr_emerg("Code: %s\n", str);
-
- set_fs(fs);
-}
-
#define LOOP_TIMES (100)
static void __dump(struct task_struct *tsk, unsigned long *base_reg,
const char *loglvl)
@@ -179,7 +145,6 @@ void die(const char *str, struct pt_regs *regs, int err)
if (!user_mode(regs) || in_interrupt()) {
dump_mem("Stack: ", regs->sp, (regs->sp + PAGE_SIZE) & PAGE_MASK);
- dump_instr(regs);
dump_stack();
}