blob: 24144b25772cf92d74fc74415bfcc6dffa08e14a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* Copyright 2015, Michael Ellerman, IBM Corp.
* Licensed under GPLv2.
*/
#ifndef _SELFTESTS_POWERPC_TM_TM_H
#define _SELFTESTS_POWERPC_TM_TM_H
#include <stdbool.h>
#include <asm/cputable.h>
#include "../utils.h"
static inline bool have_htm(void)
{
#ifdef PPC_FEATURE2_HTM
return have_hwcap2(PPC_FEATURE2_HTM);
#else
printf("PPC_FEATURE2_HTM not defined, can't check AT_HWCAP2\n");
return false;
#endif
}
static inline bool have_htm_nosc(void)
{
#ifdef PPC_FEATURE2_HTM_NOSC
return have_hwcap2(PPC_FEATURE2_HTM_NOSC);
#else
printf("PPC_FEATURE2_HTM_NOSC not defined, can't check AT_HWCAP2\n");
return false;
#endif
}
#endif /* _SELFTESTS_POWERPC_TM_TM_H */
|