Hi Laurent, Thanks for your explanation.
I'm fine with current situation. I have also checked other drivers and they did the same. As you said, let's improve this driver when the time comes. Thanks. Best regards, KHIEM Nguyen On 6/4/2014 2:39 AM, Laurent Pinchart wrote: > Hi, > > On Tuesday 03 June 2014 13:57:38 Khiem Nguyen wrote: >> Hi Laurent, >> >> Thanks for the patch. >> >>> + if (!iommu_present(&platform_bus_type)) >>> + bus_set_iommu(&platform_bus_type, &ipmmu_ops); >> >> With this code, if error occurs, it's hidden. >> >> I think it should be like below, >> >>> + ret = bus_set_iommu(&platform_bus_type, &ipmmu_ops); >>> + if (ret < 0) >>> + return ret; >> >> In this case, if error occurs, -EBUSY is returned. >> It's easier for troubleshooting the issue. >> >> How do you think ? > > I agree that we have a problem, but the problem is broader than this. Only > one > IOMMU type can be associated with a given bus, so things will break as soon > as > we will compile multiple IOMMU drivers in a multiplatform kernel. I'd like to > fix this properly, but it requires IOMMU framework changes, and thus time. In > the meantime we could apply your proposed modification, but it needs an > additional platform_driver_unregister() call in the bus_set_iommu() error > path. > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu