]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
selftests/powerpc: Retry on host facility unavailable
authorGustavo Romero <gromero@linux.vnet.ibm.com>
Tue, 20 Aug 2019 22:54:11 +0000 (18:54 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:59:15 +0000 (18:59 +0200)
[ Upstream commit 6652bf6408895b09d31fd4128a1589a1a0672823 ]

TM test tm-unavailable must take into account aborts due to host aborting
a transactin because of a facility unavailable exception, just like it
already does for aborts on reschedules (TM_CAUSE_KVM_RESCHED).

Reported-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
Tested-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1566341651-19747-1-git-send-email-gromero@linux.vnet.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/powerpc/tm/tm.h

index 97f9f491c541a54136583194fd8ce641f7e84bf7..c402464b038fc8ce62aeaddc3cac896cdd2cdaa7 100644 (file)
@@ -55,7 +55,8 @@ static inline bool failure_is_unavailable(void)
 static inline bool failure_is_reschedule(void)
 {
        if ((failure_code() & TM_CAUSE_RESCHED) == TM_CAUSE_RESCHED ||
-           (failure_code() & TM_CAUSE_KVM_RESCHED) == TM_CAUSE_KVM_RESCHED)
+           (failure_code() & TM_CAUSE_KVM_RESCHED) == TM_CAUSE_KVM_RESCHED ||
+           (failure_code() & TM_CAUSE_KVM_FAC_UNAV) == TM_CAUSE_KVM_FAC_UNAV)
                return true;
 
        return false;