Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8634/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

David Daney and committed by
Ralf Baechle
2707cd29 7d168923

+3 -1
+1
arch/mips/include/asm/fpu_emulator.h
··· 44 44 unsigned long ieee754_overflow; 45 45 unsigned long ieee754_zerodiv; 46 46 unsigned long ieee754_invalidop; 47 + unsigned long ds_emul; 47 48 }; 48 49 49 50 DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
+1 -1
arch/mips/math-emu/dsemul.c
··· 158 158 159 159 /* Set EPC to return to post-branch instruction */ 160 160 xcp->cp0_epc = epc; 161 - 161 + MIPS_FPU_EMU_INC_STATS(ds_emul); 162 162 return 1; 163 163 }
+1
arch/mips/math-emu/me-debugfs.c
··· 61 61 FPU_STAT_CREATE(ieee754_overflow); 62 62 FPU_STAT_CREATE(ieee754_zerodiv); 63 63 FPU_STAT_CREATE(ieee754_invalidop); 64 + FPU_STAT_CREATE(ds_emul); 64 65 65 66 return 0; 66 67 }