diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-07 17:37:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-07 17:37:45 -0800 |
commit | 9579f10dfdd91d5a1bc77a588b630bc945d9fb95 (patch) | |
tree | be262474a629de6dd18803162a2d3bbb857ee3df /arch | |
parent | 721f0c126075294e66df73051cc2e1d795ef2095 (diff) | |
parent | a5b2cf5b1af424ee3dd9e3ce6d5cea18cb927e67 (diff) | |
download | linux-9579f10dfdd91d5a1bc77a588b630bc945d9fb95.tar.bz2 |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull power fixes from Ben Herrenschmidt:
"Here are a couple of powerpc fixes for 3.14.
One is (another!) nasty TM problem, we can crash the kernel by forking
inside a transaction. The other one is a simple fix for an alignment
issue which can hurt in LE mode"
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Align p_dyn, p_rela and p_st symbols
powerpc/tm: Fix crash when forking inside a transaction
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/process.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/reloc_64.S | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8d4c247f1738..af064d28b365 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1048,6 +1048,15 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) flush_altivec_to_thread(src); flush_vsx_to_thread(src); flush_spe_to_thread(src); + /* + * Flush TM state out so we can copy it. __switch_to_tm() does this + * flush but it removes the checkpointed state from the current CPU and + * transitions the CPU out of TM mode. Hence we need to call + * tm_recheckpoint_new_task() (on the same task) to restore the + * checkpointed state back and the TM mode. + */ + __switch_to_tm(src); + tm_recheckpoint_new_task(src); *dst = *src; diff --git a/arch/powerpc/kernel/reloc_64.S b/arch/powerpc/kernel/reloc_64.S index 1482327cfeba..d88736fbece6 100644 --- a/arch/powerpc/kernel/reloc_64.S +++ b/arch/powerpc/kernel/reloc_64.S @@ -81,6 +81,7 @@ _GLOBAL(relocate) 6: blr +.balign 8 p_dyn: .llong __dynamic_start - 0b p_rela: .llong __rela_dyn_start - 0b p_st: .llong _stext - 0b |