*参照元 [#b02bb52f] #backlinks *説明 [#u60f7901] -パス: [[linux-4.4.1/drivers/iommu/iommu.c]] -FIXME: これは何? --説明 **引数 [#v95ca5aa] -struct iommu_domain *domain -- --[[linux-4.4.1/iommu_domain]] -struct device *dev -- --[[linux-4.4.1/device]] **返り値 [#kb514ce4] -int -- **参考 [#f6380c27] *実装 [#le340820] int iommu_attach_device(struct iommu_domain *domain, struct device *dev) { struct iommu_group *group; int ret; - --[[linux-4.4.1/iommu_group]] group = iommu_group_get(dev); /* FIXME: Remove this when groups a mandatory for iommu drivers */ if (group == NULL) return __iommu_attach_device(domain, dev); - --[[linux-4.4.1/iommu_group_get()]] --[[linux-4.4.1/__iommu_attach_device()]] /* * We have a group - lock it to make sure the device-count doesn't * change while we are attaching */ mutex_lock(&group->mutex); ret = -EINVAL; if (iommu_group_device_count(group) != 1) goto out_unlock; - --[[linux-4.4.1/mutex_lock()]] --[[linux-4.4.1/iommu_group_device_count()]] ret = __iommu_attach_group(domain, group); - --[[linux-4.4.1/__iommu_attach_group()]] out_unlock: mutex_unlock(&group->mutex); iommu_group_put(group); - --[[linux-4.4.1/mutex_unlock()]] --[[linux-4.4.1/iommu_group_put()]] return ret; } EXPORT_SYMBOL_GPL(iommu_attach_device); - --[[linux-4.4.1/EXPORT_SYMBOL_GPL()]] *コメント [#h076b2c7]