Lines Matching refs:pasid
376 ret = device_property_read_u32(dev, "pasid-num-bits", &bits);
1486 if (needs_pasid && (!has_pasid || msg->pasid != prm->pasid))
1492 msg->pasid = 0;
3370 struct iommu_group *group, ioasid_t pasid)
3376 ret = domain->ops->set_dev_pasid(domain, device->dev, pasid);
3385 ioasid_t pasid)
3392 ops->remove_dev_pasid(device->dev, pasid);
3397 * iommu_attach_device_pasid() - Attach a domain to pasid of device
3400 * @pasid: the pasid of the device.
3405 struct device *dev, ioasid_t pasid)
3419 curr = xa_cmpxchg(&group->pasid_array, pasid, NULL, domain, GFP_KERNEL);
3425 ret = __iommu_set_group_pasid(domain, group, pasid);
3427 __iommu_remove_group_pasid(group, pasid);
3428 xa_erase(&group->pasid_array, pasid);
3439 * iommu_detach_device_pasid() - Detach the domain from pasid of device
3442 * @pasid: the pasid of the device.
3444 * The @domain must have been attached to @pasid of the @dev with
3448 ioasid_t pasid)
3453 __iommu_remove_group_pasid(group, pasid);
3454 WARN_ON(xa_erase(&group->pasid_array, pasid) != domain);
3462 * iommu_get_domain_for_dev_pasid() - Retrieve domain for @pasid of @dev
3464 * @pasid: the pasid of the device
3468 * domain attached to pasid of a device. Callers must hold a lock around this
3476 ioasid_t pasid,
3487 domain = xa_load(&group->pasid_array, pasid);
3534 void iommu_free_global_pasid(ioasid_t pasid)
3536 if (WARN_ON(pasid == IOMMU_PASID_INVALID))
3539 ida_free(&iommu_global_pasid_ida, pasid);