diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-01-19 02:50:31 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-20 12:59:00 +0100 |
commit | 06bb53b33804613627c7ca1eda246459a7be2803 (patch) | |
tree | 61428a22fe89565f607bf32480a6173255fb8c7b /arch/powerpc/include/asm/pkeys.h | |
parent | powerpc: ability to create execute-disabled pkeys (diff) | |
download | linux-06bb53b33804613627c7ca1eda246459a7be2803.tar.xz linux-06bb53b33804613627c7ca1eda246459a7be2803.zip |
powerpc: store and restore the pkey state across context switches
Store and restore the AMR, IAMR and UAMOR register state of the task
before scheduling out and after scheduling in, respectively.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/pkeys.h')
-rw-r--r-- | arch/powerpc/include/asm/pkeys.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h index bf8e706dcb0f..41c303a01e1a 100644 --- a/arch/powerpc/include/asm/pkeys.h +++ b/arch/powerpc/include/asm/pkeys.h @@ -139,4 +139,8 @@ static inline int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, } extern void pkey_mm_init(struct mm_struct *mm); +extern void thread_pkey_regs_save(struct thread_struct *thread); +extern void thread_pkey_regs_restore(struct thread_struct *new_thread, + struct thread_struct *old_thread); +extern void thread_pkey_regs_init(struct thread_struct *thread); #endif /*_ASM_POWERPC_KEYS_H */ |