diff options
author | Haren Myneni <haren@linux.vnet.ibm.com> | 2012-12-06 21:49:56 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-01-10 17:01:08 +1100 |
commit | 92779245599bb3d7fb48066b11c4bfd6aa477198 (patch) | |
tree | bea152148a83002c420fd92e59aac37bb8f18f70 /arch/powerpc/kernel/process.c | |
parent | a09688cd23d477ebd9c8f57881bfe907240cb0a1 (diff) | |
download | op-kernel-dev-92779245599bb3d7fb48066b11c4bfd6aa477198.zip op-kernel-dev-92779245599bb3d7fb48066b11c4bfd6aa477198.tar.gz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8143067..3065d17 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 |