[RFC PATCH 08/11] powerpc/tm: Do not reclaim on ptrace
Breno Leitao
leitao at debian.org
Thu Sep 13 05:40:16 AEST 2018
Make sure that we are not suspended on ptrace and that the registers were
already reclaimed.
Since the data was already reclaimed, there is nothing to be done here
except to restore the SPRs.
Signed-off-by: Breno Leitao <leitao at debian.org>
---
arch/powerpc/kernel/ptrace.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 9667666eb18e..cf6ee9154b11 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -136,12 +136,10 @@ static void flush_tmregs_to_thread(struct task_struct *tsk)
if ((!cpu_has_feature(CPU_FTR_TM)) || (tsk != current))
return;
- if (MSR_TM_SUSPENDED(mfmsr())) {
- tm_reclaim_current(TM_CAUSE_SIGNAL);
- } else {
- tm_enable();
- tm_save_sprs(&(tsk->thread));
- }
+ WARN_ON(MSR_TM_SUSPENDED(mfmsr()));
+
+ tm_enable();
+ tm_save_sprs(&(tsk->thread));
}
#else
static inline void flush_tmregs_to_thread(struct task_struct *tsk) { }
--
2.19.0
More information about the Linuxppc-dev
mailing list