From: Ethan Zhao <haifeng.zhao@linux.intel.com>
To: Yuan Can <yuancan@huawei.com>,
joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
iommu@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] iommu: return early when devices in a group require different domain type
Date: Wed, 17 Aug 2022 10:06:10 +0800 [thread overview]
Message-ID: <a5e2c27e-8990-210e-1d33-c2147de75545@linux.intel.com> (raw)
In-Reply-To: <20220816020701.90533-1-yuancan@huawei.com>
Yuan,
在 2022/8/16 10:07, Yuan Can 写道:
> When alloc default domain for an iommu_group in
> probe_alloc_default_domain, the expected domain
> type of each device in the iommu_group is checked
> in a loop, if two devices require different types,
> the loop can be breaked since the default domain
s/breaked/broken
> will be set to iommu_def_domain_type.
> Return 1 when this happened to break the loop in
> __iommu_group_for_each_dev.
>
> Signed-off-by: Yuan Can <yuancan@huawei.com>
> ---
> drivers/iommu/iommu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 74bc9111c7be..0d4d78946d31 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -1653,6 +1653,7 @@ static int probe_get_default_domain_type(struct device *dev, void *data)
> dev_name(gtype->dev),
> iommu_domain_type_str(gtype->type));
> gtype->type = 0;
> + return 1; /* end the outer loop */
> }
>
> if (!gtype->dev) {
Thanks,
Ethan
--
"firm, enduring, strong, and long-lived"
next prev parent reply other threads:[~2022-08-17 2:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 2:07 [PATCH -next] iommu: return early when devices in a group require different domain type Yuan Can
2022-08-17 2:06 ` Ethan Zhao [this message]
2022-08-17 10:34 ` Baolu Lu
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=a5e2c27e-8990-210e-1d33-c2147de75545@linux.intel.com \
--to=haifeng.zhao@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yuancan@huawei.com \
/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