Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96c44707 authored by Cyril Bur's avatar Cyril Bur Committed by Michael Ellerman
Browse files

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: default avatarCyril Bur <cyrilbur@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent f1a55ce0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -32,10 +32,17 @@ static inline bool have_hwcap(unsigned long ftr)
	return ((unsigned long)get_auxv_entry(AT_HWCAP) & ftr) == ftr;
}

#ifdef AT_HWCAP2
static inline bool have_hwcap2(unsigned long ftr2)
{
	return ((unsigned long)get_auxv_entry(AT_HWCAP2) & ftr2) == ftr2;
}
#else
static inline bool have_hwcap2(unsigned long ftr2)
{
	return false;
}
#endif

/* Yes, this is evil */
#define FAIL_IF(x)						\