• Haren Myneni's avatar
    powerpc: Implement PPR save/restore · 44e9309f
    Haren Myneni authored
    [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: default avatarHaren Myneni <haren@us.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    44e9309f
exceptions-64s.S 36.6 KB