/* * Copyright 2015, Michael Ellerman, IBM Corp. * Licensed under GPLv2. */ #ifndef _SELFTESTS_POWERPC_TM_TM_H #define _SELFTESTS_POWERPC_TM_TM_H #include #include #include #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 } 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); } static inline int tcheck(void) { long cr; asm volatile ("tcheck 0" : "=r"(cr) : : "cr0"); return (cr >> 28) & 4; } static inline bool tcheck_doomed(void) { return tcheck() & 8; } static inline bool tcheck_active(void) { return tcheck() & 4; } static inline bool tcheck_suspended(void) { return tcheck() & 2; } static inline bool tcheck_transactional(void) { return tcheck() & 6; } #endif /* _SELFTESTS_POWERPC_TM_TM_H */ ht'>Tobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-22 12:47:48 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-22 12:47:48 -0800
commit095cbe66973771fecd8e8b1e8763181363ef703e (patch)
treec361a93d62ed171ac958deb0d4ff0faa980bb290 /sound/ppc/pmac.c
parent24b86839fab8e8059d2b16e0067dc86a1a0d3514 (diff)
parent020eb3daaba2857b32c4cf4c82f503d6a00a67de (diff)
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "Restore the retrigger callbacks in the IO APIC irq chips. That addresses a long standing regression which got introduced with the rewrite of the x86 irq subsystem two years ago and went unnoticed so far" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Restore IO-APIC irq_chip retrigger callback
Diffstat (limited to 'sound/ppc/pmac.c')