linux-4.4.1/iommu_group_get_for_dev()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#wd72e50b]
#backlinks
*説明 [#k84a2a6a]
-パス: [[linux-4.4.1/drivers/iommu/iommu.c]]
-FIXME: これは何?
--説明
**引数 [#x024b50c]
-struct device *dev
--
--[[linux-4.4.1/device]]
**返り値 [#i63665af]
-struct iommu_group *
--
--[[linux-4.4.1/iommu_group]]
**参考 [#o7eb3b21]
*実装 [#v4c36a17]
/**
* iommu_group_get_for_dev - Find or create the IOMMU gr...
* @dev: target device
*
* This function is intended to be called by IOMMU drive...
* support common, bus-defined algorithms when determini...
* IOMMU group for a device. On success, the caller wil...
* to the returned IOMMU group, which will already inclu...
* device. The reference should be released with iommu_...
*/
struct iommu_group *iommu_group_get_for_dev(struct devic...
{
const struct iommu_ops *ops = dev->bus->iommu_ops;
struct iommu_group *group;
int ret;
-
--dev->bus は struct bus_type * 型
--[[linux-4.4.1/bus_type]]
--[[linux-4.4.1/iommu_ops]]
group = iommu_group_get(dev);
if (group)
return group;
-
--[[linux-4.4.1/iommu_group_get()]]
group = ERR_PTR(-EINVAL);
-
--[[linux-4.4.1/ERR_PTR()]]
if (ops && ops->device_group)
group = ops->device_group(dev);
if (IS_ERR(group))
return group;
-
--[[linux-4.4.1/IS_ERR()]]
/*
* Try to allocate a default domain - needs support fro...
* IOMMU driver.
*/
if (!group->default_domain) {
group->default_domain = __iommu_domain_alloc(dev->bus,
IOMMU_DOMAIN_DMA);
group->domain = group->default_domain;
}
-
--[[linux-4.4.1/__iommu_domain_alloc()]]
ret = iommu_group_add_device(group, dev);
if (ret) {
iommu_group_put(group);
return ERR_PTR(ret);
}
-
--[[linux-4.4.1/iommu_group_add_device()]]
return group;
}
*コメント [#tbc0f5cd]
終了行:
*参照元 [#wd72e50b]
#backlinks
*説明 [#k84a2a6a]
-パス: [[linux-4.4.1/drivers/iommu/iommu.c]]
-FIXME: これは何?
--説明
**引数 [#x024b50c]
-struct device *dev
--
--[[linux-4.4.1/device]]
**返り値 [#i63665af]
-struct iommu_group *
--
--[[linux-4.4.1/iommu_group]]
**参考 [#o7eb3b21]
*実装 [#v4c36a17]
/**
* iommu_group_get_for_dev - Find or create the IOMMU gr...
* @dev: target device
*
* This function is intended to be called by IOMMU drive...
* support common, bus-defined algorithms when determini...
* IOMMU group for a device. On success, the caller wil...
* to the returned IOMMU group, which will already inclu...
* device. The reference should be released with iommu_...
*/
struct iommu_group *iommu_group_get_for_dev(struct devic...
{
const struct iommu_ops *ops = dev->bus->iommu_ops;
struct iommu_group *group;
int ret;
-
--dev->bus は struct bus_type * 型
--[[linux-4.4.1/bus_type]]
--[[linux-4.4.1/iommu_ops]]
group = iommu_group_get(dev);
if (group)
return group;
-
--[[linux-4.4.1/iommu_group_get()]]
group = ERR_PTR(-EINVAL);
-
--[[linux-4.4.1/ERR_PTR()]]
if (ops && ops->device_group)
group = ops->device_group(dev);
if (IS_ERR(group))
return group;
-
--[[linux-4.4.1/IS_ERR()]]
/*
* Try to allocate a default domain - needs support fro...
* IOMMU driver.
*/
if (!group->default_domain) {
group->default_domain = __iommu_domain_alloc(dev->bus,
IOMMU_DOMAIN_DMA);
group->domain = group->default_domain;
}
-
--[[linux-4.4.1/__iommu_domain_alloc()]]
ret = iommu_group_add_device(group, dev);
if (ret) {
iommu_group_put(group);
return ERR_PTR(ret);
}
-
--[[linux-4.4.1/iommu_group_add_device()]]
return group;
}
*コメント [#tbc0f5cd]
ページ名: