From: "Li,Rongqing" <lirongqing@baidu.com>
To: Pranjal Shrivastava <praan@google.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"will@kernel.org" <will@kernel.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Subject: 答复: 答复: [外部邮件] Re: [PATCH] iommu: Downgrade print level for iommu group information
Date: Fri, 29 Nov 2024 08:21:51 +0000 [thread overview]
Message-ID: <c30af43b93f04125bf9befe631922653@baidu.com> (raw)
In-Reply-To: <48c3a7570e7140ec8c429f00112de7f7@baidu.com>
>
> I free this log is useless; since iommu_group_alloc_device only allocates device
> and sysfs, not attach group domain currently.
> If failed, " Failed to add to iommu group " will be printed, it is more important to
> notice user.
>
After this patch(iommu: Split iommu_group_add_device()), should this log be moved to iommu_group_add_device and __iommu_probe_device ? they are adding device to iommu group, not be in iommu_group_alloc_device which only allocate resource
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 83c8e61..c33ff0e 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -581,6 +581,9 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list
mutex_unlock(&group->mutex);
+ trace_add_device_to_group(group->id, dev);
+ dev_info(dev, "Adding to iommu group %d\n", group->id);
+
return 0;
err_remove_gdev:
@@ -1191,9 +1194,6 @@ static struct group_device *iommu_group_alloc_device(struct iommu_group *group,
goto err_free_name;
}
- trace_add_device_to_group(group->id, dev);
-
- dev_info(dev, "Adding to iommu group %d\n", group->id);
return device;
@@ -1229,6 +1229,10 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
mutex_lock(&group->mutex);
list_add_tail(&gdev->list, &group->devices);
mutex_unlock(&group->mutex);
+
+ trace_add_device_to_group(group->id, dev);
+ dev_info(dev, "Adding to iommu group %d\n", group->id);
+
return 0;
}
EXPORT_SYMBOL_GPL(iommu_group_add_device);
next prev parent reply other threads:[~2024-11-29 8:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 7:23 [PATCH] iommu: Downgrade print level for iommu group information Li RongQing
2024-11-26 10:25 ` Pranjal Shrivastava
2024-11-26 10:47 ` 答复: [????] " Li,Rongqing
2024-11-26 11:49 ` Robin Murphy
2024-11-26 12:09 ` 答复: [外部邮件] " Li,Rongqing
2024-11-27 10:16 ` Pranjal Shrivastava
2024-11-27 11:32 ` 答复: " Li,Rongqing
2024-11-29 8:21 ` Li,Rongqing [this message]
2024-11-27 12:37 ` Robin Murphy
2024-11-27 20:56 ` Pranjal Shrivastava
2024-11-27 12:12 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c30af43b93f04125bf9befe631922653@baidu.com \
--to=lirongqing@baidu.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=praan@google.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox