diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-05-03 20:09:47 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-05-03 20:09:47 +0000 |
commit | e20d7226e0995c268ca3250acd6d1f63c84f7ea7 (patch) | |
tree | 8c4904b7debf80497384ddaf4f715350a39a05fd /arch/mips64 | |
parent | b664d53ebd9adfbfe2e6e10b2c21b58900dcca16 (diff) |
More low level debugging stuff that can be turned on with DEBUG_MIPS64.
Diffstat (limited to 'arch/mips64')
-rw-r--r-- | arch/mips64/kernel/r4k_genex.S | 8 | ||||
-rw-r--r-- | arch/mips64/kernel/r4k_tlb_glue.S | 8 | ||||
-rw-r--r-- | arch/mips64/mm/fault.c | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/arch/mips64/kernel/r4k_genex.S b/arch/mips64/kernel/r4k_genex.S index 834ea6c3c..b4ada3668 100644 --- a/arch/mips64/kernel/r4k_genex.S +++ b/arch/mips64/kernel/r4k_genex.S @@ -69,6 +69,14 @@ NESTED(handle_\exception, PT_SIZE, sp) .set noat SAVE_ALL +#if DEBUG_MIPS64 +jal dodebug2 +ld $4, PT_R4(sp) +ld $5, PT_R5(sp) +ld $6, PT_R6(sp) +ld $7, PT_R7(sp) +ld $2, PT_R2(sp) +#endif __BUILD_clear_\clear .set at __BUILD_\verbose \exception diff --git a/arch/mips64/kernel/r4k_tlb_glue.S b/arch/mips64/kernel/r4k_tlb_glue.S index 87b97d30d..7cf15443e 100644 --- a/arch/mips64/kernel/r4k_tlb_glue.S +++ b/arch/mips64/kernel/r4k_tlb_glue.S @@ -34,6 +34,14 @@ NESTED(__tlb_refill_debug_tramp, PT_SIZE, sp) .macro tlb_handler name interruptible NESTED(__\name, PT_SIZE, sp) SAVE_ALL +#if DEBUG_MIPS64 +jal dodebug2 +ld $4, PT_R4(sp) +ld $5, PT_R5(sp) +ld $6, PT_R6(sp) +ld $7, PT_R7(sp) +ld $2, PT_R2(sp) +#endif __BUILD_\interruptible dmfc0 t0, CP0_BADVADDR sd t0, PT_BVADDR(sp) diff --git a/arch/mips64/mm/fault.c b/arch/mips64/mm/fault.c index fcddf6fa5..f0e60a294 100644 --- a/arch/mips64/mm/fault.c +++ b/arch/mips64/mm/fault.c @@ -44,6 +44,19 @@ dodebug(abi64_no_regargs, struct pt_regs regs) printk("Got syscall %d, cpu %d proc %s:%d epc 0x%lx\n", regs.regs[2], smp_processor_id(), current->comm, current->pid, regs.cp0_epc); } +asmlinkage void +dodebug2(abi64_no_regargs, struct pt_regs regs) +{ + unsigned long retaddr; + + __asm__ __volatile__( + ".set noreorder\n\t" + "add %0,$0,$31\n\t" + ".set reorder" + : "=r" (retaddr)); + printk("Got exception 0x%lx at 0x%lx\n", retaddr, regs.cp0_epc); +} + /* * This routine handles page faults. It determines the address, * and the problem, and then passes it off to one of the appropriate |