/linux-6.6.21/drivers/misc/ocxl/ |
D | trace.h | 36 TP_PROTO(int pasid, unsigned long pidr), 37 TP_ARGS(pasid, pidr), 40 __field(int, pasid) 45 __entry->pasid = pasid; 50 __entry->pasid, 56 TP_PROTO(int pasid, unsigned long pidr), 57 TP_ARGS(pasid, pidr), 60 __field(int, pasid) 65 __entry->pasid = pasid; 70 __entry->pasid, [all …]
|
D | context.c | 10 int pasid; in ocxl_context_alloc() local 19 pasid = idr_alloc(&afu->contexts_idr, ctx, afu->pasid_base, in ocxl_context_alloc() 21 if (pasid < 0) { in ocxl_context_alloc() 24 return pasid; in ocxl_context_alloc() 29 ctx->pasid = pasid; in ocxl_context_alloc() 86 rc = ocxl_link_add_pe(ctx->afu->fn->link, ctx->pasid, pidr, ctx->tidr, in ocxl_context_attach() 129 pasid_off = ctx->pasid - ctx->afu->pasid_base; in map_pp_mmio() 148 ctx->pasid, vmf->address, offset); in ocxl_mmap_fault() 231 rc = ocxl_config_terminate_pasid(dev, afu_control_pos, ctx->pasid); in ocxl_context_detach() 233 trace_ocxl_terminate_pasid(ctx->pasid, rc); in ocxl_context_detach() [all …]
|
D | link.c | 538 int ocxl_link_add_pe(void *link_handle, int pasid, u32 pidr, u32 tidr, in ocxl_link_add_pe() argument 550 if (pasid > SPA_PASID_MAX) in ocxl_link_add_pe() 554 pe_handle = pasid & SPA_PE_MASK; in ocxl_link_add_pe() 576 pe->pasid = cpu_to_be32(pasid << (31 - 19)); in ocxl_link_add_pe() 595 trace_ocxl_init_mmu_notifier(pasid, mm->context.id); in ocxl_link_add_pe() 624 trace_ocxl_context_add(current->pid, spa->spa_mem, pasid, pidr, tidr); in ocxl_link_add_pe() 631 int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid) in ocxl_link_update_pe() argument 638 if (pasid > SPA_PASID_MAX) in ocxl_link_update_pe() 641 pe_handle = pasid & SPA_PE_MASK; in ocxl_link_update_pe() 667 int ocxl_link_remove_pe(void *link_handle, int pasid) in ocxl_link_remove_pe() argument [all …]
|
/linux-6.6.21/drivers/gpu/drm/amd/amdkfd/ |
D | cik_event_interrupt.c | 38 uint16_t pasid; in cik_event_interrupt_isr() local 54 ret = f2g->get_atc_vmid_pasid_mapping_info(dev->adev, vmid, &pasid); in cik_event_interrupt_isr() 58 tmp_ihre->ring_id |= pasid << 16; in cik_event_interrupt_isr() 60 return ret && (pasid != 0) && in cik_event_interrupt_isr() 72 pasid = (ihre->ring_id & 0xffff0000) >> 16; in cik_event_interrupt_isr() 73 if (WARN_ONCE(pasid == 0, "FW bug: No PASID in KFD interrupt")) in cik_event_interrupt_isr() 95 u32 pasid = (ihre->ring_id & 0xffff0000) >> 16; in cik_event_interrupt_wq() local 97 if (pasid == 0) in cik_event_interrupt_wq() 101 kfd_signal_event_interrupt(pasid, context_id, 28); in cik_event_interrupt_wq() 103 kfd_signal_event_interrupt(pasid, context_id, 28); in cik_event_interrupt_wq() [all …]
|
D | kfd_int_process_v9.c | 144 uint16_t pasid, uint16_t client_id) in event_interrupt_poison_consumption_v9() argument 147 struct kfd_process *p = kfd_lookup_process_by_pasid(pasid); in event_interrupt_poison_consumption_v9() 164 ret = kfd_dqm_evict_pasid(dev->dqm, pasid); in event_interrupt_poison_consumption_v9() 176 kfd_signal_poison_consumed_event(dev, pasid); in event_interrupt_poison_consumption_v9() 218 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v9() local 231 pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v9() 257 if (!pasid && dev->dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS) { in event_interrupt_isr_v9() 264 pasid = dev->dqm->vmid_pasid[vmid]; in event_interrupt_isr_v9() 268 & ~pasid_mask) | pasid); in event_interrupt_isr_v9() 272 client_id, source_id, vmid, pasid); in event_interrupt_isr_v9() [all …]
|
D | kfd_int_process_v10.c | 133 uint16_t pasid, uint16_t client_id) in event_interrupt_poison_consumption() argument 136 struct kfd_process *p = kfd_lookup_process_by_pasid(pasid); in event_interrupt_poison_consumption() 153 ret = kfd_dqm_evict_pasid(dev->dqm, pasid); in event_interrupt_poison_consumption() 165 kfd_signal_poison_consumed_event(dev, pasid); in event_interrupt_poison_consumption() 188 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v10() local 201 pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v10() 223 client_id, source_id, vmid, pasid); in event_interrupt_isr_v10() 229 if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt")) in event_interrupt_isr_v10() 248 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_wq_v10() local 254 pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v10() [all …]
|
D | kfd_int_process_v11.c | 192 uint16_t pasid, uint16_t source_id) in event_interrupt_poison_consumption_v11() argument 195 struct kfd_process *p = kfd_lookup_process_by_pasid(pasid); in event_interrupt_poison_consumption_v11() 212 ret = dev->dqm->ops.reset_queues(dev->dqm, pasid); in event_interrupt_poison_consumption_v11() 219 kfd_signal_poison_consumed_event(dev, pasid); in event_interrupt_poison_consumption_v11() 234 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v11() local 247 pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v11() 255 client_id, source_id, vmid, pasid); in event_interrupt_isr_v11() 261 if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt")) in event_interrupt_isr_v11() 281 uint16_t source_id, client_id, ring_id, pasid, vmid; in event_interrupt_wq_v11() local 290 pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v11() [all …]
|
/linux-6.6.21/drivers/iommu/intel/ |
D | pasid.c | 29 int vcmd_alloc_pasid(struct intel_iommu *iommu, u32 *pasid) in vcmd_alloc_pasid() argument 45 *pasid = VCMD_VRSP_RESULT_PASID(res); in vcmd_alloc_pasid() 60 void vcmd_free_pasid(struct intel_iommu *iommu, u32 pasid) in vcmd_free_pasid() argument 68 VCMD_CMD_OPERAND(pasid) | VCMD_CMD_FREE); in vcmd_free_pasid() 186 static struct pasid_entry *intel_pasid_get_entry(struct device *dev, u32 pasid) in intel_pasid_get_entry() argument 195 if (WARN_ON(!pasid_table || pasid >= intel_pasid_get_dev_max_id(dev))) in intel_pasid_get_entry() 200 dir_index = pasid >> PASID_PDE_SHIFT; in intel_pasid_get_entry() 201 index = pasid & PASID_PTE_MASK; in intel_pasid_get_entry() 258 intel_pasid_clear_entry(struct device *dev, u32 pasid, bool fault_ignore) in intel_pasid_clear_entry() argument 262 pe = intel_pasid_get_entry(dev, pasid); in intel_pasid_clear_entry() [all …]
|
D | svm.c | 31 static int pasid_private_add(ioasid_t pasid, void *priv) in pasid_private_add() argument 33 return xa_alloc(&pasid_private_array, &pasid, priv, in pasid_private_add() 34 XA_LIMIT(pasid, pasid), GFP_ATOMIC); in pasid_private_add() 37 static void pasid_private_remove(ioasid_t pasid) in pasid_private_remove() argument 39 xa_erase(&pasid_private_array, pasid); in pasid_private_remove() 42 static void *pasid_private_find(ioasid_t pasid) in pasid_private_find() argument 44 return xa_load(&pasid_private_array, pasid); in pasid_private_find() 182 qi_flush_piotlb(sdev->iommu, sdev->did, svm->pasid, address, pages, ih); in __flush_svm_range_dev() 185 svm->pasid, sdev->qdep, address, in __flush_svm_range_dev() 188 svm->pasid, sdev->qdep); in __flush_svm_range_dev() [all …]
|
D | pasid.h | 105 u32 pasid, u16 did, int flags); 108 struct device *dev, u32 pasid); 111 struct device *dev, u32 pasid); 113 struct device *dev, u32 pasid, 115 int vcmd_alloc_pasid(struct intel_iommu *iommu, u32 *pasid); 116 void vcmd_free_pasid(struct intel_iommu *iommu, u32 pasid); 118 struct device *dev, u32 pasid);
|
D | iommu.h | 426 #define QI_PC_PASID(pasid) (((u64)pasid) << 32) argument 438 #define QI_EIOTLB_PASID(pasid) (((u64)pasid) << 32) argument 460 #define QI_PGRP_PASID(pasid) (((u64)(pasid)) << 32) argument 727 ioasid_t pasid; member 822 void qi_flush_piotlb(struct intel_iommu *iommu, u16 did, u32 pasid, u64 addr, 826 u32 pasid, u16 qdep, u64 addr, 830 u32 pasid, u16 qdep); 832 u32 pasid); 856 void intel_svm_remove_dev_pasid(struct device *dev, ioasid_t pasid); 857 void intel_drain_pasid_prq(struct device *dev, u32 pasid); [all …]
|
/linux-6.6.21/drivers/iommu/ |
D | iommu-sva.c | 17 ioasid_t pasid; in iommu_sva_alloc_pasid() local 26 if (mm->pasid >= dev->iommu->max_pasids) in iommu_sva_alloc_pasid() 31 pasid = iommu_alloc_global_pasid(dev); in iommu_sva_alloc_pasid() 32 if (pasid == IOMMU_PASID_INVALID) { in iommu_sva_alloc_pasid() 36 mm->pasid = pasid; in iommu_sva_alloc_pasid() 76 domain = iommu_get_domain_for_dev_pasid(dev, mm->pasid, in iommu_sva_bind_device() 95 ret = iommu_attach_device_pasid(domain, dev, mm->pasid); in iommu_sva_bind_device() 127 ioasid_t pasid = domain->mm->pasid; in iommu_sva_unbind_device() local 132 iommu_detach_device_pasid(domain, dev, pasid); in iommu_sva_unbind_device() 144 return domain->mm->pasid; in iommu_sva_get_pasid() [all …]
|
/linux-6.6.21/drivers/pci/ |
D | ats.c | 364 int pasid = pdev->pasid_cap; in pci_enable_pasid() local 382 if (!pasid) in pci_enable_pasid() 388 pci_read_config_word(pdev, pasid + PCI_PASID_CAP, &supported); in pci_enable_pasid() 398 pci_write_config_word(pdev, pasid + PCI_PASID_CTRL, control); in pci_enable_pasid() 413 int pasid = pdev->pasid_cap; in pci_disable_pasid() local 422 if (!pasid) in pci_disable_pasid() 425 pci_write_config_word(pdev, pasid + PCI_PASID_CTRL, control); in pci_disable_pasid() 438 int pasid = pdev->pasid_cap; in pci_restore_pasid_state() local 446 if (!pasid) in pci_restore_pasid_state() 450 pci_write_config_word(pdev, pasid + PCI_PASID_CTRL, control); in pci_restore_pasid_state() [all …]
|
/linux-6.6.21/drivers/iommu/amd/ |
D | iommu_v2.c | 44 u32 pasid; /* PASID index */ member 73 u32 pasid; member 152 u32 pasid, bool alloc) in __get_pasid_state_ptr() argument 162 index = (pasid >> (9 * level)) & 0x1ff; in __get_pasid_state_ptr() 186 u32 pasid) in set_pasid_state() argument 193 ptr = __get_pasid_state_ptr(dev_state, pasid, true); in set_pasid_state() 213 static void clear_pasid_state(struct device_state *dev_state, u32 pasid) in clear_pasid_state() argument 219 ptr = __get_pasid_state_ptr(dev_state, pasid, true); in clear_pasid_state() 231 u32 pasid) in get_pasid_state() argument 237 ptr = __get_pasid_state_ptr(dev_state, pasid, false); in get_pasid_state() [all …]
|
D | amd_iommu.h | 58 int amd_iommu_flush_page(struct iommu_domain *dom, u32 pasid, u64 address); 63 int amd_iommu_flush_tlb(struct iommu_domain *dom, u32 pasid); 64 int amd_iommu_domain_set_gcr3(struct iommu_domain *dom, u32 pasid, 66 int amd_iommu_domain_clear_gcr3(struct iommu_domain *dom, u32 pasid); 81 int amd_iommu_complete_ppr(struct pci_dev *pdev, u32 pasid,
|
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_ids.c | 46 u32 pasid; member 62 int pasid = -EINVAL; in amdgpu_pasid_alloc() local 65 pasid = ida_simple_get(&amdgpu_pasid_ida, in amdgpu_pasid_alloc() 68 if (pasid != -ENOSPC) in amdgpu_pasid_alloc() 72 if (pasid >= 0) in amdgpu_pasid_alloc() 73 trace_amdgpu_pasid_allocated(pasid); in amdgpu_pasid_alloc() 75 return pasid; in amdgpu_pasid_alloc() 82 void amdgpu_pasid_free(u32 pasid) in amdgpu_pasid_free() argument 84 trace_amdgpu_pasid_freed(pasid); in amdgpu_pasid_free() 85 ida_simple_remove(&amdgpu_pasid_ida, pasid); in amdgpu_pasid_free() [all …]
|
D | amdgpu_mes.c | 220 int amdgpu_mes_create_process(struct amdgpu_device *adev, int pasid, in amdgpu_mes_create_process() argument 252 r = idr_alloc(&adev->mes.pasid_idr, process, pasid, pasid + 1, in amdgpu_mes_create_process() 255 DRM_ERROR("failed to lock pasid=%d\n", pasid); in amdgpu_mes_create_process() 261 process->pasid = pasid; in amdgpu_mes_create_process() 278 void amdgpu_mes_destroy_process(struct amdgpu_device *adev, int pasid) in amdgpu_mes_destroy_process() argument 293 process = idr_find(&adev->mes.pasid_idr, pasid); in amdgpu_mes_destroy_process() 295 DRM_WARN("pasid %d doesn't exist\n", pasid); in amdgpu_mes_destroy_process() 319 idr_remove(&adev->mes.pasid_idr, pasid); in amdgpu_mes_destroy_process() 343 int amdgpu_mes_add_gang(struct amdgpu_device *adev, int pasid, in amdgpu_mes_add_gang() argument 375 process = idr_find(&adev->mes.pasid_idr, pasid); in amdgpu_mes_add_gang() [all …]
|
D | amdgpu_trace.h | 88 __field(unsigned, pasid) 100 __entry->pasid = iv->pasid; 110 __entry->timestamp, __entry->pasid, 223 __field(u32, pasid) 233 __entry->pasid = vm->pasid; 241 __entry->pasid, __get_str(ring), __entry->vmid, 439 TP_PROTO(unsigned pasid), 440 TP_ARGS(pasid), 442 __field(unsigned, pasid) 445 __entry->pasid = pasid; [all …]
|
D | amdgpu_gmc.h | 131 int (*flush_gpu_tlb_pasid)(struct amdgpu_device *adev, uint16_t pasid, 139 unsigned pasid); 339 #define amdgpu_gmc_flush_gpu_tlb_pasid(adev, pasid, type, allhub, inst) \ argument 341 ((adev), (pasid), (type), (allhub), (inst))) 343 …e amdgpu_gmc_emit_pasid_mapping(r, vmid, pasid) (r)->adev->gmc.gmc_funcs->emit_pasid_mapping((r), … argument 397 uint16_t pasid, uint64_t timestamp); 399 uint16_t pasid);
|
D | amdgpu_ids.h | 61 unsigned pasid; member 75 void amdgpu_pasid_free(u32 pasid); 77 u32 pasid);
|
/linux-6.6.21/drivers/dma/idxd/ |
D | cdev.c | 45 unsigned int pasid; member 55 static void idxd_cdev_evl_drain_pasid(struct idxd_wq *wq, u32 pasid); 132 idxd_device_drain_pasid(idxd, ctx->pasid); in idxd_file_dev_release() 145 idxd_cdev_evl_drain_pasid(wq, ctx->pasid); in idxd_file_dev_release() 197 ptr = xa_cmpxchg(&wq->upasid_xa, ctx->pasid, ctx, NULL, GFP_KERNEL); in idxd_xa_pasid_remove() 200 ctx->pasid); in idxd_xa_pasid_remove() 204 void idxd_user_counter_increment(struct idxd_wq *wq, u32 pasid, int index) in idxd_user_counter_increment() argument 212 ctx = xa_load(&wq->upasid_xa, pasid); in idxd_user_counter_increment() 229 unsigned int pasid; in idxd_cdev_open() local 261 pasid = iommu_sva_get_pasid(sva); in idxd_cdev_open() [all …]
|
/linux-6.6.21/arch/csky/include/asm/ |
D | asid.h | 33 void asid_new_context(struct asid_info *info, atomic64_t *pasid, 43 atomic64_t *pasid, unsigned int cpu, in asid_check_context() argument 48 asid = atomic64_read(pasid); in asid_check_context() 71 asid_new_context(info, pasid, cpu, mm); in asid_check_context()
|
/linux-6.6.21/arch/csky/mm/ |
D | asid.c | 79 static u64 new_context(struct asid_info *info, atomic64_t *pasid, in new_context() argument 83 u64 asid = atomic64_read(pasid); in new_context() 137 void asid_new_context(struct asid_info *info, atomic64_t *pasid, in asid_new_context() argument 145 asid = atomic64_read(pasid); in asid_new_context() 147 asid = new_context(info, pasid, mm); in asid_new_context() 148 atomic64_set(pasid, asid); in asid_new_context()
|
/linux-6.6.21/include/linux/ |
D | amd-iommu.h | 62 extern int amd_iommu_bind_pasid(struct pci_dev *pdev, u32 pasid, 74 extern void amd_iommu_unbind_pasid(struct pci_dev *pdev, u32 pasid); 100 u32 pasid, 152 typedef void (*amd_iommu_invalidate_ctx)(struct pci_dev *pdev, u32 pasid);
|
/linux-6.6.21/include/uapi/linux/ |
D | iommu.h | 75 __u32 pasid; member 100 __u32 pasid; member 156 __u32 pasid; member
|