diff options
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
-rw-r--r-- | arch/mips/kernel/unaligned.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 33d5a5ce4a29..cfea1adfa153 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
@@ -78,6 +78,8 @@ | |||
78 | #include <linux/smp.h> | 78 | #include <linux/smp.h> |
79 | #include <linux/sched.h> | 79 | #include <linux/sched.h> |
80 | #include <linux/debugfs.h> | 80 | #include <linux/debugfs.h> |
81 | #include <linux/perf_event.h> | ||
82 | |||
81 | #include <asm/asm.h> | 83 | #include <asm/asm.h> |
82 | #include <asm/branch.h> | 84 | #include <asm/branch.h> |
83 | #include <asm/byteorder.h> | 85 | #include <asm/byteorder.h> |
@@ -109,6 +111,9 @@ static void emulate_load_store_insn(struct pt_regs *regs, | |||
109 | unsigned long value; | 111 | unsigned long value; |
110 | unsigned int res; | 112 | unsigned int res; |
111 | 113 | ||
114 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, | ||
115 | 1, 0, regs, 0); | ||
116 | |||
112 | /* | 117 | /* |
113 | * This load never faults. | 118 | * This load never faults. |
114 | */ | 119 | */ |
@@ -511,6 +516,8 @@ asmlinkage void do_ade(struct pt_regs *regs) | |||
511 | unsigned int __user *pc; | 516 | unsigned int __user *pc; |
512 | mm_segment_t seg; | 517 | mm_segment_t seg; |
513 | 518 | ||
519 | perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, | ||
520 | 1, 0, regs, regs->cp0_badvaddr); | ||
514 | /* | 521 | /* |
515 | * Did we catch a fault trying to load an instruction? | 522 | * Did we catch a fault trying to load an instruction? |
516 | * Or are we running in MIPS16 mode? | 523 | * Or are we running in MIPS16 mode? |