Lines Matching refs:amr
218 return current->thread.regs->amr; in current_thread_amr()
240 unsigned long amr, iamr; in kuap_user_restore() local
246 amr = mfspr(SPRN_AMR); in kuap_user_restore()
247 if (amr != regs->amr) in kuap_user_restore()
265 mtspr(SPRN_AMR, regs->amr); in kuap_user_restore()
276 static inline void __kuap_kernel_restore(struct pt_regs *regs, unsigned long amr) in __kuap_kernel_restore() argument
278 if (likely(regs->amr == amr)) in __kuap_kernel_restore()
282 mtspr(SPRN_AMR, regs->amr); in __kuap_kernel_restore()
294 unsigned long amr = mfspr(SPRN_AMR); in __kuap_get_and_assert_locked() local
297 WARN_ON_ONCE(amr != AMR_KUAP_BLOCKED); in __kuap_get_and_assert_locked()
298 return amr; in __kuap_get_and_assert_locked()
360 return (regs->amr & AMR_KUAP_BLOCK_WRITE) == AMR_KUAP_BLOCK_WRITE; in __bad_kuap_fault()
362 return (regs->amr & AMR_KUAP_BLOCK_READ) == AMR_KUAP_BLOCK_READ; in __bad_kuap_fault()