Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Emde <C.Emde@osadl.org>2010-01-16 17:14:04 +0100
committerThomas Gleixner <tglx@linutronix.de>2010-02-21 20:20:12 +0100
commitb635a77f9aadc5ed3fc5a949e3f219c24cdd254c (patch)
tree41624bc93087ed7308930dc13329d75889d5581f
parent1954630a0637ad1ec2dcfe0324a36cd243f018ee (diff)
hwlat_detector-avoid-smp_processor_id.patch
Avoid smp_processor_id() in preemptible code. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--drivers/misc/hwlat_detector.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/misc/hwlat_detector.c b/drivers/misc/hwlat_detector.c
index d9549e9b58f4..953783c983dd 100644
--- a/drivers/misc/hwlat_detector.c
+++ b/drivers/misc/hwlat_detector.c
@@ -191,17 +191,11 @@ static struct sample *buffer_get_sample(struct sample *sample)
if (!sample)
return NULL;
- /* ring_buffers are per-cpu but we just want any value */
- /* so we'll start with this cpu and try others if not */
- /* Steven is planning to add a generic mechanism */
mutex_lock(&ring_buffer_mutex);
- e = ring_buffer_consume(ring_buffer, smp_processor_id(), NULL);
- if (!e) {
- for_each_online_cpu(cpu) {
- e = ring_buffer_consume(ring_buffer, cpu, NULL);
- if (e)
- break;
- }
+ for_each_online_cpu(cpu) {
+ e = ring_buffer_consume(ring_buffer, cpu, NULL);
+ if (e)
+ break;
}
if (e) {