Let's increase the mem_access loop count by defining COUNT=250 (instead of 20) and define a more reasonable margin (100 instead of 15 previously) so that it gives better chance to accommodate for HW implementation variance. Those values were chosen arbitrarily higher. Those values fix the random failures on ThunderX2 machines. Signed-off-by: Eric Auger <eric.auger@xxxxxxxxxx> Tested-by: Mark Rutland <mark.rutland@xxxxxxx> --- arm/pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arm/pmu.c b/arm/pmu.c index 925f277c..62d41ea9 100644 --- a/arm/pmu.c +++ b/arm/pmu.c @@ -60,8 +60,8 @@ #define ALL_CLEAR 0x0000000000000000ULL #define PRE_OVERFLOW_32 0x00000000FFFFFFF0ULL #define PRE_OVERFLOW_64 0xFFFFFFFFFFFFFFF0ULL -#define COUNT 20 -#define MARGIN 15 +#define COUNT 250 +#define MARGIN 100 /* * PRE_OVERFLOW2 is set so that 1st @COUNT iterations do not * produce 32b overflow and 2nd @COUNT iterations do. To accommodate -- 2.38.1