diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /arch/powerpc/kernel/process.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index d645da302bf2..baae104b16c7 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -864,6 +864,25 @@ static void tm_reclaim_thread(struct thread_struct *thr, | |||
864 | if (!MSR_TM_SUSPENDED(mfmsr())) | 864 | if (!MSR_TM_SUSPENDED(mfmsr())) |
865 | return; | 865 | return; |
866 | 866 | ||
867 | /* | ||
868 | * If we are in a transaction and FP is off then we can't have | ||
869 | * used FP inside that transaction. Hence the checkpointed | ||
870 | * state is the same as the live state. We need to copy the | ||
871 | * live state to the checkpointed state so that when the | ||
872 | * transaction is restored, the checkpointed state is correct | ||
873 | * and the aborted transaction sees the correct state. We use | ||
874 | * ckpt_regs.msr here as that's what tm_reclaim will use to | ||
875 | * determine if it's going to write the checkpointed state or | ||
876 | * not. So either this will write the checkpointed registers, | ||
877 | * or reclaim will. Similarly for VMX. | ||
878 | */ | ||
879 | if ((thr->ckpt_regs.msr & MSR_FP) == 0) | ||
880 | memcpy(&thr->ckfp_state, &thr->fp_state, | ||
881 | sizeof(struct thread_fp_state)); | ||
882 | if ((thr->ckpt_regs.msr & MSR_VEC) == 0) | ||
883 | memcpy(&thr->ckvr_state, &thr->vr_state, | ||
884 | sizeof(struct thread_vr_state)); | ||
885 | |||
867 | giveup_all(container_of(thr, struct task_struct, thread)); | 886 | giveup_all(container_of(thr, struct task_struct, thread)); |
868 | 887 | ||
869 | tm_reclaim(thr, thr->ckpt_regs.msr, cause); | 888 | tm_reclaim(thr, thr->ckpt_regs.msr, cause); |