aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/oprofile/buffer_sync.h4
-rw-r--r--drivers/oprofile/cpu_buffer.c16
-rw-r--r--drivers/oprofile/cpu_buffer.h6
-rw-r--r--drivers/oprofile/event_buffer.c24
-rw-r--r--drivers/oprofile/event_buffer.h10
-rw-r--r--drivers/oprofile/oprof.c2
-rw-r--r--drivers/oprofile/oprof.h8
-rw-r--r--drivers/oprofile/oprofile_files.c20
-rw-r--r--drivers/oprofile/oprofile_stats.c14
-rw-r--r--drivers/oprofile/oprofile_stats.h8
-rw-r--r--drivers/oprofile/oprofilefs.c6
-rw-r--r--drivers/oprofile/timer_int.c2
12 files changed, 60 insertions, 60 deletions
diff --git a/drivers/oprofile/buffer_sync.h b/drivers/oprofile/buffer_sync.h
index 08866f6a96a3..3110732c1835 100644
--- a/drivers/oprofile/buffer_sync.h
+++ b/drivers/oprofile/buffer_sync.h
@@ -9,13 +9,13 @@
9 9
10#ifndef OPROFILE_BUFFER_SYNC_H 10#ifndef OPROFILE_BUFFER_SYNC_H
11#define OPROFILE_BUFFER_SYNC_H 11#define OPROFILE_BUFFER_SYNC_H
12 12
13/* add the necessary profiling hooks */ 13/* add the necessary profiling hooks */
14int sync_start(void); 14int sync_start(void);
15 15
16/* remove the hooks */ 16/* remove the hooks */
17void sync_stop(void); 17void sync_stop(void);
18 18
19/* sync the given CPU's buffer */ 19/* sync the given CPU's buffer */
20void sync_buffer(int cpu); 20void sync_buffer(int cpu);
21 21
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index b47ce038490f..5a178065cfa0 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -22,7 +22,7 @@
22#include <linux/oprofile.h> 22#include <linux/oprofile.h>
23#include <linux/vmalloc.h> 23#include <linux/vmalloc.h>
24#include <linux/errno.h> 24#include <linux/errno.h>
25 25
26#include "event_buffer.h" 26#include "event_buffer.h"
27#include "cpu_buffer.h" 27#include "cpu_buffer.h"
28#include "buffer_sync.h" 28#include "buffer_sync.h"
@@ -38,7 +38,7 @@ static int work_enabled;
38void free_cpu_buffers(void) 38void free_cpu_buffers(void)
39{ 39{
40 int i; 40 int i;
41 41
42 for_each_online_cpu(i) { 42 for_each_online_cpu(i) {
43 vfree(per_cpu(cpu_buffer, i).buffer); 43 vfree(per_cpu(cpu_buffer, i).buffer);
44 per_cpu(cpu_buffer, i).buffer = NULL; 44 per_cpu(cpu_buffer, i).buffer = NULL;
@@ -48,17 +48,17 @@ void free_cpu_buffers(void)
48int alloc_cpu_buffers(void) 48int alloc_cpu_buffers(void)
49{ 49{
50 int i; 50 int i;
51 51
52 unsigned long buffer_size = fs_cpu_buffer_size; 52 unsigned long buffer_size = fs_cpu_buffer_size;
53 53
54 for_each_online_cpu(i) { 54 for_each_online_cpu(i) {
55 struct oprofile_cpu_buffer *b = &per_cpu(cpu_buffer, i); 55 struct oprofile_cpu_buffer *b = &per_cpu(cpu_buffer, i);
56 56
57 b->buffer = vmalloc_node(sizeof(struct op_sample) * buffer_size, 57 b->buffer = vmalloc_node(sizeof(struct op_sample) * buffer_size,
58 cpu_to_node(i)); 58 cpu_to_node(i));
59 if (!b->buffer) 59 if (!b->buffer)
60 goto fail; 60 goto fail;
61 61
62 b->last_task = NULL; 62 b->last_task = NULL;
63 b->last_is_kernel = -1; 63 b->last_is_kernel = -1;
64 b->tracing = 0; 64 b->tracing = 0;
@@ -150,7 +150,7 @@ static void increment_head(struct oprofile_cpu_buffer *b)
150 150
151static inline void 151static inline void
152add_sample(struct oprofile_cpu_buffer *cpu_buf, 152add_sample(struct oprofile_cpu_buffer *cpu_buf,
153 unsigned long pc, unsigned long event) 153 unsigned long pc, unsigned long event)
154{ 154{
155 struct op_sample *entry = &cpu_buf->buffer[cpu_buf->head_pos]; 155 struct op_sample *entry = &cpu_buf->buffer[cpu_buf->head_pos];
156 entry->eip = pc; 156 entry->eip = pc;
@@ -205,7 +205,7 @@ static int log_sample(struct oprofile_cpu_buffer *cpu_buf, unsigned long pc,
205 cpu_buf->last_task = task; 205 cpu_buf->last_task = task;
206 add_code(cpu_buf, (unsigned long)task); 206 add_code(cpu_buf, (unsigned long)task);
207 } 207 }
208 208
209 add_sample(cpu_buf, pc, event); 209 add_sample(cpu_buf, pc, event);
210 return 1; 210 return 1;
211} 211}
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h
index 9bc6bb20b6df..d3cc26264db5 100644
--- a/drivers/oprofile/cpu_buffer.h
+++ b/drivers/oprofile/cpu_buffer.h
@@ -15,9 +15,9 @@
15#include <linux/workqueue.h> 15#include <linux/workqueue.h>
16#include <linux/cache.h> 16#include <linux/cache.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18 18
19struct task_struct; 19struct task_struct;
20 20
21int alloc_cpu_buffers(void); 21int alloc_cpu_buffers(void);
22void free_cpu_buffers(void); 22void free_cpu_buffers(void);
23 23
@@ -31,7 +31,7 @@ struct op_sample {
31 unsigned long eip; 31 unsigned long eip;
32 unsigned long event; 32 unsigned long event;
33}; 33};
34 34
35struct oprofile_cpu_buffer { 35struct oprofile_cpu_buffer {
36 volatile unsigned long head_pos; 36 volatile unsigned long head_pos;
37 volatile unsigned long tail_pos; 37 volatile unsigned long tail_pos;
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c
index c9329f4e090f..d962ba0dd87a 100644
--- a/drivers/oprofile/event_buffer.c
+++ b/drivers/oprofile/event_buffer.c
@@ -19,13 +19,13 @@
19#include <linux/dcookies.h> 19#include <linux/dcookies.h>
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <asm/uaccess.h> 21#include <asm/uaccess.h>
22 22
23#include "oprof.h" 23#include "oprof.h"
24#include "event_buffer.h" 24#include "event_buffer.h"
25#include "oprofile_stats.h" 25#include "oprofile_stats.h"
26 26
27DEFINE_MUTEX(buffer_mutex); 27DEFINE_MUTEX(buffer_mutex);
28 28
29static unsigned long buffer_opened; 29static unsigned long buffer_opened;
30static DECLARE_WAIT_QUEUE_HEAD(buffer_wait); 30static DECLARE_WAIT_QUEUE_HEAD(buffer_wait);
31static unsigned long *event_buffer; 31static unsigned long *event_buffer;
@@ -66,7 +66,7 @@ void wake_up_buffer_waiter(void)
66 mutex_unlock(&buffer_mutex); 66 mutex_unlock(&buffer_mutex);
67} 67}
68 68
69 69
70int alloc_event_buffer(void) 70int alloc_event_buffer(void)
71{ 71{
72 int err = -ENOMEM; 72 int err = -ENOMEM;
@@ -76,13 +76,13 @@ int alloc_event_buffer(void)
76 buffer_size = fs_buffer_size; 76 buffer_size = fs_buffer_size;
77 buffer_watershed = fs_buffer_watershed; 77 buffer_watershed = fs_buffer_watershed;
78 spin_unlock_irqrestore(&oprofilefs_lock, flags); 78 spin_unlock_irqrestore(&oprofilefs_lock, flags);
79 79
80 if (buffer_watershed >= buffer_size) 80 if (buffer_watershed >= buffer_size)
81 return -EINVAL; 81 return -EINVAL;
82 82
83 event_buffer = vmalloc(sizeof(unsigned long) * buffer_size); 83 event_buffer = vmalloc(sizeof(unsigned long) * buffer_size);
84 if (!event_buffer) 84 if (!event_buffer)
85 goto out; 85 goto out;
86 86
87 err = 0; 87 err = 0;
88out: 88out:
@@ -97,7 +97,7 @@ void free_event_buffer(void)
97 event_buffer = NULL; 97 event_buffer = NULL;
98} 98}
99 99
100 100
101static int event_buffer_open(struct inode *inode, struct file *file) 101static int event_buffer_open(struct inode *inode, struct file *file)
102{ 102{
103 int err = -EPERM; 103 int err = -EPERM;
@@ -116,14 +116,14 @@ static int event_buffer_open(struct inode *inode, struct file *file)
116 file->private_data = dcookie_register(); 116 file->private_data = dcookie_register();
117 if (!file->private_data) 117 if (!file->private_data)
118 goto out; 118 goto out;
119 119
120 if ((err = oprofile_setup())) 120 if ((err = oprofile_setup()))
121 goto fail; 121 goto fail;
122 122
123 /* NB: the actual start happens from userspace 123 /* NB: the actual start happens from userspace
124 * echo 1 >/dev/oprofile/enable 124 * echo 1 >/dev/oprofile/enable
125 */ 125 */
126 126
127 return 0; 127 return 0;
128 128
129fail: 129fail:
@@ -172,18 +172,18 @@ static ssize_t event_buffer_read(struct file *file, char __user *buf,
172 retval = -EFAULT; 172 retval = -EFAULT;
173 173
174 count = buffer_pos * sizeof(unsigned long); 174 count = buffer_pos * sizeof(unsigned long);
175 175
176 if (copy_to_user(buf, event_buffer, count)) 176 if (copy_to_user(buf, event_buffer, count))
177 goto out; 177 goto out;
178 178
179 retval = count; 179 retval = count;
180 buffer_pos = 0; 180 buffer_pos = 0;
181 181
182out: 182out:
183 mutex_unlock(&buffer_mutex); 183 mutex_unlock(&buffer_mutex);
184 return retval; 184 return retval;
185} 185}
186 186
187const struct file_operations event_buffer_fops = { 187const struct file_operations event_buffer_fops = {
188 .open = event_buffer_open, 188 .open = event_buffer_open,
189 .release = event_buffer_release, 189 .release = event_buffer_release,
diff --git a/drivers/oprofile/event_buffer.h b/drivers/oprofile/event_buffer.h
index 5076ed1ebd8f..00db2e665708 100644
--- a/drivers/oprofile/event_buffer.h
+++ b/drivers/oprofile/event_buffer.h
@@ -10,13 +10,13 @@
10#ifndef EVENT_BUFFER_H 10#ifndef EVENT_BUFFER_H
11#define EVENT_BUFFER_H 11#define EVENT_BUFFER_H
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <asm/mutex.h> 14#include <asm/mutex.h>
15 15
16int alloc_event_buffer(void); 16int alloc_event_buffer(void);
17 17
18void free_event_buffer(void); 18void free_event_buffer(void);
19 19
20/* wake up the process sleeping on the event file */ 20/* wake up the process sleeping on the event file */
21void wake_up_buffer_waiter(void); 21void wake_up_buffer_waiter(void);
22 22
@@ -24,10 +24,10 @@ void wake_up_buffer_waiter(void);
24#define NO_COOKIE 0UL 24#define NO_COOKIE 0UL
25 25
26extern const struct file_operations event_buffer_fops; 26extern const struct file_operations event_buffer_fops;
27 27
28/* mutex between sync_cpu_buffers() and the 28/* mutex between sync_cpu_buffers() and the
29 * file reading code. 29 * file reading code.
30 */ 30 */
31extern struct mutex buffer_mutex; 31extern struct mutex buffer_mutex;
32 32
33#endif /* EVENT_BUFFER_H */ 33#endif /* EVENT_BUFFER_H */
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index 50062cea292c..cd375907f26f 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -94,7 +94,7 @@ int oprofile_start(void)
94 int err = -EINVAL; 94 int err = -EINVAL;
95 95
96 mutex_lock(&start_mutex); 96 mutex_lock(&start_mutex);
97 97
98 if (!is_setup) 98 if (!is_setup)
99 goto out; 99 goto out;
100 100
diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h
index 7a44ddba0beb..5df0c21a608f 100644
--- a/drivers/oprofile/oprof.h
+++ b/drivers/oprofile/oprof.h
@@ -11,7 +11,7 @@
11#define OPROF_H 11#define OPROF_H
12 12
13int oprofile_setup(void); 13int oprofile_setup(void);
14void oprofile_shutdown(void); 14void oprofile_shutdown(void);
15 15
16int oprofilefs_register(void); 16int oprofilefs_register(void);
17void oprofilefs_unregister(void); 17void oprofilefs_unregister(void);
@@ -20,14 +20,14 @@ int oprofile_start(void);
20void oprofile_stop(void); 20void oprofile_stop(void);
21 21
22struct oprofile_operations; 22struct oprofile_operations;
23 23
24extern unsigned long fs_buffer_size; 24extern unsigned long fs_buffer_size;
25extern unsigned long fs_cpu_buffer_size; 25extern unsigned long fs_cpu_buffer_size;
26extern unsigned long fs_buffer_watershed; 26extern unsigned long fs_buffer_watershed;
27extern struct oprofile_operations oprofile_ops; 27extern struct oprofile_operations oprofile_ops;
28extern unsigned long oprofile_started; 28extern unsigned long oprofile_started;
29extern unsigned long backtrace_depth; 29extern unsigned long backtrace_depth;
30 30
31struct super_block; 31struct super_block;
32struct dentry; 32struct dentry;
33 33
@@ -35,5 +35,5 @@ void oprofile_create_files(struct super_block *sb, struct dentry *root);
35void oprofile_timer_init(struct oprofile_operations *ops); 35void oprofile_timer_init(struct oprofile_operations *ops);
36 36
37int oprofile_set_backtrace(unsigned long depth); 37int oprofile_set_backtrace(unsigned long depth);
38 38
39#endif /* OPROF_H */ 39#endif /* OPROF_H */
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
17unsigned long fs_buffer_size = 131072; 17unsigned long fs_buffer_size = 131072;
18unsigned long fs_cpu_buffer_size = 8192; 18unsigned long fs_cpu_buffer_size = 8192;
19unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ 19unsigned 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
53static ssize_t pointer_size_read(struct file *file, char __user *buf, size_t count, loff_t *offset) 53static 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
70static const struct file_operations cpu_type_fops = { 70static const struct file_operations cpu_type_fops = {
71 .read = cpu_type_read, 71 .read = cpu_type_read,
72}; 72};
73 73
74 74
75static ssize_t enable_read(struct file *file, char __user *buf, size_t count, loff_t *offset) 75static 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
104static const struct file_operations enable_fops = { 104static 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
117static const struct file_operations dump_fops = { 117static const struct file_operations dump_fops = {
118 .write = dump_write, 118 .write = dump_write,
119}; 119};
120 120
121void oprofile_create_files(struct super_block *sb, struct dentry *root) 121void 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);
diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
index e0c45498d175..e1f6ce03705e 100644
--- a/drivers/oprofile/oprofile_stats.c
+++ b/drivers/oprofile/oprofile_stats.c
@@ -11,17 +11,17 @@
11#include <linux/smp.h> 11#include <linux/smp.h>
12#include <linux/cpumask.h> 12#include <linux/cpumask.h>
13#include <linux/threads.h> 13#include <linux/threads.h>
14 14
15#include "oprofile_stats.h" 15#include "oprofile_stats.h"
16#include "cpu_buffer.h" 16#include "cpu_buffer.h"
17 17
18struct oprofile_stat_struct oprofile_stats; 18struct oprofile_stat_struct oprofile_stats;
19 19
20void oprofile_reset_stats(void) 20void oprofile_reset_stats(void)
21{ 21{
22 struct oprofile_cpu_buffer *cpu_buf; 22 struct oprofile_cpu_buffer *cpu_buf;
23 int i; 23 int i;
24 24
25 for_each_possible_cpu(i) { 25 for_each_possible_cpu(i) {
26 cpu_buf = &per_cpu(cpu_buffer, i); 26 cpu_buf = &per_cpu(cpu_buffer, i);
27 cpu_buf->sample_received = 0; 27 cpu_buf->sample_received = 0;
@@ -29,7 +29,7 @@ void oprofile_reset_stats(void)
29 cpu_buf->backtrace_aborted = 0; 29 cpu_buf->backtrace_aborted = 0;
30 cpu_buf->sample_invalid_eip = 0; 30 cpu_buf->sample_invalid_eip = 0;
31 } 31 }
32 32
33 atomic_set(&oprofile_stats.sample_lost_no_mm, 0); 33 atomic_set(&oprofile_stats.sample_lost_no_mm, 0);
34 atomic_set(&oprofile_stats.sample_lost_no_mapping, 0); 34 atomic_set(&oprofile_stats.sample_lost_no_mapping, 0);
35 atomic_set(&oprofile_stats.event_lost_overflow, 0); 35 atomic_set(&oprofile_stats.event_lost_overflow, 0);
@@ -52,7 +52,7 @@ void oprofile_create_stats_files(struct super_block *sb, struct dentry *root)
52 cpu_buf = &per_cpu(cpu_buffer, i); 52 cpu_buf = &per_cpu(cpu_buffer, i);
53 snprintf(buf, 10, "cpu%d", i); 53 snprintf(buf, 10, "cpu%d", i);
54 cpudir = oprofilefs_mkdir(sb, dir, buf); 54 cpudir = oprofilefs_mkdir(sb, dir, buf);
55 55
56 /* Strictly speaking access to these ulongs is racy, 56 /* Strictly speaking access to these ulongs is racy,
57 * but we can't simply lock them, and they are 57 * but we can't simply lock them, and they are
58 * informational only. 58 * informational only.
@@ -66,7 +66,7 @@ void oprofile_create_stats_files(struct super_block *sb, struct dentry *root)
66 oprofilefs_create_ro_ulong(sb, cpudir, "sample_invalid_eip", 66 oprofilefs_create_ro_ulong(sb, cpudir, "sample_invalid_eip",
67 &cpu_buf->sample_invalid_eip); 67 &cpu_buf->sample_invalid_eip);
68 } 68 }
69 69
70 oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm", 70 oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm",
71 &oprofile_stats.sample_lost_no_mm); 71 &oprofile_stats.sample_lost_no_mm);
72 oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mapping", 72 oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mapping",
diff --git a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h
index 54e59c29b439..3da0d08dc1f9 100644
--- a/drivers/oprofile/oprofile_stats.h
+++ b/drivers/oprofile/oprofile_stats.h
@@ -11,7 +11,7 @@
11#define OPROFILE_STATS_H 11#define OPROFILE_STATS_H
12 12
13#include <asm/atomic.h> 13#include <asm/atomic.h>
14 14
15struct oprofile_stat_struct { 15struct oprofile_stat_struct {
16 atomic_t sample_lost_no_mm; 16 atomic_t sample_lost_no_mm;
17 atomic_t sample_lost_no_mapping; 17 atomic_t sample_lost_no_mapping;
@@ -20,13 +20,13 @@ struct oprofile_stat_struct {
20}; 20};
21 21
22extern struct oprofile_stat_struct oprofile_stats; 22extern struct oprofile_stat_struct oprofile_stats;
23 23
24/* reset all stats to zero */ 24/* reset all stats to zero */
25void oprofile_reset_stats(void); 25void oprofile_reset_stats(void);
26 26
27struct super_block; 27struct super_block;
28struct dentry; 28struct dentry;
29 29
30/* create the stats/ dir */ 30/* create the stats/ dir */
31void oprofile_create_stats_files(struct super_block *sb, struct dentry *root); 31void oprofile_create_stats_files(struct super_block *sb, struct dentry *root);
32 32
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index a275a3aa5f0b..ddc4c59f02dc 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
@@ -181,13 +181,13 @@ static ssize_t atomic_read_file(struct file *file, char __user *buf, size_t coun
181 atomic_t *val = file->private_data; 181 atomic_t *val = file->private_data;
182 return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset); 182 return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset);
183} 183}
184 184
185 185
186static const struct file_operations atomic_ro_fops = { 186static const struct file_operations atomic_ro_fops = {
187 .read = atomic_read_file, 187 .read = atomic_read_file,
188 .open = default_open, 188 .open = default_open,
189}; 189};
190 190
191 191
192int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root, 192int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
193 char const *name, atomic_t *val) 193 char const *name, atomic_t *val)
@@ -201,7 +201,7 @@ int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
201 return 0; 201 return 0;
202} 202}
203 203
204 204
205int oprofilefs_create_file(struct super_block *sb, struct dentry *root, 205int oprofilefs_create_file(struct super_block *sb, struct dentry *root,
206 char const *name, const struct file_operations *fops) 206 char const *name, const struct file_operations *fops)
207{ 207{
diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c
index 7258b141a510..333f915568c7 100644
--- a/drivers/oprofile/timer_int.c
+++ b/drivers/oprofile/timer_int.c
@@ -19,7 +19,7 @@
19 19
20static int timer_notify(struct pt_regs *regs) 20static int timer_notify(struct pt_regs *regs)
21{ 21{
22 oprofile_add_sample(regs, 0); 22 oprofile_add_sample(regs, 0);
23 return 0; 23 return 0;
24} 24}
25 25