diff options
Diffstat (limited to 'drivers/oprofile/oprofile_files.c')
-rw-r--r-- | drivers/oprofile/oprofile_files.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index 241804abbb5c..cc106d503ace 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "event_buffer.h" | 13 | #include "event_buffer.h" |
14 | #include "oprofile_stats.h" | 14 | #include "oprofile_stats.h" |
15 | #include "oprof.h" | 15 | #include "oprof.h" |
16 | 16 | ||
17 | unsigned long fs_buffer_size = 131072; | 17 | unsigned long fs_buffer_size = 131072; |
18 | unsigned long fs_cpu_buffer_size = 8192; | 18 | unsigned long fs_cpu_buffer_size = 8192; |
19 | unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ | 19 | unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ |
@@ -49,7 +49,7 @@ static const struct file_operations depth_fops = { | |||
49 | .write = depth_write | 49 | .write = depth_write |
50 | }; | 50 | }; |
51 | 51 | ||
52 | 52 | ||
53 | static ssize_t pointer_size_read(struct file *file, char __user *buf, size_t count, loff_t *offset) | 53 | static ssize_t pointer_size_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
54 | { | 54 | { |
55 | return oprofilefs_ulong_to_user(sizeof(void *), buf, count, offset); | 55 | return oprofilefs_ulong_to_user(sizeof(void *), buf, count, offset); |
@@ -65,13 +65,13 @@ static ssize_t cpu_type_read(struct file *file, char __user *buf, size_t count, | |||
65 | { | 65 | { |
66 | return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset); | 66 | return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset); |
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
70 | static const struct file_operations cpu_type_fops = { | 70 | static const struct file_operations cpu_type_fops = { |
71 | .read = cpu_type_read, | 71 | .read = cpu_type_read, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | 74 | ||
75 | static ssize_t enable_read(struct file *file, char __user *buf, size_t count, loff_t *offset) | 75 | static ssize_t enable_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
76 | { | 76 | { |
77 | return oprofilefs_ulong_to_user(oprofile_started, buf, count, offset); | 77 | return oprofilefs_ulong_to_user(oprofile_started, buf, count, offset); |
@@ -89,7 +89,7 @@ static ssize_t enable_write(struct file *file, char const __user *buf, size_t co | |||
89 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 89 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
90 | if (retval) | 90 | if (retval) |
91 | return retval; | 91 | return retval; |
92 | 92 | ||
93 | if (val) | 93 | if (val) |
94 | retval = oprofile_start(); | 94 | retval = oprofile_start(); |
95 | else | 95 | else |
@@ -100,7 +100,7 @@ static ssize_t enable_write(struct file *file, char const __user *buf, size_t co | |||
100 | return count; | 100 | return count; |
101 | } | 101 | } |
102 | 102 | ||
103 | 103 | ||
104 | static const struct file_operations enable_fops = { | 104 | static const struct file_operations enable_fops = { |
105 | .read = enable_read, | 105 | .read = enable_read, |
106 | .write = enable_write, | 106 | .write = enable_write, |
@@ -117,7 +117,7 @@ static ssize_t dump_write(struct file *file, char const __user *buf, size_t coun | |||
117 | static const struct file_operations dump_fops = { | 117 | static const struct file_operations dump_fops = { |
118 | .write = dump_write, | 118 | .write = dump_write, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | void oprofile_create_files(struct super_block *sb, struct dentry *root) | 121 | void oprofile_create_files(struct super_block *sb, struct dentry *root) |
122 | { | 122 | { |
123 | oprofilefs_create_file(sb, root, "enable", &enable_fops); | 123 | oprofilefs_create_file(sb, root, "enable", &enable_fops); |
@@ -126,7 +126,7 @@ void oprofile_create_files(struct super_block *sb, struct dentry *root) | |||
126 | oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size); | 126 | oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size); |
127 | oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed); | 127 | oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed); |
128 | oprofilefs_create_ulong(sb, root, "cpu_buffer_size", &fs_cpu_buffer_size); | 128 | oprofilefs_create_ulong(sb, root, "cpu_buffer_size", &fs_cpu_buffer_size); |
129 | oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); | 129 | oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); |
130 | oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops); | 130 | oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops); |
131 | oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops); | 131 | oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops); |
132 | oprofile_create_stats_files(sb, root); | 132 | oprofile_create_stats_files(sb, root); |