MIPS: math-emu: Add FP emu debugfs clear functionality
authorAleksandar Markovic <[email protected]>
Mon, 21 Aug 2017 12:24:51 +0000 (14:24 +0200)
committerRalf Baechle <[email protected]>
Tue, 29 Aug 2017 13:21:57 +0000 (15:21 +0200)
commit25ad8db632ec54c60daad9107ddf25a2a608a450
tree51efd0b8e1eb701820e6081dabeda8988bd610c4
parentae5f3f5b81dd2c776f0ad49d6d121ce1255b35eb
MIPS: math-emu: Add FP emu debugfs clear functionality

Add capability for the user to clear all FP emu debugfs counters.

This is achieved by having a special debugfs file "fpuemustats_clear"
(under default location "/sys/kernel/debug/mips"). Each access to the
file results in setting all counters to zero (it is enough, let's say,
to issue a "cat /sys/kernel/debug/mips/fpuemustats_clear").

This functionality already exists for R2 emulation statistics,
but was missing for FP emulation statistics. The implementation in
this patch is consistent with its R2 emulation counterpart.

Signed-off-by: Miodrag Dinic <[email protected]>
Signed-off-by: Goran Ferenc <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Cc: Douglas Leung <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Petar Jovanovic <[email protected]>
Cc: Raghu Gandham <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/17144/
Signed-off-by: Ralf Baechle <[email protected]>
arch/mips/math-emu/me-debugfs.c