|
@@ -7,7 +7,7 @@
|
|
*
|
|
*
|
|
* SuperH version: Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima
|
|
* SuperH version: Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima
|
|
* Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC
|
|
* Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC
|
|
- * Copyright (C) 2002 - 2006 Paul Mundt
|
|
|
|
|
|
+ * Copyright (C) 2002 - 2007 Paul Mundt
|
|
*/
|
|
*/
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/mm.h>
|
|
@@ -15,6 +15,7 @@
|
|
#include <linux/pm.h>
|
|
#include <linux/pm.h>
|
|
#include <linux/kallsyms.h>
|
|
#include <linux/kallsyms.h>
|
|
#include <linux/kexec.h>
|
|
#include <linux/kexec.h>
|
|
|
|
+#include <asm/kdebug.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/mmu_context.h>
|
|
#include <asm/mmu_context.h>
|
|
#include <asm/ubc.h>
|
|
#include <asm/ubc.h>
|
|
@@ -299,8 +300,8 @@ static void ubc_set_tracing(int asid, unsigned long pc)
|
|
ctrl_outl(0, UBC_BAMRA);
|
|
ctrl_outl(0, UBC_BAMRA);
|
|
|
|
|
|
if (current_cpu_data.type == CPU_SH7729 ||
|
|
if (current_cpu_data.type == CPU_SH7729 ||
|
|
- current_cpu_data.type == CPU_SH7710 ||
|
|
|
|
- current_cpu_data.type == CPU_SH7712 ) {
|
|
|
|
|
|
+ current_cpu_data.type == CPU_SH7710 ||
|
|
|
|
+ current_cpu_data.type == CPU_SH7712) {
|
|
ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA);
|
|
ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA);
|
|
ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR);
|
|
ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR);
|
|
} else {
|
|
} else {
|
|
@@ -496,6 +497,10 @@ asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5,
|
|
/* Rewind */
|
|
/* Rewind */
|
|
regs->pc -= 2;
|
|
regs->pc -= 2;
|
|
|
|
|
|
|
|
+ if (notify_die(DIE_TRAP, regs, regs->tra & 0xff,
|
|
|
|
+ SIGTRAP) == NOTIFY_STOP)
|
|
|
|
+ return;
|
|
|
|
+
|
|
force_sig(SIGTRAP, current);
|
|
force_sig(SIGTRAP, current);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -511,6 +516,10 @@ asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5,
|
|
/* Rewind */
|
|
/* Rewind */
|
|
regs->pc -= 2;
|
|
regs->pc -= 2;
|
|
|
|
|
|
|
|
+ if (notify_die(DIE_TRAP, regs, TRAPA_BUG_OPCODE & 0xff,
|
|
|
|
+ SIGTRAP) == NOTIFY_STOP)
|
|
|
|
+ return;
|
|
|
|
+
|
|
#ifdef CONFIG_BUG
|
|
#ifdef CONFIG_BUG
|
|
if (__kernel_text_address(instruction_pointer(regs))) {
|
|
if (__kernel_text_address(instruction_pointer(regs))) {
|
|
u16 insn = *(u16 *)instruction_pointer(regs);
|
|
u16 insn = *(u16 *)instruction_pointer(regs);
|