/* * 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 */ ub right'>Tobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Shimizu <rogershimizu@gmail.com>2017-01-30 20:07:29 +0900
committerGregory CLEMENT <gregory.clement@free-electrons.com>2017-01-31 12:19:32 +0100
commit81917bad86a66f2bdcb12b4c10ab1bf333ed25ec (patch)
tree3d56cb771fc5f0a37412e62f99aacc6d21a646c0 /drivers/usb/phy/phy-isp1301.c
parent0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff)
ARM: dts: orion5x-lschl: Fix model name
Model name should be consistent with legacy device file, so that user can migrate their system from legacy device support to device-tree safely. Legacy device file is currently removed, but it can be found on 4.8 or previous version of linux: arch/arm/mach-orion5x/ls-chl-setup.c Fixes: f94f268979a2 ("ARM: dts: orion5x: convert ls-chl to FDT") Cc: Ashley Hughes <ashley.hughes@blueyonder.co.uk> Signed-off-by: Roger Shimizu <rogershimizu@gmail.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Diffstat (limited to 'drivers/usb/phy/phy-isp1301.c')