This patch had fixed LTT for MIPS. This patch is only for 2.6.11-rc2-mm1. Yoichi
Signed-off-by: Yoichi Yuasa <[EMAIL PROTECTED]> diff -urN -X dontdiff a-orig/arch/mips/kernel/traps.c a/arch/mips/kernel/traps.c --- a-orig/arch/mips/kernel/traps.c Tue Jan 25 09:23:41 2005 +++ a/arch/mips/kernel/traps.c Wed Jan 26 01:32:27 2005 @@ -20,6 +20,7 @@ #include <linux/smp.h> #include <linux/smp_lock.h> #include <linux/spinlock.h> +#include <linux/unistd.h> #include <linux/kallsyms.h> #include <asm/bootinfo.h> @@ -226,7 +227,7 @@ printk("Cause : %08x\n", cause); - cause = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE; + cause = CAUSE_EXCCODE(cause); if (1 <= cause && cause <= 5) printk("BadVA : %0*lx\n", field, regs->cp0_badvaddr); @@ -502,7 +503,7 @@ */ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) { - ltt_ev_trap_entry(CAUSE_EXCCODE(regs), CAUSE_EPC(regs)); + ltt_ev_trap_entry(CAUSE_EXCCODE(regs->cp0_cause), regs->cp0_epc); if (fcr31 & FPU_CSR_UNI_X) { int sig; @@ -642,7 +643,7 @@ die_if_kernel("do_cpu invoked from kernel context!", regs); - ltt_ev_trap_entry(CAUSE_EXCCODE(regs), CAUSE_EPC(regs)); + ltt_ev_trap_entry(CAUSE_EXCCODE(regs->cp0_cause), regs->cp0_epc); cpid = (regs->cp0_cause >> CAUSEB_CE) & 3; @@ -1091,8 +1092,8 @@ if (!user_mode(regs)) goto trace_syscall_end; - if (trace_get_config(&use_depth, &use_bounds, &seek_depth, - (void*)&lower_bound, (void*)&upper_bound) < 0) + if (ltt_get_trace_config(&use_depth, &use_bounds, &seek_depth, + (void*)&lower_bound, (void*)&upper_bound) < 0) goto trace_syscall_end; /* Heuristic that might work: @@ -1124,12 +1125,12 @@ } trace_syscall_end: - trace_event(LTT_EV_SYSCALL_ENTRY, &trace_syscall_event); + ltt_log_event(LTT_EV_SYSCALL_ENTRY, &trace_syscall_event); } asmlinkage void trace_real_syscall_exit(void) { - trace_event(LTT_EV_SYSCALL_EXIT, NULL); + ltt_log_event(LTT_EV_SYSCALL_EXIT, NULL); } #endif /* (CONFIG_LTT) */ diff -urN -X dontdiff a-orig/arch/mips/kernel/unaligned.c a/arch/mips/kernel/unaligned.c --- a-orig/arch/mips/kernel/unaligned.c Tue Jan 25 09:23:41 2005 +++ a/arch/mips/kernel/unaligned.c Wed Jan 26 01:33:12 2005 @@ -498,7 +498,7 @@ mm_segment_t seg; unsigned long pc; - ltt_ev_trap_entry(CAUSE_EXCCODE(regs), CAUSE_EPC(regs)); + ltt_ev_trap_entry(CAUSE_EXCCODE(regs->cp0_cause), regs->cp0_epc); /* * Address errors may be deliberately induced by the FPU emulator to diff -urN -X dontdiff a-orig/arch/mips/mm/fault.c a/arch/mips/mm/fault.c --- a-orig/arch/mips/mm/fault.c Tue Jan 25 09:23:41 2005 +++ a/arch/mips/mm/fault.c Wed Jan 26 01:33:48 2005 @@ -61,7 +61,7 @@ if (unlikely(address >= VMALLOC_START)) goto vmalloc_fault; - ltt_ev_trap_entry(CAUSE_EXCCODE(regs), CAUSE_EPC(regs)); + ltt_ev_trap_entry(CAUSE_EXCCODE(regs->cp0_cause), regs->cp0_epc); /* * If we're in an interrupt or have no user diff -urN -X dontdiff a-orig/include/asm-mips/mipsregs.h a/include/asm-mips/mipsregs.h --- a-orig/include/asm-mips/mipsregs.h Sat Jan 22 10:48:03 2005 +++ a/include/asm-mips/mipsregs.h Wed Jan 26 01:35:27 2005 @@ -369,6 +369,7 @@ */ #define CAUSEB_EXCCODE 2 #define CAUSEF_EXCCODE (_ULCAST_(31) << 2) +#define CAUSE_EXCCODE(cause) (((cause) & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE) #define CAUSEB_IP 8 #define CAUSEF_IP (_ULCAST_(255) << 8) #define CAUSEB_IP0 8 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/