[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <270eec00-8aee-2288-4069-d604e6da2925@linux.intel.com>
Date: Fri, 24 Jun 2022 09:35:49 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Nicolin Chen <nicolinc@...dia.com>, joro@...tes.org,
will@...nel.org, marcan@...can.st, sven@...npeter.dev,
robin.murphy@....com, robdclark@...il.com, matthias.bgg@...il.com,
orsonzhai@...il.com, baolin.wang7@...il.com, zhang.lyra@...il.com,
jean-philippe@...aro.org, alex.williamson@...hat.com,
jgg@...dia.com, kevin.tian@...el.com
Cc: baolu.lu@...ux.intel.com, suravee.suthikulpanit@....com,
alyssa@...enzweig.io, dwmw2@...radead.org, yong.wu@...iatek.com,
mjrosato@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
thierry.reding@...il.com, vdumpa@...dia.com, jonathanh@...dia.com,
cohuck@...hat.com, thunder.leizhen@...wei.com, tglx@...utronix.de,
chenxiang66@...ilicon.com, christophe.jaillet@...adoo.fr,
john.garry@...wei.com, yangyingliang@...wei.com,
jordan@...micpenguin.net, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-tegra@...r.kernel.org,
virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org
Subject: Re: [PATCH v3 1/5] iommu: Return -EMEDIUMTYPE for incompatible domain
and device/group
On 2022/6/24 04:00, Nicolin Chen wrote:
> diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
> index e1cb51b9866c..5386d889429d 100644
> --- a/drivers/iommu/mtk_iommu_v1.c
> +++ b/drivers/iommu/mtk_iommu_v1.c
> @@ -304,7 +304,7 @@ static int mtk_iommu_v1_attach_device(struct iommu_domain *domain, struct device
> /* Only allow the domain created internally. */
> mtk_mapping = data->mapping;
> if (mtk_mapping->domain != domain)
> - return 0;
> + return -EMEDIUMTYPE;
>
> if (!data->m4u_dom) {
> data->m4u_dom = dom;
This change looks odd. It turns the return value from success to
failure. Is it a bug? If so, it should go through a separated fix patch.
Best regards,
baolu
Powered by blists - more mailing lists