Skip to content
  • Mark Rutland's avatar
    bus: arm-ccn: make event groups reliable · d662ed2e
    Mark Rutland authored
    
    
    The CCN PMU driver leaves the counting logic always enabled, and thus
    events are enabled while groups are manipulated. As each event is
    stopped and read individually, this leads to arbitrary skew across event
    groups, which can be seen if counting several identical events.
    
    To avoid this, implement pmu_{enable,disable} callbacks to stop and
    start all counters atomically around event manipulation. As the counters
    are now stopped, we cannot poll the cycle counter to wait for events to
    drain from the bus. However, as the counters are stopped and the events
    will not be read regardless, we can simply allow the bus to drain
    naturally.
    
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarPawel Moll <pawel.moll@arm.com>
    d662ed2e