2 * Copyright 2015, Michael Ellerman, IBM Corp.
3 * Licensed under GPLv2.
6 #ifndef _SELFTESTS_POWERPC_TM_TM_H
7 #define _SELFTESTS_POWERPC_TM_TM_H
10 #include <asm/cputable.h>
14 static inline bool have_htm(void)
16 #ifdef PPC_FEATURE2_HTM
17 return have_hwcap2(PPC_FEATURE2_HTM);
19 printf("PPC_FEATURE2_HTM not defined, can't check AT_HWCAP2\n");
24 static inline bool have_htm_nosc(void)
26 #ifdef PPC_FEATURE2_HTM_NOSC
27 return have_hwcap2(PPC_FEATURE2_HTM_NOSC);
29 printf("PPC_FEATURE2_HTM_NOSC not defined, can't check AT_HWCAP2\n");
34 #endif /* _SELFTESTS_POWERPC_TM_TM_H */