aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index f74f355a9617..a01c2d93fd2f 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -702,6 +702,8 @@ void prepare_to_copy(struct task_struct *tsk)
702/* 702/*
703 * Copy a thread.. 703 * Copy a thread..
704 */ 704 */
705extern unsigned long dscr_default; /* defined in arch/powerpc/kernel/sysfs.c */
706
705int copy_thread(unsigned long clone_flags, unsigned long usp, 707int copy_thread(unsigned long clone_flags, unsigned long usp,
706 unsigned long unused, struct task_struct *p, 708 unsigned long unused, struct task_struct *p,
707 struct pt_regs *regs) 709 struct pt_regs *regs)
@@ -769,6 +771,20 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
769 p->thread.ksp_vsid = sp_vsid; 771 p->thread.ksp_vsid = sp_vsid;
770 } 772 }
771#endif /* CONFIG_PPC_STD_MMU_64 */ 773#endif /* CONFIG_PPC_STD_MMU_64 */
774#ifdef CONFIG_PPC64
775 if (cpu_has_feature(CPU_FTR_DSCR)) {
776 if (current->thread.dscr_inherit) {
777 p->thread.dscr_inherit = 1;
778 p->thread.dscr = current->thread.dscr;
779 } else if (0 != dscr_default) {
780 p->thread.dscr_inherit = 1;
781 p->thread.dscr = dscr_default;
782 } else {
783 p->thread.dscr_inherit = 0;
784 p->thread.dscr = 0;
785 }
786 }
787#endif
772 788
773 /* 789 /*
774 * The PPC64 ABI makes use of a TOC to contain function 790 * The PPC64 ABI makes use of a TOC to contain function