mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 14:02:06 -04:00
selftests/powerpc: exec() with suspended transaction
Perform an exec() class syscall with a suspended transaction.
This is a test for the bug we fixed in 8e96a87c54 ("powerpc/tm: Always
reclaim in start_thread() for exec() class syscalls").
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
[mpe: Fix build errors, use a single binary for the test]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
dd57023747
commit
a431b946db
@@ -6,8 +6,9 @@
|
||||
#ifndef _SELFTESTS_POWERPC_TM_TM_H
|
||||
#define _SELFTESTS_POWERPC_TM_TM_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <asm/tm.h>
|
||||
#include <asm/cputable.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
@@ -31,4 +32,24 @@ static inline bool have_htm_nosc(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline long failure_code(void)
|
||||
{
|
||||
return __builtin_get_texasru() >> 24;
|
||||
}
|
||||
|
||||
static inline bool failure_is_persistent(void)
|
||||
{
|
||||
return (failure_code() & TM_CAUSE_PERSISTENT) == TM_CAUSE_PERSISTENT;
|
||||
}
|
||||
|
||||
static inline bool failure_is_syscall(void)
|
||||
{
|
||||
return (failure_code() & TM_CAUSE_SYSCALL) == TM_CAUSE_SYSCALL;
|
||||
}
|
||||
|
||||
static inline bool failure_is_nesting(void)
|
||||
{
|
||||
return (__builtin_get_texasru() & 0x400000);
|
||||
}
|
||||
|
||||
#endif /* _SELFTESTS_POWERPC_TM_TM_H */
|
||||
|
||||
Reference in New Issue
Block a user