Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/core
Pull oprofile fixes from Robert Richter. Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -169,7 +169,7 @@ static ssize_t hw_interval_write(struct file *file, char const __user *buf,
|
|||||||
if (*offset)
|
if (*offset)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
||||||
if (retval)
|
if (retval <= 0)
|
||||||
return retval;
|
return retval;
|
||||||
if (val < oprofile_min_interval)
|
if (val < oprofile_min_interval)
|
||||||
oprofile_hw_interval = oprofile_min_interval;
|
oprofile_hw_interval = oprofile_min_interval;
|
||||||
@@ -212,7 +212,7 @@ static ssize_t hwsampler_zero_write(struct file *file, char const __user *buf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
||||||
if (retval)
|
if (retval <= 0)
|
||||||
return retval;
|
return retval;
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -243,7 +243,7 @@ static ssize_t hwsampler_kernel_write(struct file *file, char const __user *buf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
||||||
if (retval)
|
if (retval <= 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
if (val != 0 && val != 1)
|
if (val != 0 && val != 1)
|
||||||
@@ -278,7 +278,7 @@ static ssize_t hwsampler_user_write(struct file *file, char const __user *buf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
||||||
if (retval)
|
if (retval <= 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
if (val != 0 && val != 1)
|
if (val != 0 && val != 1)
|
||||||
@@ -317,7 +317,7 @@ static ssize_t timer_enabled_write(struct file *file, char const __user *buf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
retval = oprofilefs_ulong_from_user(&val, buf, count);
|
||||||
if (retval)
|
if (retval <= 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
if (val != 0 && val != 1)
|
if (val != 0 && val != 1)
|
||||||
|
@@ -451,15 +451,10 @@ static void wq_sync_buffer(struct work_struct *work)
|
|||||||
{
|
{
|
||||||
struct oprofile_cpu_buffer *b =
|
struct oprofile_cpu_buffer *b =
|
||||||
container_of(work, struct oprofile_cpu_buffer, work.work);
|
container_of(work, struct oprofile_cpu_buffer, work.work);
|
||||||
if (b->cpu != smp_processor_id()) {
|
if (b->cpu != smp_processor_id() && !cpu_online(b->cpu)) {
|
||||||
printk(KERN_DEBUG "WQ on CPU%d, prefer CPU%d\n",
|
|
||||||
smp_processor_id(), b->cpu);
|
|
||||||
|
|
||||||
if (!cpu_online(b->cpu)) {
|
|
||||||
cancel_delayed_work(&b->work);
|
cancel_delayed_work(&b->work);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
sync_buffer(b->cpu);
|
sync_buffer(b->cpu);
|
||||||
|
|
||||||
/* don't re-add the work if we're shutting down */
|
/* don't re-add the work if we're shutting down */
|
||||||
|
Reference in New Issue
Block a user