aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/oprofilefs.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-07-25 10:18:34 -0400
committerIngo Molnar <mingo@elte.hu>2011-09-13 05:12:05 -0400
commit2d21a29fb62f142b8a62496700d8d82a6a8fd783 (patch)
tree78d83ed47a72b1e31ecadb3f77e91f865b407b48 /drivers/oprofile/oprofilefs.c
parent6b2c1800f1d3a608af952cfbd57f8f1a71c5d9b4 (diff)
locking, oprofile: Annotate oprofilefs lock as raw
The oprofilefs_lock can be taken in atomic context (in profiling interrupts) and therefore cannot cannot be preempted on -rt - annotate it. In mainline this change documents the low level nature of the lock - otherwise there's no functional difference. Lockdep and Sparse checking will work as usual. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/oprofile/oprofilefs.c')
-rw-r--r--drivers/oprofile/oprofilefs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index e9ff6f7770be..d0de6cc2d7a5 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
@@ -21,7 +21,7 @@
21 21
22#define OPROFILEFS_MAGIC 0x6f70726f 22#define OPROFILEFS_MAGIC 0x6f70726f
23 23
24DEFINE_SPINLOCK(oprofilefs_lock); 24DEFINE_RAW_SPINLOCK(oprofilefs_lock);
25 25
26static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode) 26static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
27{ 27{
@@ -76,9 +76,9 @@ int oprofilefs_ulong_from_user(unsigned long *val, char const __user *buf, size_
76 if (copy_from_user(tmpbuf, buf, count)) 76 if (copy_from_user(tmpbuf, buf, count))
77 return -EFAULT; 77 return -EFAULT;
78 78
79 spin_lock_irqsave(&oprofilefs_lock, flags); 79 raw_spin_lock_irqsave(&oprofilefs_lock, flags);
80 *val = simple_strtoul(tmpbuf, NULL, 0); 80 *val = simple_strtoul(tmpbuf, NULL, 0);
81 spin_unlock_irqrestore(&oprofilefs_lock, flags); 81 raw_spin_unlock_irqrestore(&oprofilefs_lock, flags);
82 return 0; 82 return 0;
83} 83}
84 84