diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-14 20:43:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-14 20:43:45 -0400 |
commit | 7ef6e97380a1cb0f38cab795fe696f43c71d3ae9 (patch) | |
tree | 0557d01616fb4a41bfc98e6908ace912fa6d717c /arch | |
parent | 7076cca9a700af5ccb0bd5eb7261dcfd7356dc5a (diff) | |
parent | e4390fa632d7c592e68e8106b7daea923ac995f5 (diff) |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"This tree includes various fixes"
Ingo really needs to improve on the whole "explain git pull" part.
"Various fixes" indeed.
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/hwpb: Invoke __perf_event_disable() if interrupts are already disabled
perf/x86: Enable Intel Cedarview Atom suppport
perf_event: Switch to internal refcount, fix race with close()
oprofile, s390: Fix uninitialized memory access when writing to oprofilefs
perf/x86: Fix microcode revision check for SNB-PEBS
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/oprofile/init.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_lbr.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/microcode_core.c | 3 |
4 files changed, 11 insertions, 6 deletions
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c index a1e9d69a9c90..584b93674ea4 100644 --- a/arch/s390/oprofile/init.c +++ b/arch/s390/oprofile/init.c | |||
@@ -169,7 +169,7 @@ static ssize_t hw_interval_write(struct file *file, char const __user *buf, | |||
169 | if (*offset) | 169 | if (*offset) |
170 | return -EINVAL; | 170 | return -EINVAL; |
171 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 171 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
172 | if (retval) | 172 | if (retval <= 0) |
173 | return retval; | 173 | return retval; |
174 | if (val < oprofile_min_interval) | 174 | if (val < oprofile_min_interval) |
175 | oprofile_hw_interval = oprofile_min_interval; | 175 | oprofile_hw_interval = oprofile_min_interval; |
@@ -212,7 +212,7 @@ static ssize_t hwsampler_zero_write(struct file *file, char const __user *buf, | |||
212 | return -EINVAL; | 212 | return -EINVAL; |
213 | 213 | ||
214 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 214 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
215 | if (retval) | 215 | if (retval <= 0) |
216 | return retval; | 216 | return retval; |
217 | if (val != 0) | 217 | if (val != 0) |
218 | return -EINVAL; | 218 | return -EINVAL; |
@@ -243,7 +243,7 @@ static ssize_t hwsampler_kernel_write(struct file *file, char const __user *buf, | |||
243 | return -EINVAL; | 243 | return -EINVAL; |
244 | 244 | ||
245 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 245 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
246 | if (retval) | 246 | if (retval <= 0) |
247 | return retval; | 247 | return retval; |
248 | 248 | ||
249 | if (val != 0 && val != 1) | 249 | if (val != 0 && val != 1) |
@@ -278,7 +278,7 @@ static ssize_t hwsampler_user_write(struct file *file, char const __user *buf, | |||
278 | return -EINVAL; | 278 | return -EINVAL; |
279 | 279 | ||
280 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 280 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
281 | if (retval) | 281 | if (retval <= 0) |
282 | return retval; | 282 | return retval; |
283 | 283 | ||
284 | if (val != 0 && val != 1) | 284 | if (val != 0 && val != 1) |
@@ -317,7 +317,7 @@ static ssize_t timer_enabled_write(struct file *file, char const __user *buf, | |||
317 | return -EINVAL; | 317 | return -EINVAL; |
318 | 318 | ||
319 | retval = oprofilefs_ulong_from_user(&val, buf, count); | 319 | retval = oprofilefs_ulong_from_user(&val, buf, count); |
320 | if (retval) | 320 | if (retval <= 0) |
321 | return retval; | 321 | return retval; |
322 | 322 | ||
323 | if (val != 0 && val != 1) | 323 | if (val != 0 && val != 1) |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 7f2739e03e79..0d3d63afa76a 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -2008,6 +2008,7 @@ __init int intel_pmu_init(void) | |||
2008 | break; | 2008 | break; |
2009 | 2009 | ||
2010 | case 28: /* Atom */ | 2010 | case 28: /* Atom */ |
2011 | case 54: /* Cedariew */ | ||
2011 | memcpy(hw_cache_event_ids, atom_hw_cache_event_ids, | 2012 | memcpy(hw_cache_event_ids, atom_hw_cache_event_ids, |
2012 | sizeof(hw_cache_event_ids)); | 2013 | sizeof(hw_cache_event_ids)); |
2013 | 2014 | ||
diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c b/arch/x86/kernel/cpu/perf_event_intel_lbr.c index 520b4265fcd2..da02e9cc3754 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c +++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c | |||
@@ -686,7 +686,8 @@ void intel_pmu_lbr_init_atom(void) | |||
686 | * to have an operational LBR which can freeze | 686 | * to have an operational LBR which can freeze |
687 | * on PMU interrupt | 687 | * on PMU interrupt |
688 | */ | 688 | */ |
689 | if (boot_cpu_data.x86_mask < 10) { | 689 | if (boot_cpu_data.x86_model == 28 |
690 | && boot_cpu_data.x86_mask < 10) { | ||
690 | pr_cont("LBR disabled due to erratum"); | 691 | pr_cont("LBR disabled due to erratum"); |
691 | return; | 692 | return; |
692 | } | 693 | } |
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 4873e62db6a1..9e5bcf1e2376 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -225,6 +225,9 @@ static ssize_t microcode_write(struct file *file, const char __user *buf, | |||
225 | if (do_microcode_update(buf, len) == 0) | 225 | if (do_microcode_update(buf, len) == 0) |
226 | ret = (ssize_t)len; | 226 | ret = (ssize_t)len; |
227 | 227 | ||
228 | if (ret > 0) | ||
229 | perf_check_microcode(); | ||
230 | |||
228 | mutex_unlock(µcode_mutex); | 231 | mutex_unlock(µcode_mutex); |
229 | put_online_cpus(); | 232 | put_online_cpus(); |
230 | 233 | ||