Skip to content

Commit b1d578a

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 1e2fba4 commit b1d578a

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
@@ -134,8 +134,8 @@ static void __iommu_group_set_domain_nofail(struct iommu_group *group,
134134

135135
static int iommu_setup_default_domain(struct iommu_group *group,
136136
int target_type);
137-
static int iommu_create_device_direct_mappings(struct iommu_domain *domain,
138-
struct device *dev);
137+
static int iommu_create_device_fw_mappings(struct iommu_domain *domain,
138+
struct device *dev);
139139
static ssize_t iommu_group_store_type(struct iommu_group *group,
140140
const char *buf, size_t count);
141141
static struct group_device *iommu_group_alloc_device(struct iommu_group *group,
@@ -641,7 +641,7 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list
641641
list_add_tail(&gdev->list, &group->devices);
642642
WARN_ON(group->default_domain && !group->domain);
643643
if (group->default_domain)
644-
iommu_create_device_direct_mappings(group->default_domain, dev);
644+
iommu_create_device_fw_mappings(group->default_domain, dev);
645645
if (group->domain) {
646646
ret = __iommu_device_set_domain(group, dev, group->domain, NULL,
647647
0);
@@ -1170,8 +1170,8 @@ int iommu_group_set_name(struct iommu_group *group, const char *name)
11701170
}
11711171
EXPORT_SYMBOL_GPL(iommu_group_set_name);
11721172

1173-
static int iommu_create_device_direct_mappings(struct iommu_domain *domain,
1174-
struct device *dev)
1173+
static int iommu_create_device_fw_mappings(struct iommu_domain *domain,
1174+
struct device *dev)
11751175
{
11761176
struct iommu_resv_region *entry;
11771177
struct list_head mappings;
@@ -3017,7 +3017,7 @@ static int iommu_setup_default_domain(struct iommu_group *group,
30173017
struct iommu_domain *old_dom = group->default_domain;
30183018
struct group_device *gdev;
30193019
struct iommu_domain *dom;
3020-
bool direct_failed;
3020+
bool fw_failed;
30213021
int req_type;
30223022
int ret;
30233023

@@ -3047,10 +3047,10 @@ static int iommu_setup_default_domain(struct iommu_group *group,
30473047
* mapped before their device is attached, in order to guarantee
30483048
* continuity with any FW activity
30493049
*/
3050-
direct_failed = false;
3050+
fw_failed = false;
30513051
for_each_group_device(group, gdev) {
3052-
if (iommu_create_device_direct_mappings(dom, gdev->dev)) {
3053-
direct_failed = true;
3052+
if (iommu_create_device_fw_mappings(dom, gdev->dev)) {
3053+
fw_failed = true;
30543054
dev_warn_once(
30553055
gdev->dev->iommu->iommu_dev->dev,
30563056
"IOMMU driver was not able to establish FW requested direct mapping.");
@@ -3082,9 +3082,9 @@ static int iommu_setup_default_domain(struct iommu_group *group,
30823082
* trying again after attaching. If this happens it means the device
30833083
* will not continuously have the IOMMU_RESV_DIRECT map.
30843084
*/
3085-
if (direct_failed) {
3085+
if (fw_failed) {
30863086
for_each_group_device(group, gdev) {
3087-
ret = iommu_create_device_direct_mappings(dom, gdev->dev);
3087+
ret = iommu_create_device_fw_mappings(dom, gdev->dev);
30883088
if (ret)
30893089
goto err_restore_domain;
30903090
}

0 commit comments

Comments
 (0)