Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/powerpc: Compile selftests against headers without AT_HWCAP2

It might be nice to compile selftests against older kernels and
headers but which may not have HWCAP2.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Cyril Bur and committed by
Michael Ellerman
96c44707 f1a55ce0

+7
+7
tools/testing/selftests/powerpc/utils.h
··· 32 32 return ((unsigned long)get_auxv_entry(AT_HWCAP) & ftr) == ftr; 33 33 } 34 34 35 + #ifdef AT_HWCAP2 35 36 static inline bool have_hwcap2(unsigned long ftr2) 36 37 { 37 38 return ((unsigned long)get_auxv_entry(AT_HWCAP2) & ftr2) == ftr2; 38 39 } 40 + #else 41 + static inline bool have_hwcap2(unsigned long ftr2) 42 + { 43 + return false; 44 + } 45 + #endif 39 46 40 47 /* Yes, this is evil */ 41 48 #define FAIL_IF(x) \