Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58669
b: refs/heads/master
c: 83fd38c
h: refs/heads/master
i:
  58667: 87cfa7d
v: v3
  • Loading branch information
Atsushi Nemoto authored and Ralf Baechle committed Jul 10, 2007
1 parent e39e533 commit 4508a2d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6312e0ee45236b6882cd26b2ccc167b1b91646fc
refs/heads/master: 83fd38cabc982db041d3586a15734713f45caa31
34 changes: 34 additions & 0 deletions trunk/arch/mips/math-emu/cp1emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* better performance by compiling with -msoft-float!
*/
#include <linux/sched.h>
#include <linux/debugfs.h>

#include <asm/inst.h>
#include <asm/bootinfo.h>
Expand Down Expand Up @@ -1277,3 +1278,36 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,

return sig;
}

#ifdef CONFIG_DEBUG_FS
extern struct dentry *mips_debugfs_dir;
static int __init debugfs_fpuemu(void)
{
struct dentry *d, *dir;
int i;
static struct {
const char *name;
unsigned int *v;
} vars[] __initdata = {
{ "emulated", &fpuemustats.emulated },
{ "loads", &fpuemustats.loads },
{ "stores", &fpuemustats.stores },
{ "cp1ops", &fpuemustats.cp1ops },
{ "cp1xops", &fpuemustats.cp1xops },
{ "errors", &fpuemustats.errors },
};

if (!mips_debugfs_dir)
return -ENODEV;
dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
if (IS_ERR(dir))
return PTR_ERR(dir);
for (i = 0; i < ARRAY_SIZE(vars); i++) {
d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v);
if (IS_ERR(d))
return PTR_ERR(d);
}
return 0;
}
__initcall(debugfs_fpuemu);
#endif

0 comments on commit 4508a2d

Please sign in to comment.