提交 fca6b4ee 编写于 作者: W Wu Liliu 提交者: guzitao

sw64: rename dik_* methods

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG

--------------------------------

Since die_if_kernel() has been removed, the prefix `dik_` is not
appropriate. Remove this prefix and simplify the implementation
if there is no one to forward the exception to.
Signed-off-by: NWu Liliu <wuliliu@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
上级 43804aef
......@@ -102,17 +102,6 @@ void machine_power_off(void)
}
/* Used by sysrq-p, among others. I don't believe r9-r15 are ever
* saved in the context it's used.
*/
void
show_regs(struct pt_regs *regs)
{
show_regs_print_info(KERN_DEFAULT);
dik_show_regs(regs);
}
/*
* Re-start a thread when doing execve()
*/
......
......@@ -12,7 +12,7 @@ extern int ptrace_set_bpt(struct task_struct *child);
extern int ptrace_cancel_bpt(struct task_struct *child);
/* traps.c */
extern void dik_show_regs(struct pt_regs *regs);
extern void show_regs(struct pt_regs *regs);
extern void die(char *str, struct pt_regs *regs, long err);
/* timer.c */
......
......@@ -487,7 +487,7 @@ int do_match(unsigned long address, unsigned long mmcsr, long cause, struct pt_r
case MMCSR__DA_MATCH:
case MMCSR__DV_MATCH:
case MMCSR__DAV_MATCH:
dik_show_regs(regs);
show_regs(regs);
if (!(current->ptrace & PT_PTRACED)) {
printk(" pid %d %s not be ptraced, return\n", current->pid, current->comm);
......
......@@ -31,8 +31,10 @@
#include "proto.h"
void dik_show_regs(struct pt_regs *regs)
void show_regs(struct pt_regs *regs)
{
show_regs_print_info(KERN_DEFAULT);
printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx %s\n",
regs->pc, regs->r26, regs->ps, print_tainted());
printk("pc is at %pSR\n", (void *)regs->pc);
......@@ -62,8 +64,7 @@ void dik_show_regs(struct pt_regs *regs)
printk("gp = %016lx sp = %p\n", regs->gp, regs+1);
}
static void
dik_show_code(unsigned int *pc)
static void show_code(unsigned int *pc)
{
long i;
unsigned int insn;
......@@ -93,15 +94,11 @@ void die(char *str, struct pt_regs *regs, long err)
pr_emerg("%s [#%d]\n", str, ++die_counter);
#ifdef CONFIG_SMP
printk("CPU %d ", hard_smp_processor_id());
#endif
printk("%s(%d): %s %ld\n", current->comm, task_pid_nr(current), str, err);
ret = notify_die(DIE_OOPS, str, regs, err, 0, SIGSEGV);
print_modules();
dik_show_regs(regs);
show_regs(regs);
show_code((unsigned int *)regs->pc);
show_stack(current, NULL, KERN_EMERG);
bust_spinlocks(0);
......@@ -508,21 +505,7 @@ do_entUna(void *va, unsigned long opcode, unsigned long reg,
* Since the registers are in a weird format, dump them ourselves.
*/
printk("%s(%d): unhandled unaligned exception\n",
current->comm, task_pid_nr(current));
dik_show_regs(regs);
dik_show_code((unsigned int *)pc);
show_stack(current, NULL, KERN_EMERG);
if (test_and_set_thread_flag(TIF_DIE_IF_KERNEL)) {
printk("die_if_kernel recursion detected.\n");
local_irq_enable();
while (1)
asm("nop");
}
do_exit(SIGSEGV);
die("Unhandled unaligned exception", regs, error);
}
/*
......
......@@ -32,7 +32,7 @@ static inline int notify_page_fault(struct pt_regs *regs, unsigned long mmcsr)
#endif
extern void die(char *, struct pt_regs *, long);
extern void dik_show_regs(struct pt_regs *regs);
extern void show_regs(struct pt_regs *regs);
void show_all_vma(void)
{
......@@ -325,7 +325,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
if (unlikely(segv_debug_enabled)) {
pr_info("fault: want to send_segv: pid %d, cause = %#lx, mmcsr = %#lx, address = %#lx, pc %#lx\n",
current->pid, cause, mmcsr, address, regs->pc);
dik_show_regs(regs);
show_regs(regs);
show_all_vma();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册