diff options
| author | Leo Yan <[email protected]> | 2020-11-19 15:24:36 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-11-26 12:31:46 +0000 |
| commit | 4d0f4ca273aa95bf592b8bad3c619b5766c8ecc7 (patch) | |
| tree | 8216cb6a53cd74f196d66322ebb443cc1e0a1efc /tools/lib/string.c | |
| parent | perf arm-spe: Refactor event type handling (diff) | |
| download | kernel-4d0f4ca273aa95bf592b8bad3c619b5766c8ecc7.tar.gz kernel-4d0f4ca273aa95bf592b8bad3c619b5766c8ecc7.zip | |
perf arm-spe: Remove size condition checking for events
In the Armv8 ARM (ARM DDI 0487F.c), chapter "D10.2.6 Events packet", it
describes the event bit is valid with specific payload requirement. For
example, the Last Level cache access event, the bit is defined as:
E[8], byte 1 bit [0], when SZ == 0b01 , when SZ == 0b10 ,
or when SZ == 0b11
It requires the payload size is at least 2 bytes, when byte 1 (start
counting from 0) is valid, E[8] (bit 0 in byte 1) can be used for LLC
access event type. For safety, the code checks the condition for
payload size firstly, if meet the requirement for payload size, then
continue to parse event type.
If review function arm_spe_get_payload(), it has used cast, so any bytes
beyond the valid size have been set to zeros.
For this reason, we don't need to check payload size anymore afterwards
when parse events, thus this patch removes payload size conditions.
Suggested-by: Andre Przywara <[email protected]>
Signed-off-by: Leo Yan <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
Acked-by: Will Deacon <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Al Grant <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Dave Martin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Garry <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wei Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/string.c')
0 files changed, 0 insertions, 0 deletions
