Release 4.11 tools/testing/selftests/powerpc/tm/tm.h
/*
* Copyright 2015, Michael Ellerman, IBM Corp.
* Licensed under GPLv2.
*/
#ifndef _SELFTESTS_POWERPC_TM_TM_H
#define _SELFTESTS_POWERPC_TM_TM_H
#include <asm/tm.h>
#include <asm/cputable.h>
#include <stdbool.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
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Michael Ellerman | 30 | 100.00% | 1 | 100.00% |
Total | 30 | 100.00% | 1 | 100.00% |
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
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Michael Ellerman | 30 | 100.00% | 1 | 100.00% |
Total | 30 | 100.00% | 1 | 100.00% |
static inline long failure_code(void)
{
return __builtin_get_texasru() >> 24;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
static inline bool failure_is_persistent(void)
{
return (failure_code() & TM_CAUSE_PERSISTENT) == TM_CAUSE_PERSISTENT;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
static inline bool failure_is_syscall(void)
{
return (failure_code() & TM_CAUSE_SYSCALL) == TM_CAUSE_SYSCALL;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
static inline bool failure_is_nesting(void)
{
return (__builtin_get_texasru() & 0x400000);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
static inline int tcheck(void)
{
long cr;
asm volatile ("tcheck 0" : "=r"(cr) : : "cr0");
return (cr >> 28) & 4;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 24 | 100.00% | 1 | 100.00% |
Total | 24 | 100.00% | 1 | 100.00% |
static inline bool tcheck_doomed(void)
{
return tcheck() & 8;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
static inline bool tcheck_active(void)
{
return tcheck() & 4;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
static inline bool tcheck_suspended(void)
{
return tcheck() & 2;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
static inline bool tcheck_transactional(void)
{
return tcheck() & 6;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
#endif /* _SELFTESTS_POWERPC_TM_TM_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Cyril Bur | 158 | 66.95% | 2 | 50.00% |
Michael Ellerman | 77 | 32.63% | 1 | 25.00% |
Simon Guo | 1 | 0.42% | 1 | 25.00% |
Total | 236 | 100.00% | 4 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.