Skip to content

Commit 9dc5ffd

Browse files
committed
iommu: Rename iommu_create_device_direct_mappings()
It will be used to create firmware mappings which require a paging domain and mappings installed at specific IOVA. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 42f4e59 commit 9dc5ffd

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

drivers/iommu/iommu.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ static void __iommu_group_set_domain_nofail(struct iommu_group *group,
133133

134134
static int iommu_setup_default_domain(struct iommu_group *group,
135135
int target_type);
136-
static int iommu_create_device_direct_mappings(struct iommu_domain *domain,
137-
struct device *dev);
136+
static int iommu_create_device_fw_mappings(struct iommu_domain *domain,
137+
struct device *dev);
138138
static ssize_t iommu_group_store_type(struct iommu_group *group,
139139
const char *buf, size_t count);
140140
static struct group_device *iommu_group_alloc_device(struct iommu_group *group,
@@ -627,7 +627,7 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list
627627
list_add_tail(&gdev->list, &group->devices);
628628
WARN_ON(group->default_domain && !group->domain);
629629
if (group->default_domain)
630-
iommu_create_device_direct_mappings(group->default_domain, dev);
630+
iommu_create_device_fw_mappings(group->default_domain, dev);
631631
if (group->domain) {
632632
ret = __iommu_device_set_domain(group, dev, group->domain, 0);
633633
if (ret)
@@ -1155,8 +1155,8 @@ int iommu_group_set_name(struct iommu_group *group, const char *name)
11551155
}
11561156
EXPORT_SYMBOL_GPL(iommu_group_set_name);
11571157

1158-
static int iommu_create_device_direct_mappings(struct iommu_domain *domain,
1159-
struct device *dev)
1158+
static int iommu_create_device_fw_mappings(struct iommu_domain *domain,
1159+
struct device *dev)
11601160
{
11611161
struct iommu_resv_region *entry;
11621162
struct list_head mappings;
@@ -2999,7 +2999,7 @@ static int iommu_setup_default_domain(struct iommu_group *group,
29992999
struct iommu_domain *old_dom = group->default_domain;
30003000
struct group_device *gdev;
30013001
struct iommu_domain *dom;
3002-
bool direct_failed;
3002+
bool fw_failed;
30033003
int req_type;
30043004
int ret;
30053005

@@ -3029,10 +3029,10 @@ static int iommu_setup_default_domain(struct iommu_group *group,
30293029
* mapped before their device is attached, in order to guarantee
30303030
* continuity with any FW activity
30313031
*/
3032-
direct_failed = false;
3032+
fw_failed = false;
30333033
for_each_group_device(group, gdev) {
3034-
if (iommu_create_device_direct_mappings(dom, gdev->dev)) {
3035-
direct_failed = true;
3034+
if (iommu_create_device_fw_mappings(dom, gdev->dev)) {
3035+
fw_failed = true;
30363036
dev_warn_once(
30373037
gdev->dev->iommu->iommu_dev->dev,
30383038
"IOMMU driver was not able to establish FW requested direct mapping.");
@@ -3064,9 +3064,9 @@ static int iommu_setup_default_domain(struct iommu_group *group,
30643064
* trying again after attaching. If this happens it means the device
30653065
* will not continuously have the IOMMU_RESV_DIRECT map.
30663066
*/
3067-
if (direct_failed) {
3067+
if (fw_failed) {
30683068
for_each_group_device(group, gdev) {
3069-
ret = iommu_create_device_direct_mappings(dom, gdev->dev);
3069+
ret = iommu_create_device_fw_mappings(dom, gdev->dev);
30703070
if (ret)
30713071
goto err_restore_domain;
30723072
}

0 commit comments

Comments
 (0)