[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKHBV24gX6nuCeb2O13XPLw7aohi95ReZfqKVtX1X05WM7LZQg@mail.gmail.com>
Date: Thu, 13 Jul 2023 16:44:45 +0800
From: Michael Shavit <mshavit@...gle.com>
To: Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
Joerg Roedel <joro@...tes.org>
Cc: jean-philippe@...aro.org, nicolinc@...dia.com, jgg@...dia.com,
baolu.lu@...ux.intel.com, linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 09/13] iommu/arm-smmu-v3: Implement set_dev_pasid
On Wed, Jun 21, 2023 at 2:44 PM Michael Shavit <mshavit@...gle.com> wrote:
> + mutex_lock(&arm_smmu_asid_lock);
> + ret = arm_smmu_write_ctx_desc(master->smmu, master->s1_cfg, master,
> + pasid, &smmu_domain->cd);
> + if (ret) {
> + mutex_unlock(&arm_smmu_asid_lock);
> + kfree(attached_domain);
> + }
> +
> + spin_lock_irqsave(&smmu_domain->attached_domains_lock, flags);
> + list_add(&attached_domain->domain_head, &smmu_domain->attached_domains);
> + spin_unlock_irqrestore(&smmu_domain->attached_domains_lock, flags);
> + mutex_unlock(&arm_smmu_asid_lock);
> +
> + return 0;
A small bug in this patch as well: we return 0 when
arm_smmu_write_ctx_desc() fails instead of the error. Will upload fix
in v5.
Powered by blists - more mailing lists