[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V3 6/8] iommu: Add of_xlate callback




Hi Jan

On 20.08.2019 20:09, Oleksandr Tyshchenko wrote:
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -240,6 +240,16 @@ struct iommu_ops {
      int __must_check (*iotlb_flush_all)(struct domain *d);
      int (*get_reserved_device_memory)(iommu_grdm_t *, void *);
      void (*dump_p2m_table)(struct domain *d);
+
+#ifdef CONFIG_HAS_DEVICE_TREE
+    /*
+     * All IOMMU drivers which support generic IOMMU DT bindings should use +     * this callback. This is a way for the framework to provide the driver +     * with DT IOMMU specifier which describes the IOMMU master interfaces of
+     * that device (device IDs, etc).
+     */
+    int (*of_xlate)(device_t *dev, struct dt_phandle_args *args);
+#endif
  };

I think this should be folded into the first patch using it. Doing
so may also answer my question of what "of" here stands for.

In Linux, code related to the device-tree is prefixed with "of_". But, in Xen, code related to the device-tree is prefixed with "dt_" [1]. Looks like, I should have named it "dt_xlate" to be consistent. There was a preference to introduce callback in a separate patch [2]. Anyway, shall I fold it?


[1] https://github.com/xen-project/xen/blob/master/xen/include/xen/device_tree.h [2] https://lists.xenproject.org/archives/html/xen-devel/2019-08/msg01393.html


--
Regards,

Oleksandr Tyshchenko


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.