Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs/perf: Add explanation for DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER quirk

Add explanation for DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER quirk.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20231120093317.2652866-2-xu.yang_2@nxp.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Xu Yang and committed by
Will Deacon
97452953 afd83967

+37 -8
+37 -8
Documentation/admin-guide/perf/imx-ddr.rst
··· 13 13 interrupt is raised. If any other counter overflows, it continues counting, and 14 14 no interrupt is raised. 15 15 16 - The "format" directory describes format of the config (event ID) and config1 17 - (AXI filtering) fields of the perf_event_attr structure, see /sys/bus/event_source/ 16 + The "format" directory describes format of the config (event ID) and config1/2 17 + (AXI filter setting) fields of the perf_event_attr structure, see /sys/bus/event_source/ 18 18 devices/imx8_ddr0/format/. The "events" directory describes the events types 19 19 hardware supported that can be used with perf tool, see /sys/bus/event_source/ 20 20 devices/imx8_ddr0/events/. The "caps" directory describes filter features implemented ··· 28 28 AXI filtering is only used by CSV modes 0x41 (axid-read) and 0x42 (axid-write) 29 29 to count reading or writing matches filter setting. Filter setting is various 30 30 from different DRAM controller implementations, which is distinguished by quirks 31 - in the driver. You also can dump info from userspace, filter in "caps" directory 32 - indicates whether PMU supports AXI ID filter or not; enhanced_filter indicates 33 - whether PMU supports enhanced AXI ID filter or not. Value 0 for un-supported, and 34 - value 1 for supported. 31 + in the driver. You also can dump info from userspace, "caps" directory show the 32 + type of AXI filter (filter, enhanced_filter and super_filter). Value 0 for 33 + un-supported, and value 1 for supported. 35 34 36 - * With DDR_CAP_AXI_ID_FILTER quirk(filter: 1, enhanced_filter: 0). 35 + * With DDR_CAP_AXI_ID_FILTER quirk(filter: 1, enhanced_filter: 0, super_filter: 0). 37 36 Filter is defined with two configuration parts: 38 37 --AXI_ID defines AxID matching value. 39 38 --AXI_MASKING defines which bits of AxID are meaningful for the matching. ··· 64 65 65 66 perf stat -a -e imx8_ddr0/axid-read,axi_id=0x12/ cmd, which will monitor ARID=0x12 66 67 67 - * With DDR_CAP_AXI_ID_FILTER_ENHANCED quirk(filter: 1, enhanced_filter: 1). 68 + * With DDR_CAP_AXI_ID_FILTER_ENHANCED quirk(filter: 1, enhanced_filter: 1, super_filter: 0). 68 69 This is an extension to the DDR_CAP_AXI_ID_FILTER quirk which permits 69 70 counting the number of bytes (as opposed to the number of bursts) from DDR 70 71 read and write transactions concurrently with another set of data counters. 72 + 73 + * With DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER quirk(filter: 0, enhanced_filter: 0, super_filter: 1). 74 + There is a limitation in previous AXI filter, it cannot filter different IDs 75 + at the same time as the filter is shared between counters. This quirk is the 76 + extension of AXI ID filter. One improvement is that counter 1-3 has their own 77 + filter, means that it supports concurrently filter various IDs. Another 78 + improvement is that counter 1-3 supports AXI PORT and CHANNEL selection. Support 79 + selecting address channel or data channel. 80 + 81 + Filter is defined with 2 configuration registers per counter 1-3. 82 + --Counter N MASK COMP register - including AXI_ID and AXI_MASKING. 83 + --Counter N MUX CNTL register - including AXI CHANNEL and AXI PORT. 84 + 85 + - 0: address channel 86 + - 1: data channel 87 + 88 + PMU in DDR subsystem, only one single port0 exists, so axi_port is reserved 89 + which should be 0. 90 + 91 + .. code-block:: bash 92 + 93 + perf stat -a -e imx8_ddr0/axid-read,axi_mask=0xMMMM,axi_id=0xDDDD,axi_channel=0xH/ cmd 94 + perf stat -a -e imx8_ddr0/axid-write,axi_mask=0xMMMM,axi_id=0xDDDD,axi_channel=0xH/ cmd 95 + 96 + .. note:: 97 + 98 + axi_channel is inverted in userspace, and it will be reverted in driver 99 + automatically. So that users do not need specify axi_channel if want to 100 + monitor data channel from DDR transactions, since data channel is more 101 + meaningful.