diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:16:31 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 17:06:24 -0400 |
commit | b691750098f830b748540cd955f5ac56545bab25 (patch) | |
tree | a45a75a55bd508fe72f2479d2f0e3dcf1b7782f8 /arch/parisc | |
parent | 6044c319d11051f3462dafd0e7a900ef121d7bc7 (diff) |
parisc-kernel-perf: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/perf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c index 89d6d5ad44b..f696f57faa1 100644 --- a/arch/parisc/kernel/perf.c +++ b/arch/parisc/kernel/perf.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/proc_fs.h> | 47 | #include <linux/proc_fs.h> |
48 | #include <linux/miscdevice.h> | 48 | #include <linux/miscdevice.h> |
49 | #include <linux/smp_lock.h> | ||
49 | #include <linux/spinlock.h> | 50 | #include <linux/spinlock.h> |
50 | 51 | ||
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
@@ -260,13 +261,16 @@ printk("Preparing to start counters\n"); | |||
260 | */ | 261 | */ |
261 | static int perf_open(struct inode *inode, struct file *file) | 262 | static int perf_open(struct inode *inode, struct file *file) |
262 | { | 263 | { |
264 | lock_kernel(); | ||
263 | spin_lock(&perf_lock); | 265 | spin_lock(&perf_lock); |
264 | if (perf_enabled) { | 266 | if (perf_enabled) { |
265 | spin_unlock(&perf_lock); | 267 | spin_unlock(&perf_lock); |
268 | unlock_kernel(); | ||
266 | return -EBUSY; | 269 | return -EBUSY; |
267 | } | 270 | } |
268 | perf_enabled = 1; | 271 | perf_enabled = 1; |
269 | spin_unlock(&perf_lock); | 272 | spin_unlock(&perf_lock); |
273 | unlock_kernel(); | ||
270 | 274 | ||
271 | return 0; | 275 | return 0; |
272 | } | 276 | } |