]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc: Implement PPR save/restore
authorHaren Myneni <haren@linux.vnet.ibm.com>
Thu, 6 Dec 2012 21:51:04 +0000 (21:51 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Jan 2013 06:01:13 +0000 (17:01 +1100)
commit44e9309f1f357794b7ae93d5f3e3e6f11d2b8a7f
tree3bfa0ffc5014355234fd8b7d45e49b0953b757f7
parent13e7a8e846c2ea38a552b986ea49332f965bbb7a
powerpc: Implement PPR save/restore

[PATCH 6/6] powerpc: Implement PPR save/restore

When the task enters in to kernel space, the user defined priority (PPR)
will be saved in to PACA at the beginning of first level exception
vector and then copy from PACA to thread_info in second level vector.
PPR will be restored from thread_info before exits the kernel space.

P7/P8 temporarily raises the thread priority to higher level during
exception until the program executes HMT_* calls. But it will not modify
PPR register. So we save PPR value whenever some register is available
to use and then calls HMT_MEDIUM to increase the priority. This feature
supports on P7 or later processors.

We save/ restore PPR for all exception vectors except system call entry.
GLIBC will be saving / restore for system calls. So the default PPR
value (3) will be set for the system call exit when the task returned
to the user space.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64s.S