Lines Matching defs:data
659 * iommu drivers can store data in the group for use when doing iommu
672 * @iommu_data: new data
675 * iommu drivers can store data in the group for use when doing iommu
676 * operations. This function provides a way to set the data after
940 * @data: caller opaque data to be passed to callback function
948 static int iommu_group_for_each_dev_ext(struct iommu_group *group, void *data, int (*fn)(struct device *, void *))
955 ret = fn(device->dev, data);
963 int iommu_group_for_each_dev(struct iommu_group *group, void *data, int (*fn)(struct device *, void *))
968 ret = iommu_group_for_each_dev_ext(group, data, fn);
1056 * @data: private data passed as argument to the handler
1059 * fault event and data as argument. The handler should return 0 on success. If
1070 int iommu_register_device_fault_handler(struct device *dev, iommu_dev_fault_handler_t handler, void *data)
1094 param->fault_param->data = data;
1148 * @evt: fault event data
1186 ret = fparam->handler(&evt->fault, fparam->data);
1382 struct group_for_pci_data *data = opaque;
1384 data->pdev = pdev;
1385 data->group = iommu_group_get(&pdev->dev);
1387 return data->group != NULL;
1407 struct group_for_pci_data data;
1422 if (pci_for_each_dma_alias(pdev, get_pci_alias_or_group, &data)) {
1423 return data.group;
1426 pdev = data.pdev;
1597 static int probe_iommu_group(struct device *dev, void *data)
1599 struct list_head *group_list = data;
1618 static int remove_iommu_group(struct device *dev, void *data)
1625 static int iommu_bus_notifier(struct notifier_block *nb, unsigned long action, void *data)
1628 struct device *dev = data;
1684 static int probe_get_default_domain_type(struct device *dev, void *data)
1687 struct __group_domain_type *gtype = data;
1728 static int iommu_group_do_dma_attach(struct device *dev, void *data)
1730 struct iommu_domain *domain = data;
1745 static int iommu_group_do_probe_finalize(struct device *dev, void *data)
1747 struct iommu_domain *domain = data;
1761 static int iommu_do_create_direct_mappings(struct device *dev, void *data)
1763 struct iommu_group *group = data;
1915 * @token: user data, will be passed back to the fault handler
2011 * Check flags and other user provided data for valid combinations. We also
2109 * User might be using a newer UAPI header which has a larger data
2111 * size. Copy the remaining user data _after_ minsz but not more
2129 static int iommu_check_bind_data(struct iommu_gpasid_bind_data *data)
2134 if (data->version != IOMMU_GPASID_BIND_VERSION_1) {
2139 if (data->format >= IOMMU_PASID_FORMAT_LAST) {
2145 if (data->flags & ~mask) {
2150 for (i = 0; i < sizeof(data->padding); i++) {
2151 if (data->padding[i]) {
2159 static int iommu_sva_prepare_bind_data(void __user *udata, struct iommu_gpasid_bind_data *data)
2170 if (copy_from_user(data, udata, minsz)) {
2175 if (data->argsz < minsz) {
2180 * driver decide on what size it needs. Since the guest PASID bind data
2183 * Copy the remaining user data _after_ minsz
2185 if (copy_from_user((void *)data + minsz, udata + minsz, min_t(u32, data->argsz, sizeof(*data)) - minsz)) {
2189 return iommu_check_bind_data(data);
2194 struct iommu_gpasid_bind_data data = {0};
2201 ret = iommu_sva_prepare_bind_data(udata, &data);
2206 return domain->ops->sva_bind_gpasid(domain, dev, &data);
2222 struct iommu_gpasid_bind_data data = {0};
2229 ret = iommu_sva_prepare_bind_data(udata, &data);
2234 return iommu_sva_unbind_gpasid(domain, dev, data.hpasid);
2313 static int iommu_group_do_attach_device(struct device *dev, void *data)
2315 struct iommu_domain *domain = data;
2348 static int iommu_group_do_detach_device(struct device *dev, void *data)
2350 struct iommu_domain *domain = data;
2789 int iommu_domain_get_attr(struct iommu_domain *domain, enum iommu_attr attr, void *data)
2797 geometry = data;
2802 paging = data;
2810 ret = domain->ops->domain_get_attr(domain, attr, data);
2817 int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr attr, void *data)
2825 ret = domain->ops->domain_set_attr(domain, attr, data);