Home
last modified time | relevance | path

Searched refs:amr (Results 1 – 25 of 34) sorted by relevance

12

/linux-5.19.10/arch/powerpc/include/asm/book3s/64/
Dkup.h218 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()
[all …]
/linux-5.19.10/tools/testing/selftests/powerpc/include/
Dpkeys.h47 inline void pkeyreg_set(unsigned long amr) in pkeyreg_set() argument
49 set_amr(amr); in pkeyreg_set()
54 unsigned long amr, shift; in pkey_set_rights() local
57 amr = pkeyreg_get(); in pkey_set_rights()
58 amr &= ~(PKEY_BITS_MASK << shift); in pkey_set_rights()
59 amr |= (rights & PKEY_BITS_MASK) << shift; in pkey_set_rights()
60 pkeyreg_set(amr); in pkey_set_rights()
/linux-5.19.10/arch/powerpc/mm/book3s64/
Dpkeys.c318 current->thread.regs->amr = old_amr | new_amr_bits; in init_amr()
416 u64 amr; in pkey_access_permitted() local
422 amr = current_thread_amr(); in pkey_access_permitted()
424 return !(amr & (AMR_WR_BIT << pkey_shift)); in pkey_access_permitted()
426 return !(amr & (AMR_RD_BIT << pkey_shift)); in pkey_access_permitted()
/linux-5.19.10/tools/testing/selftests/powerpc/ptrace/
Dcore-pkey.c52 unsigned long amr; member
139 info->amr |= 3ul << pkeyshift(pkey1) | 2ul << pkeyshift(pkey2); in child()
151 user_write, info->amr, pkey1, pkey2, pkey3); in child()
153 set_amr(info->amr); in child()
249 FAIL_IF(regs[0] != info->amr); in check_core_file()
272 info->amr = regs[0]; in parent()
/linux-5.19.10/arch/powerpc/include/asm/
Dkup.h58 static inline void __kuap_kernel_restore(struct pt_regs *regs, unsigned long amr) { } in __kuap_kernel_restore() argument
113 static __always_inline void kuap_kernel_restore(struct pt_regs *regs, unsigned long amr) in kuap_kernel_restore() argument
118 __kuap_kernel_restore(regs, amr); in kuap_kernel_restore()
Dkvm_book3s_64.h466 static inline int hpte_get_skey_perm(unsigned long hpte_r, unsigned long amr) in hpte_get_skey_perm() argument
472 return (amr >> (62 - 2 * skey)) & 3; in hpte_get_skey_perm()
596 vcpu->arch.amr = vcpu->arch.amr_tm; in copy_from_checkpoint()
613 vcpu->arch.amr_tm = vcpu->arch.amr; in copy_to_checkpoint()
Dptrace.h70 unsigned long amr; member
/linux-5.19.10/tools/testing/selftests/vm/
Dpkey-powerpc.h53 u64 amr = pkey_reg; in __write_pkey_reg() local
59 : : "r" ((unsigned long)(amr)) : "memory"); in __write_pkey_reg()
/linux-5.19.10/drivers/misc/cxl/
Dnative.c663 static int process_element_entry_psl9(struct cxl_context *ctx, u64 wed, u64 amr) in process_element_entry_psl9() argument
712 ctx->elem->common.amr = cpu_to_be64(amr); in process_element_entry_psl9()
718 int cxl_attach_afu_directed_psl9(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_afu_directed_psl9() argument
723 result = process_element_entry_psl9(ctx, wed, amr); in cxl_attach_afu_directed_psl9()
737 int cxl_attach_afu_directed_psl8(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_afu_directed_psl8() argument
777 ctx->elem->common.amr = cpu_to_be64(amr); in cxl_attach_afu_directed_psl8()
905 int cxl_attach_dedicated_process_psl9(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_dedicated_process_psl9() argument
911 result = process_element_entry_psl9(ctx, wed, amr); in cxl_attach_dedicated_process_psl9()
933 int cxl_attach_dedicated_process_psl8(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_dedicated_process_psl8() argument
954 cxl_p2n_write(afu, CXL_PSL_AMR_An, amr); in cxl_attach_dedicated_process_psl8()
[all …]
Dcxl.h637 int (*attach_afu_directed)(struct cxl_context *ctx, u64 wed, u64 amr);
638 int (*attach_dedicated_process)(struct cxl_context *ctx, u64 wed, u64 amr);
743 __be64 amr; member
902 int cxl_attach_afu_directed_psl9(struct cxl_context *ctx, u64 wed, u64 amr);
903 int cxl_attach_afu_directed_psl8(struct cxl_context *ctx, u64 wed, u64 amr);
906 int cxl_attach_dedicated_process_psl9(struct cxl_context *ctx, u64 wed, u64 amr);
907 int cxl_attach_dedicated_process_psl8(struct cxl_context *ctx, u64 wed, u64 amr);
1082 u64 wed, u64 amr);
Dfile.c151 u64 amr = 0; in afu_ioctl_start_work() local
190 amr = work.amr & mfspr(SPRN_UAMOR); in afu_ioctl_start_work()
251 trace_cxl_attach(ctx, work.work_element_descriptor, work.num_interrupts, amr); in afu_ioctl_start_work()
254 amr))) { in afu_ioctl_start_work()
Dtrace.h89 TP_PROTO(struct cxl_context *ctx, u64 wed, s16 num_interrupts, u64 amr),
91 TP_ARGS(ctx, wed, num_interrupts, amr),
99 __field(u64, amr)
109 __entry->amr = amr;
120 __entry->amr
Dguest.c521 static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr) in attach_afu_directed() argument
586 elem->common.amr = cpu_to_be64(amr); in attach_afu_directed()
626 static int guest_attach_process(struct cxl_context *ctx, bool kernel, u64 wed, u64 amr) in guest_attach_process() argument
632 return attach_afu_directed(ctx, wed, amr); in guest_attach_process()
/linux-5.19.10/arch/powerpc/kernel/
Dinterrupt.c101 unsigned long amr, iamr; in system_call_exception() local
107 amr = mfspr(SPRN_AMR); in system_call_exception()
109 regs->amr = amr; in system_call_exception()
/linux-5.19.10/include/misc/
Docxl.h147 int ocxl_context_attach(struct ocxl_context *ctx, u64 amr,
450 u64 amr, u16 bdf, struct mm_struct *mm,
/linux-5.19.10/arch/powerpc/kvm/
Dbook3s_hv.h8 unsigned long amr; member
Dbook3s_hv_p9_entry.c257 if (host_os_sprs->amr != vcpu->arch.amr) in load_spr_state()
258 mtspr(SPRN_AMR, vcpu->arch.amr); in load_spr_state()
297 vcpu->arch.amr = mfspr(SPRN_AMR); in store_spr_state()
372 host_os_sprs->amr = mfspr(SPRN_AMR); in save_p9_host_os_sprs()
396 if (host_os_sprs->amr != vcpu->arch.amr) in restore_p9_host_os_sprs()
397 mtspr(SPRN_AMR, host_os_sprs->amr); in restore_p9_host_os_sprs()
/linux-5.19.10/drivers/misc/ocxl/
Dfile.c76 u64 amr = 0; in afu_ioctl_attach() local
87 amr = arg.amr & mfspr(SPRN_UAMOR); in afu_ioctl_attach()
88 return ocxl_context_attach(ctx, amr, current->mm); in afu_ioctl_attach()
Dcontext.c69 int ocxl_context_attach(struct ocxl_context *ctx, u64 amr, struct mm_struct *mm) in ocxl_context_attach() argument
87 amr, pci_dev_id(dev), mm, xsl_fault_error, ctx); in ocxl_context_attach()
Docxl_internal.h95 __be64 amr; member
Dlink.c539 u64 amr, u16 bdf, struct mm_struct *mm, in ocxl_link_add_pe() argument
581 pe->amr = cpu_to_be64(amr); in ocxl_link_add_pe()
/linux-5.19.10/include/uapi/misc/
Docxl.h29 __u64 amr; member
Dcxl.h21 __u64 amr; member
/linux-5.19.10/arch/powerpc/platforms/powernv/
Didle.c306 u64 amr; member
378 sprs.amr = mfspr(SPRN_AMR); in power7_idle_insn()
396 mtspr(SPRN_AMR, sprs.amr); in power7_idle_insn()
600 u64 amr; member
687 sprs.amr = mfspr(SPRN_AMR); in power9_idle_stop()
707 mtspr(SPRN_AMR, sprs.amr); in power9_idle_stop()
/linux-5.19.10/arch/powerpc/kernel/ptrace/
Dptrace-view.c469 membuf_store(&to, target->thread.regs->amr); in pkey_get()
503 target->thread.regs->amr = (new_amr & default_uamor) | in pkey_set()
504 (target->thread.regs->amr & ~default_uamor); in pkey_set()

12