diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-11 10:05:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-13 11:51:08 +0300 |
commit | 6d9e96f37d389a0ff5825c7e9e456c81a2fe321b (patch) | |
tree | a1e12df9abd48ac8ba1f9fe36b2c143c9a2a296e /arch | |
parent | eb05c02903a76c3bba0bd4eebe34fa684b0ca759 (diff) | |
download | linux-6d9e96f37d389a0ff5825c7e9e456c81a2fe321b.tar.xz |
Revert "powerpc/tm: Unset MSR[TS] if not recheckpointing"
This reverts commit a9935a12768851762089fda8e5a9daaf0231808e which is
commit 6f5b9f018f4c7686fd944d920209d1382d320e4e upstream.
It breaks the powerpc build, so drop it from the tree until a fix goes
upstream.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Breno Leitao <leitao@debian.org>
Cc: Michal Suchánek <msuchanek@suse.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 18 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 20 |
2 files changed, 9 insertions, 29 deletions
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 6327fd79b0fb..e6474a45cef5 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -1140,11 +1140,11 @@ SYSCALL_DEFINE0(rt_sigreturn) { struct rt_sigframe __user *rt_sf; struct pt_regs *regs = current_pt_regs(); - int tm_restore = 0; #ifdef CONFIG_PPC_TRANSACTIONAL_MEM struct ucontext __user *uc_transact; unsigned long msr_hi; unsigned long tmp; + int tm_restore = 0; #endif /* Always make any pending restarted system calls return -EINTR */ current->restart_block.fn = do_no_restart_syscall; @@ -1192,19 +1192,11 @@ SYSCALL_DEFINE0(rt_sigreturn) goto bad; } } - if (!tm_restore) { - /* - * Unset regs->msr because ucontext MSR TS is not - * set, and recheckpoint was not called. This avoid - * hitting a TM Bad thing at RFID - */ - regs->msr &= ~MSR_TS_MASK; - } - /* Fall through, for non-TM restore */ -#endif if (!tm_restore) - if (do_setcontext(&rt_sf->uc, regs, 1)) - goto bad; + /* Fall through, for non-TM restore */ +#endif + if (do_setcontext(&rt_sf->uc, regs, 1)) + goto bad; /* * It's not clear whether or why it is desirable to save the diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index daa28cb72272..83d51bf586c7 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c @@ -740,23 +740,11 @@ SYSCALL_DEFINE0(rt_sigreturn) &uc_transact->uc_mcontext)) goto badframe; } -#endif + else /* Fall through, for non-TM restore */ - if (!MSR_TM_ACTIVE(msr)) { - /* - * Unset MSR[TS] on the thread regs since MSR from user - * context does not have MSR active, and recheckpoint was - * not called since restore_tm_sigcontexts() was not called - * also. - * - * If not unsetting it, the code can RFID to userspace with - * MSR[TS] set, but without CPU in the proper state, - * causing a TM bad thing. - */ - current->thread.regs->msr &= ~MSR_TS_MASK; - if (restore_sigcontext(current, NULL, 1, &uc->uc_mcontext)) - goto badframe; - } +#endif + if (restore_sigcontext(current, NULL, 1, &uc->uc_mcontext)) + goto badframe; if (restore_altstack(&uc->uc_stack)) goto badframe; |