@@ -966,6 +981,7 @@ static void apple_dart_get_resv_regions(struct device
> *dev,
>
> static const struct iommu_ops apple_dart_iommu_ops = {
> .identity_domain = &apple_dart_identity_domain,
> + .blocked_domain = &apple_dart_blocked_domain,
> .domain_alloc = apple_dart_domain_alloc,
> .probe_device = apple_dart_probe_device,
> .release_device = apple_dart_release_device,
> --
> 2.42.0
Reviewed-by: Janne Grunau
best regards
Janne
ps: I sent the reply to [Patch 4/8] accidentally with an incorrect from
address but the correct Reviewed-by:. I can resend if necessary.
ops = &(const struct iommu_domain_ops) {
> - .attach_dev = apple_dart_attach_dev,
> + .attach_dev = apple_dart_attach_dev_paging,
> .map_pages = apple_dart_map_pages,
> .unmap_pages= apple_dart_unmap_pages,
> .flush_iotlb_all = apple_dart_flush_iotlb_all,
> --
> 2.42.0
Reviewed-by: Janne Grunau
best regards
Janne
v) {
> + struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev);
> + int ret;
> +
> + ret = apple_dart_finalize_domain(dart_domain, cfg);
> + if (ret) {
> + kfree(dart_domain);
> + return ERR_PTR(ret);
> + }
> + }
> return &dart_domain->domain;
> }
>
> --
> 2.42.0
Reviewed-by: Janne Grunau
best regards
Janne
prevent the domain from being
> attached to the wrong dart
>
> There is no HW limitation that prevents BLOCKED domains from working,
> remove that test.
>
> The check in apple_dart_of_xlate() is redundant since immediately after
> the pgsize is checked. Remove it.
>
> Remo