diff options
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bd74fac169b..62ae8cad792 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -34,6 +34,8 @@ #include <linux/bug.h> #include <linux/kdebug.h> #include <linux/debugfs.h> +#include <linux/ltt-core.h> +#include <trace/trap.h> #include <asm/emulated_ops.h> #include <asm/pgtable.h> @@ -75,6 +77,12 @@ EXPORT_SYMBOL(__debugger_fault_handler); #endif /* + * Also used in time.c and fault.c. + */ +DEFINE_TRACE(trap_entry); +DEFINE_TRACE(trap_exit); + +/* * Trap & Exception support */ @@ -141,6 +149,10 @@ int die(const char *str, struct pt_regs *regs, long err) #ifdef CONFIG_NUMA printk("NUMA "); #endif +#ifdef CONFIG_LTT + printk("LTT NESTING LEVEL : %u ", __get_cpu_var(ltt_nesting)); + printk("\n"); +#endif printk("%s\n", ppc_md.name ? ppc_md.name : ""); sysfs_printk_last_file(); @@ -204,11 +216,14 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) addr, regs->nip, regs->link, code); } + trace_trap_entry(regs, regs->trap); + memset(&info, 0, sizeof(info)); info.si_signo = signr; info.si_code = code; info.si_addr = (void __user *) addr; force_sig_info(signr, &info, current); + trace_trap_exit(); } #ifdef CONFIG_PPC64 @@ -1087,7 +1102,9 @@ void performance_monitor_exception(struct pt_regs *regs) { __get_cpu_var(irq_stat).pmu_irqs++; + trace_trap_entry(regs, regs->trap); perf_irq(regs); + trace_trap_exit(); } #ifdef CONFIG_8xx @@ -1308,12 +1325,14 @@ void altivec_assist_exception(struct pt_regs *regs) /* got an error reading the instruction */ _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); } else { + trace_trap_entry(regs, regs->trap); /* didn't recognize the instruction */ /* XXX quick hack for now: set the non-Java bit in the VSCR */ if (printk_ratelimit()) printk(KERN_ERR "Unrecognized altivec instruction " "in %s at %lx\n", current->comm, regs->nip); current->thread.vscr.u[3] |= 0x10000; + trace_trap_exit(); } } #endif /* CONFIG_ALTIVEC */ |