mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
6b2c1800f1
commit
2d21a29fb6
5 changed files with 10 additions and 10 deletions
|
|
@ -82,10 +82,10 @@ int alloc_event_buffer(void)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&oprofilefs_lock, flags);
|
||||
raw_spin_lock_irqsave(&oprofilefs_lock, flags);
|
||||
buffer_size = oprofile_buffer_size;
|
||||
buffer_watershed = oprofile_buffer_watershed;
|
||||
spin_unlock_irqrestore(&oprofilefs_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&oprofilefs_lock, flags);
|
||||
|
||||
if (buffer_watershed >= buffer_size)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -160,9 +160,9 @@ static int oprofile_perf_create_files(struct super_block *sb, struct dentry *roo
|
|||
|
||||
static int oprofile_perf_setup(void)
|
||||
{
|
||||
spin_lock(&oprofilefs_lock);
|
||||
raw_spin_lock(&oprofilefs_lock);
|
||||
op_perf_setup();
|
||||
spin_unlock(&oprofilefs_lock);
|
||||
raw_spin_unlock(&oprofilefs_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#define OPROFILEFS_MAGIC 0x6f70726f
|
||||
|
||||
DEFINE_SPINLOCK(oprofilefs_lock);
|
||||
DEFINE_RAW_SPINLOCK(oprofilefs_lock);
|
||||
|
||||
static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
|
||||
{
|
||||
|
|
@ -76,9 +76,9 @@ int oprofilefs_ulong_from_user(unsigned long *val, char const __user *buf, size_
|
|||
if (copy_from_user(tmpbuf, buf, count))
|
||||
return -EFAULT;
|
||||
|
||||
spin_lock_irqsave(&oprofilefs_lock, flags);
|
||||
raw_spin_lock_irqsave(&oprofilefs_lock, flags);
|
||||
*val = simple_strtoul(tmpbuf, NULL, 0);
|
||||
spin_unlock_irqrestore(&oprofilefs_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&oprofilefs_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue