cregit-Linux how code gets into the kernel

Release 4.8 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

PersonTokensPropCommitsCommitProp
michael ellermanmichael ellerman30100.00%1100.00%
Total30100.00%1100.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

PersonTokensPropCommitsCommitProp
michael ellermanmichael ellerman30100.00%1100.00%
Total30100.00%1100.00%


static inline long failure_code(void) { return __builtin_get_texasru() >> 24; }

Contributors

PersonTokensPropCommitsCommitProp
cyril burcyril bur15100.00%1100.00%
Total15100.00%1100.00%


static inline bool failure_is_persistent(void) { return (failure_code() & TM_CAUSE_PERSISTENT) == TM_CAUSE_PERSISTENT; }

Contributors

PersonTokensPropCommitsCommitProp
cyril burcyril bur19100.00%1100.00%
Total19100.00%1100.00%


static inline bool failure_is_syscall(void) { return (failure_code() & TM_CAUSE_SYSCALL) == TM_CAUSE_SYSCALL; }

Contributors

PersonTokensPropCommitsCommitProp
cyril burcyril bur19100.00%1100.00%
Total19100.00%1100.00%


static inline bool failure_is_nesting(void) { return (__builtin_get_texasru() & 0x400000); }

Contributors

PersonTokensPropCommitsCommitProp
cyril burcyril bur17100.00%1100.00%
Total17100.00%1100.00%

#endif /* _SELFTESTS_POWERPC_TM_TM_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
michael ellermanmichael ellerman7851.32%150.00%
cyril burcyril bur7448.68%150.00%
Total152100.00%2100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.