• Xu Yang's avatar
    perf: fsl_imx8_ddr: Add AXI ID PORT CHANNEL filter support · afd83967
    Xu Yang authored
    This is the extension of AXI ID filter.
    
    Filter is defined with 2 configuration registers per counter 1-3 (counter
    0 is not used for filtering and lacks these registers).
    * Counter N MASK COMP register - AXI_ID and AXI_MASKING.
    * Counter N MUX CNTL register - AXI CHANNEL and AXI PORT.
      -- 0: address channel
      -- 1: data channel
    
    This filter is exposed to userspace as an additional (channel, port) pair.
    The definition of axi_channel is inverted in userspace, and it will be
    reverted in driver automatically.
    
    AXI filter of Perf Monitor in DDR Subsystem, only a single port0 exist, so
    axi_port is reserved which should be 0.
    
    e.g.
    perf stat -a -e imx8_ddr0/axid-read,axi_mask=0xMMMM,axi_id=0xDDDD,axi_channel=0xH/ cmd
    perf stat -a -e imx8_ddr0/axid-write,axi_mask=0xMMMM,axi_id=0xDDDD,axi_channel=0xH/ cmd
    Signed-off-by: default avatarXu Yang <xu.yang_2@nxp.com>
    Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20231120093317.2652866-1-xu.yang_2@nxp.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
    afd83967
fsl_imx8_ddr_perf.c 22.4 KB