On Sat, 2015-10-17 at 21:31 +0300, Denis Kirjanov wrote: > Event Based Branches currenly available on POWER8. > so we can skip them on other CPUs.
Thanks for the patch, but .. > I've found that at least one test loops forever > on 970MP (cycles_with_freeze_test). Ooo interesting. The harness should kill it after a timeout. > diff --git a/tools/testing/selftests/powerpc/pmu/ebb/ebb.c > b/tools/testing/selftests/powerpc/pmu/ebb/ebb.c > index d7a72ce..a252637 100644 > --- a/tools/testing/selftests/powerpc/pmu/ebb/ebb.c > +++ b/tools/testing/selftests/powerpc/pmu/ebb/ebb.c > @@ -319,6 +319,19 @@ void ebb_global_disable(void) > mb(); > } > > +#define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) > +bool ebb_is_supported(void) > +{ > + unsigned long pvr; > + > + __asm__ __volatile__("mfpvr %0" : "=b"(pvr)); > + /* EBB requires at least POWER8 */ > + if (PVR_VER(pvr) >= 0x004D) > + return true; > + > + return false; > +} The right way to do this is not to look at the PVR but instead look at AT_HWCAP2, and see if it contains PPC_FEATURE2_EBB. You can see an example in tm-syscall.c Can you please respin with that change? cheers _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev