• Anshuman Khandual's avatar
    coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus · 4aff040b
    Anshuman Khandual authored
    This work arounds errata 1490853 on Cortex-A76, and Neoverse-N1, errata
    1491015 on Cortex-A77, errata 1502854 on Cortex-X1, and errata 1619801 on
    Neoverse-V1, based affected cpus, where software read for TRCIDR3.CCITMIN
    field in ETM gets an wrong value.
    
    If software uses the value returned by the TRCIDR3.CCITMIN register field,
    then it will limit the range which could be used for programming the ETM.
    In reality, the ETM could be programmed with a much smaller value than what
    is indicated by the TRCIDR3.CCITMIN field and still function correctly.
    
    If software reads the TRCIDR3.CCITMIN register field, corresponding to the
    instruction trace counting minimum threshold, observe the value 0x100 or a
    minimum cycle count threshold of 256. The correct value should be 0x4 or a
    minimum cycle count threshold of 4.
    
    This work arounds the problem via storing 4 in drvdata->ccitmin on affected
    systems where the TRCIDR3.CCITMIN has been 256, thus preserving cycle count
    threshold granularity.
    
    These errata information has been updated in Documentation/arch/arm64/silicon-errata.rst,
    but without their corresponding configs because these have been implemented
    directly in the driver.
    
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
    Cc: Mike Leach <mike.leach@linaro.org>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: linux-doc@vger.kernel.org
    Cc: coresight@lists.linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
    Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
    [ Fixed location of silicon-errata.rst in commit description ]
    Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20230921033631.1298723-2-anshuman.khandual@arm.com
    4aff040b
silicon-errata.rst 18.4 KB