]> git.baikalelectronics.ru Git - kernel.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)
commit6ec6b86c227d19fbce6850546d821cc3966dd1a3
tree3bfa0ffc5014355234fd8b7d45e49b0953b757f7
parentbe9b7b08aab36f4633f44c0734f0b29b2bb1500f
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