ARM: 7355/1: perf: clear overflow flag when disabling counter on ARMv7 PMU

When disabling a counter on an ARMv7 PMU, we should also clear the
overflow flag in case an overflow occurred whilst stopping the counter.
This prevents a spurious overflow being picked up later and leading to
either false accounting or a NULL dereference.

Cc: <>
Reported-by: Ming Lei <>
Signed-off-by: Will Deacon <>
Signed-off-by: Russell King <>
1 file changed