Commit 2707cd29 authored by David Daney's avatar David Daney Committed by Ralf Baechle

MIPS: Add FPU emulator counter for emulated delay slots.

Delay slot emulation in the FPU emulator is the only kernel user of an
executable stack, it is also very slow.  Add a counter so we can see
how many of these emulations are done.
Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8634/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 7d168923
...@@ -44,6 +44,7 @@ struct mips_fpu_emulator_stats { ...@@ -44,6 +44,7 @@ struct mips_fpu_emulator_stats {
unsigned long ieee754_overflow; unsigned long ieee754_overflow;
unsigned long ieee754_zerodiv; unsigned long ieee754_zerodiv;
unsigned long ieee754_invalidop; unsigned long ieee754_invalidop;
unsigned long ds_emul;
}; };
DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats); DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
......
...@@ -158,6 +158,6 @@ int do_dsemulret(struct pt_regs *xcp) ...@@ -158,6 +158,6 @@ int do_dsemulret(struct pt_regs *xcp)
/* Set EPC to return to post-branch instruction */ /* Set EPC to return to post-branch instruction */
xcp->cp0_epc = epc; xcp->cp0_epc = epc;
MIPS_FPU_EMU_INC_STATS(ds_emul);
return 1; return 1;
} }
...@@ -61,6 +61,7 @@ do { \ ...@@ -61,6 +61,7 @@ do { \
FPU_STAT_CREATE(ieee754_overflow); FPU_STAT_CREATE(ieee754_overflow);
FPU_STAT_CREATE(ieee754_zerodiv); FPU_STAT_CREATE(ieee754_zerodiv);
FPU_STAT_CREATE(ieee754_invalidop); FPU_STAT_CREATE(ieee754_invalidop);
FPU_STAT_CREATE(ds_emul);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment