summaryrefslogtreecommitdiffstats
path: root/arch/sh/math-emu
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-13 06:55:26 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-10-13 06:55:26 +0900
commitace2dc7d12693545b67f15ab8cdb3d255c937713 (patch)
tree18fa828ebe254e0137ec96a9e1cd4e146c6a7119 /arch/sh/math-emu
parent5a30d7bfcd33c03f1f67d3e1c317eb5d6a6bc811 (diff)
downloadop-kernel-dev-ace2dc7d12693545b67f15ab8cdb3d255c937713.zip
op-kernel-dev-ace2dc7d12693545b67f15ab8cdb3d255c937713.tar.gz
sh: wire up perf alignment and emulation faults.
This plugs in the alignment and emulation fault reporting for perf sw events. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/math-emu')
-rw-r--r--arch/sh/math-emu/math.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
index 1fcdb12..f76a509 100644
--- a/arch/sh/math-emu/math.c
+++ b/arch/sh/math-emu/math.c
@@ -12,6 +12,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/signal.h>
+#include <linux/perf_event.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@ -619,6 +620,8 @@ int do_fpu_inst(unsigned short inst, struct pt_regs *regs)
struct task_struct *tsk = current;
struct sh_fpu_soft_struct *fpu = &(tsk->thread.xstate->softfpu);
+ perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
+
if (!(task_thread_info(tsk)->status & TS_USEDFPU)) {
/* initialize once. */
fpu_init(fpu);
OpenPOWER on IntegriCloud