diff options
Diffstat (limited to 'drivers/misc/hwlat_detector.c')
-rw-r--r-- | drivers/misc/hwlat_detector.c | 14 |
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) | |||
191 | if (!sample) | 191 | if (!sample) |
192 | return NULL; | 192 | return NULL; |
193 | 193 | ||
194 | /* ring_buffers are per-cpu but we just want any value */ | ||
195 | /* so we'll start with this cpu and try others if not */ | ||
196 | /* Steven is planning to add a generic mechanism */ | ||
197 | mutex_lock(&ring_buffer_mutex); | 194 | mutex_lock(&ring_buffer_mutex); |
198 | e = ring_buffer_consume(ring_buffer, smp_processor_id(), NULL); | 195 | for_each_online_cpu(cpu) { |
199 | if (!e) { | 196 | e = ring_buffer_consume(ring_buffer, cpu, NULL); |
200 | for_each_online_cpu(cpu) { | 197 | if (e) |
201 | e = ring_buffer_consume(ring_buffer, cpu, NULL); | 198 | break; |
202 | if (e) | ||
203 | break; | ||
204 | } | ||
205 | } | 199 | } |
206 | 200 | ||
207 | if (e) { | 201 | if (e) { |