summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorHaren Myneni2012-12-06 22:49:56 +0100
committerBenjamin Herrenschmidt2013-01-10 07:01:08 +0100
commit92779245599bb3d7fb48066b11c4bfd6aa477198 (patch)
treebea152148a83002c420fd92e59aac37bb8f18f70 /arch/powerpc/kernel/process.c
parentpowerpc: Increase exceptions arrays in paca struct to save PPR (diff)
downloadkernel-qcow2-linux-92779245599bb3d7fb48066b11c4bfd6aa477198.tar.gz
kernel-qcow2-linux-92779245599bb3d7fb48066b11c4bfd6aa477198.tar.xz
kernel-qcow2-linux-92779245599bb3d7fb48066b11c4bfd6aa477198.zip
powerpc: Define ppr in thread_struct
[PATCH 4/6] powerpc: Define ppr in thread_struct ppr in thread_struct is used to save PPR and restore it before process exits from kernel. This patch sets the default priority to 3 when tasks are created such that users can use 4 for higher priority tasks. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 81430674e71c..3065d17f3606 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -813,6 +813,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
p->thread.dscr_inherit = current->thread.dscr_inherit;
p->thread.dscr = current->thread.dscr;
}
+ if (cpu_has_feature(CPU_FTR_HAS_PPR))
+ p->thread.ppr = INIT_PPR;
#endif
/*
* The PPC64 ABI makes use of a TOC to contain function