spinlock_test.c (da733563be5a9da26fe81d9f007262d00b846e22) spinlock_test.c (75dcfc1d678d76a82288c043bfd5bfc0fbd43b49)
1#include <linux/init.h>
2#include <linux/kthread.h>
3#include <linux/hrtimer.h>
4#include <linux/fs.h>
5#include <linux/debugfs.h>
6#include <linux/export.h>
7#include <linux/spinlock.h>
1#include <linux/init.h>
2#include <linux/kthread.h>
3#include <linux/hrtimer.h>
4#include <linux/fs.h>
5#include <linux/debugfs.h>
6#include <linux/export.h>
7#include <linux/spinlock.h>
8#include <asm/debug.h>
8
9
9
10static int ss_get(void *data, u64 *val)
11{
12 ktime_t start, finish;
13 int loops;
14 int cont;
15 DEFINE_RAW_SPINLOCK(ss_spin);
16
17 loops = 1000000;

--- 92 unchanged lines hidden (view full) ---

110
111 *val = ktime_us_delta(finish, t1.start);
112
113 return 0;
114}
115
116DEFINE_SIMPLE_ATTRIBUTE(fops_multi, multi_get, NULL, "%llu\n");
117
10static int ss_get(void *data, u64 *val)
11{
12 ktime_t start, finish;
13 int loops;
14 int cont;
15 DEFINE_RAW_SPINLOCK(ss_spin);
16
17 loops = 1000000;

--- 92 unchanged lines hidden (view full) ---

110
111 *val = ktime_us_delta(finish, t1.start);
112
113 return 0;
114}
115
116DEFINE_SIMPLE_ATTRIBUTE(fops_multi, multi_get, NULL, "%llu\n");
117
118
119extern struct dentry *mips_debugfs_dir;
120static int __init spinlock_test(void)
121{
122 struct dentry *d;
123
124 if (!mips_debugfs_dir)
125 return -ENODEV;
126
127 d = debugfs_create_file("spin_single", S_IRUGO,

--- 14 unchanged lines hidden ---
118static int __init spinlock_test(void)
119{
120 struct dentry *d;
121
122 if (!mips_debugfs_dir)
123 return -ENODEV;
124
125 d = debugfs_create_file("spin_single", S_IRUGO,

--- 14 unchanged lines hidden ---