/* * 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 */ er
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-01-31 00:47:30 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-31 00:51:06 -0800
commit05e0be7c900797e9164976a6014d534ce3035909 (patch)
tree6064ddf732b21c686c958cb9da73f6eae6de5a27 /sound/hda/Kconfig
parent3f5c34c6d4688b3b7e1dbc7bbc68a2f03a0d6b0c (diff)
Input: synaptics-rmi4 - fix reversed conditions in enable/disable_irq_wake
These tests are reversed. A warning should be displayed if an error is returned, not on success. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'sound/hda/Kconfig')