diff options
author | Chris Zankel <chris@zankel.net> | 2016-01-21 05:16:13 +0000 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2016-01-21 05:16:13 +0000 |
commit | d1208404dd477c142680437137c9996b95bfd508 (patch) | |
tree | 0cba53f59f487c0de2b1a0d9fb1b11ae27de96ec /arch/powerpc/kernel/process.c | |
parent | afaa7c542cc9c4d8a99ba252a8ea5e8bc7c897e2 (diff) | |
parent | afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff) | |
download | talos-op-linux-d1208404dd477c142680437137c9996b95bfd508.tar.gz talos-op-linux-d1208404dd477c142680437137c9996b95bfd508.zip |
Merge tag 'v4.4'
Linux 4.4
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 75b6676c1a0b..646bf4d222c1 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -551,6 +551,24 @@ static void tm_reclaim_thread(struct thread_struct *thr, msr_diff &= MSR_FP | MSR_VEC | MSR_VSX | MSR_FE0 | MSR_FE1; } + /* + * Use the current MSR TM suspended bit to track if we have + * checkpointed state outstanding. + * On signal delivery, we'd normally reclaim the checkpointed + * state to obtain stack pointer (see:get_tm_stackpointer()). + * This will then directly return to userspace without going + * through __switch_to(). However, if the stack frame is bad, + * we need to exit this thread which calls __switch_to() which + * will again attempt to reclaim the already saved tm state. + * Hence we need to check that we've not already reclaimed + * this state. + * We do this using the current MSR, rather tracking it in + * some specific thread_struct bit, as it has the additional + * benifit of checking for a potential TM bad thing exception. + */ + if (!MSR_TM_SUSPENDED(mfmsr())) + return; + tm_reclaim(thr, thr->regs->msr, cause); /* Having done the reclaim, we now have the checkpointed |