Will Deacon
446a5a8b1e
ARM: 6205/1: perf: ensure counter delta is treated as unsigned
...
Hardware performance counters on ARM are 32-bits wide but atomic64_t
variables are used to represent counter data in the hw_perf_event structure.
The armpmu_event_update function right-shifts a signed 64-bit delta variable
and adds the result to the event count. This can lead to shifting in sign-bits
if the MSB of the 32-bit counter value is set. This results in perf output
such as:
Performance counter stats for 'sleep 20':
18446744073460670464 cycles <-- 0xFFFFFFFFF12A6000
7783773 instructions # 0.000 IPC
465 context-switches
161 page-faults
1172393 branches
20.154242147 seconds time elapsed
This patch ensures that the delta value is treated as unsigned so that the
right shift sets the upper bits to zero.
Cc: <stable@kernel.org >
Acked-by: Jamie Iles <jamie.iles@picochip.com >
Signed-off-by: Will Deacon <will.deacon@arm.com >
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk >
2010-07-04 23:11:37 +01:00
..
2010-05-24 20:40:09 +01:00
2010-05-27 10:36:08 +01:00
2010-05-28 19:33:05 +09:00
2010-07-01 10:16:04 +01:00
2010-07-04 23:11:37 +01:00
2010-05-08 10:45:26 +01:00
2010-03-30 22:02:32 +09:00
2010-05-24 20:40:13 +01:00
2010-05-17 17:24:04 +01:00
2010-05-24 20:40:09 +01:00
2010-05-02 21:55:49 +04:00
2010-05-28 01:37:39 +02:00
2010-03-08 20:21:04 +00:00
2010-02-12 17:27:52 +00:00
2010-05-25 00:38:26 -06:00
2010-05-24 20:40:10 +01:00
2010-03-01 09:15:15 -08:00
2010-05-24 20:40:10 +01:00
2010-05-17 17:24:04 +01:00
2010-03-30 22:02:32 +09:00
2010-05-17 17:24:04 +01:00
2010-03-30 22:02:32 +09:00
2010-05-17 17:24:04 +01:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-21 07:25:43 -07:00
2010-02-12 17:27:52 +00:00
2010-02-12 17:27:52 +00:00
2010-03-30 22:02:32 +09:00
2010-02-25 22:09:41 +00:00
2010-05-11 17:25:06 +02:00
2010-06-07 16:16:33 -07:00
2010-03-08 20:21:04 +00:00
2010-03-08 20:21:04 +00:00
2010-05-25 12:06:33 -07:00
2010-07-01 09:52:39 +02:00
2010-05-20 23:43:18 +01:00
2010-05-18 08:32:33 +02:00
2010-03-08 20:21:04 +00:00
2010-03-30 22:02:32 +09:00
2010-05-27 10:36:08 +01:00
2010-03-30 22:02:32 +09:00
2010-01-27 22:03:00 +00:00
2010-05-20 11:37:23 -07:00
2010-06-28 15:47:04 +03:00
2010-05-26 13:07:55 +01:00
2010-03-30 22:02:32 +09:00
2010-06-13 23:55:15 +08:00
2010-07-02 10:10:09 +01:00
2010-03-30 22:02:32 +09:00
2010-03-08 20:21:04 +00:00
2010-05-28 19:31:34 +09:00
2009-12-09 19:43:33 -08:00
2010-05-20 19:44:18 +09:00
2010-05-20 09:41:44 -07:00
2010-05-18 18:46:30 +09:00
2010-05-26 17:34:40 +01:00
2010-05-20 09:20:59 -07:00
2010-05-26 19:09:50 +09:00
2010-05-26 19:09:50 +09:00
2010-05-26 19:09:50 +09:00
2010-05-26 19:09:50 +09:00
2010-05-24 20:40:11 +01:00
2010-05-24 20:40:11 +01:00
2010-05-18 08:17:56 +01:00
2010-05-04 16:54:54 +01:00
2010-05-24 20:39:52 +01:00
2009-06-04 14:16:45 +01:00
2009-06-04 14:16:45 +01:00
2010-05-28 01:37:47 +02:00
2010-06-08 19:40:08 +01:00
2010-05-17 17:24:04 +01:00
2010-07-01 10:13:41 +01:00
2010-05-24 22:25:34 +01:00
2010-07-02 10:10:20 +01:00
2010-05-24 20:40:12 +01:00
2010-05-17 11:53:59 +01:00
2010-04-29 18:03:49 +01:00
2010-05-20 23:43:18 +01:00
2010-05-27 10:36:08 +01:00
2010-06-10 15:37:41 +03:00
2010-05-14 01:04:19 +01:00
2010-06-14 00:45:26 +08:00
2010-05-20 19:44:18 +09:00
2010-05-28 19:31:34 +09:00
2010-05-28 19:31:32 +09:00
2010-05-04 16:54:54 +01:00
2010-03-30 22:02:32 +09:00
2010-05-02 09:35:38 +01:00
2010-05-01 11:32:58 +01:00
2010-05-27 10:32:06 +01:00
2010-07-01 10:13:58 +01:00
2007-10-12 23:43:02 +01:00
2010-02-24 01:52:06 +00:00
2010-05-24 23:08:36 +01:00