• Mark Rutland's avatar
    ARM: 8611/1: l2x0: add PMU support · b828f960
    Mark Rutland authored
    The L2C-220 (AKA L220) and L2C-310 (AKA PL310) cache controllers feature
    a Performance Monitoring Unit (PMU), which can be useful for tuning
    and/or debugging. This hardware is always present and the relevant
    registers are accessible to non-secure accesses. Thus, no special
    firmware interface is necessary.
    
    This patch adds support for the PMU, plugging into the usual perf
    infrastructure. The overflow interrupt is not always available (e.g. on
    RealView PBX A9 it is not wired up at all), and the hardware counters
    saturate, so the driver does not make use of this. Instead, the driver
    periodically polls and reset counters as required to avoid losing
    events due to saturation.
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Acked-by: default avatarPawel Moll <pawel.moll@arm.com>
    Tested-by: default avatarKim Phillips <kim.phillips@arm.com>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Will Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    b828f960
cache-l2x0.h 6.69 KB