selftests/powerpc: Skip L3 bank test on older CPUs
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Aug 2020 01:57:25 +0000 (11:57 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Sep 2020 12:24:08 +0000 (22:24 +1000)
This is a test of specific piece of logic in isa207-common.c, which is
only used on Power8 or later. So skip it on older CPUs.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200819015727.1977134-7-mpe@ellerman.id.au
tools/testing/selftests/powerpc/pmu/l3_bank_test.c

index a96d512..a5dfa9b 100644 (file)
@@ -20,6 +20,9 @@ static int l3_bank_test(void)
        char *p;
        int i;
 
+       // The L3 bank logic is only used on Power8 or later
+       SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
+
        p = malloc(MALLOC_SIZE);
        FAIL_IF(!p);