Lines Matching defs:pasid
381 ret = device_property_read_u32(dev, "pasid-num-bits", &bits);
3312 struct iommu_group *group, ioasid_t pasid)
3318 ret = domain->ops->set_dev_pasid(domain, device->dev, pasid);
3332 ops->remove_dev_pasid(device->dev, pasid, domain);
3338 ioasid_t pasid,
3346 ops->remove_dev_pasid(device->dev, pasid, domain);
3351 * iommu_attach_device_pasid() - Attach a domain to pasid of device
3354 * @pasid: the pasid of the device.
3359 struct device *dev, ioasid_t pasid)
3374 pasid == IOMMU_NO_PASID)
3379 if (pasid >= device->dev->iommu->max_pasids) {
3385 curr = xa_cmpxchg(&group->pasid_array, pasid, NULL, domain, GFP_KERNEL);
3391 ret = __iommu_set_group_pasid(domain, group, pasid);
3393 xa_erase(&group->pasid_array, pasid);
3401 * iommu_detach_device_pasid() - Detach the domain from pasid of device
3404 * @pasid: the pasid of the device.
3406 * The @domain must have been attached to @pasid of the @dev with
3410 ioasid_t pasid)
3416 __iommu_remove_group_pasid(group, pasid, domain);
3417 WARN_ON(xa_erase(&group->pasid_array, pasid) != domain);
3423 * iommu_get_domain_for_dev_pasid() - Retrieve domain for @pasid of @dev
3425 * @pasid: the pasid of the device
3429 * domain attached to pasid of a device. Callers must hold a lock around this
3437 ioasid_t pasid,
3448 domain = xa_load(&group->pasid_array, pasid);
3475 void iommu_free_global_pasid(ioasid_t pasid)
3477 if (WARN_ON(pasid == IOMMU_PASID_INVALID))
3480 ida_free(&iommu_global_pasid_ida, pasid);