Skip to content
Permalink
Browse files
iommu, more debug
  • Loading branch information
frank-w committed Jul 16, 2021
1 parent 7b64860 commit a03e47787fdf1b8cf17dff02113ca385b4aaa131
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
@@ -154,9 +154,11 @@ int iommu_device_register(struct iommu_device *iommu,
const struct iommu_ops *ops, struct device *hwdev)
{
/* We need to be able to take module references appropriately */
dev_err(hwdev,"%s:%d",__FUNCTION__,__LINE__);
if (WARN_ON(is_module_address((unsigned long)ops) && !ops->owner))
return -EINVAL;

dump_stack();
iommu->ops = ops;
if (hwdev)
iommu->fwnode = hwdev->fwnode;
@@ -27,10 +27,16 @@ static int of_iommu_xlate(struct device *dev,
int ret;

ops = iommu_ops_from_fwnode(fwnode);
dev_err(dev,"%s:%d ops:%08x",__FUNCTION__,__LINE__,(unsigned int)ops);
if (ops)
dev_err(dev,"%s:%d xlate:%08x",__FUNCTION__,__LINE__,(unsigned int)ops->of_xlate);

if ((ops && !ops->of_xlate) ||
!of_device_is_available(iommu_spec->np))
{
dev_err(dev,"no iommu");
return NO_IOMMU;

}
ret = iommu_fwspec_init(dev, &iommu_spec->np->fwnode, ops);
if (ret)
return ret;

0 comments on commit a03e477

Please sign in to comment.