diff options
author | Robert Richter <robert.richter@amd.com> | 2008-09-24 05:08:52 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2008-09-24 05:08:52 -0400 |
commit | 4c168eaf7ea39f25a45a3d8c7eebc3fedb633a1d (patch) | |
tree | 315bb66a3ce2e752749a780876e2b7b5f6a596de /drivers/oprofile/oprofile_files.c | |
parent | 45f197ade73ba95681b9803680c75352fc0a1c0a (diff) |
Revert "Oprofile Multiplexing Patch"
Reverting commit 1a960b402a51d80abf54e3f8e4972374ffe5f22d for the main
branch. Multiplexing will be tracked on a separate feature branch.
Conflicts:
arch/x86/oprofile/nmi_int.c
Diffstat (limited to 'drivers/oprofile/oprofile_files.c')
-rw-r--r-- | drivers/oprofile/oprofile_files.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index cc4f5a1f8ef2..ef953ba5ab6b 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c | |||
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/oprofile.h> | 11 | #include <linux/oprofile.h> |
12 | #include <linux/jiffies.h> | ||
13 | 12 | ||
14 | #include "event_buffer.h" | 13 | #include "event_buffer.h" |
15 | #include "oprofile_stats.h" | 14 | #include "oprofile_stats.h" |
@@ -19,40 +18,6 @@ unsigned long fs_buffer_size = 131072; | |||
19 | unsigned long fs_cpu_buffer_size = 8192; | 18 | unsigned long fs_cpu_buffer_size = 8192; |
20 | unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ | 19 | unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ |
21 | 20 | ||
22 | static ssize_t timeout_read(struct file *file, char __user *buf, | ||
23 | size_t count, loff_t *offset) | ||
24 | { | ||
25 | return oprofilefs_ulong_to_user(jiffies_to_msecs(timeout_jiffies), | ||
26 | buf, count, offset); | ||
27 | } | ||
28 | |||
29 | |||
30 | static ssize_t timeout_write(struct file *file, char const __user *buf, | ||
31 | size_t count, loff_t *offset) | ||
32 | { | ||
33 | unsigned long val; | ||
34 | int retval; | ||
35 | |||
36 | if (*offset) | ||
37 | return -EINVAL; | ||
38 | |||
39 | retval = oprofilefs_ulong_from_user(&val, buf, count); | ||
40 | if (retval) | ||
41 | return retval; | ||
42 | |||
43 | retval = oprofile_set_timeout(val); | ||
44 | |||
45 | if (retval) | ||
46 | return retval; | ||
47 | return count; | ||
48 | } | ||
49 | |||
50 | static const struct file_operations timeout_fops = { | ||
51 | .read = timeout_read, | ||
52 | .write = timeout_write, | ||
53 | }; | ||
54 | |||
55 | |||
56 | static ssize_t depth_read(struct file * file, char __user * buf, size_t count, loff_t * offset) | 21 | static ssize_t depth_read(struct file * file, char __user * buf, size_t count, loff_t * offset) |
57 | { | 22 | { |
58 | return oprofilefs_ulong_to_user(backtrace_depth, buf, count, offset); | 23 | return oprofilefs_ulong_to_user(backtrace_depth, buf, count, offset); |
@@ -120,10 +85,11 @@ static ssize_t enable_write(struct file * file, char const __user * buf, size_t | |||
120 | 85 | ||
121 | if (*offset) | 86 | if (*offset) |
122 | return -EINVAL; | 87 | return -EINVAL; |
88 | |||
123 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 89 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
124 | if (retval) | 90 | if (retval) |
125 | return retval; | 91 | return retval; |
126 | 92 | ||
127 | if (val) | 93 | if (val) |
128 | retval = oprofile_start(); | 94 | retval = oprofile_start(); |
129 | else | 95 | else |
@@ -163,7 +129,6 @@ void oprofile_create_files(struct super_block * sb, struct dentry * root) | |||
163 | oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); | 129 | oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); |
164 | oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops); | 130 | oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops); |
165 | oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops); | 131 | oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops); |
166 | oprofilefs_create_file(sb, root, "timeout_ms", &timeout_fops); | ||
167 | oprofile_create_stats_files(sb, root); | 132 | oprofile_create_stats_files(sb, root); |
168 | if (oprofile_ops.create_files) | 133 | if (oprofile_ops.create_files) |
169 | oprofile_ops.create_files(sb, root); | 134 | oprofile_ops.create_files(sb, root); |