From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Jason Gunthorpe <jgg@nvidia•com>, Joerg Roedel <joro@8bytes•org>
Cc: Jason Gunthorpe <jgg@ziepe•ca>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Michael Shavit <mshavit@google•com>,
Tina Zhang <tina.zhang@intel•com>, Will Deacon <will@kernel•org>
Subject: linux-next: manual merge of the iommufd tree with the iommu tree
Date: Thu, 26 Oct 2023 14:27:33 +1100 [thread overview]
Message-ID: <20231026142733.442e18a5@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2892 bytes --]
Hi all,
Today's linux-next merge of the iommufd tree got a conflict in:
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
between commit:
24503148c545 ("iommu/arm-smmu-v3: Refactor write_ctx_desc")
from the iommu tree and commit:
a247f322787d ("iommu: Add mm_get_enqcmd_pasid() helper function")
from the iommufd tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
index 353248ab18e7,08fac84c1804..000000000000
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
@@@ -264,10 -233,10 +264,10 @@@ static void arm_smmu_mm_release(struct
* DMA may still be running. Keep the cd valid to avoid C_BAD_CD events,
* but disable translation.
*/
- arm_smmu_update_ctx_desc_devices(smmu_domain, mm->pasid, &quiet_cd);
- arm_smmu_write_ctx_desc(smmu_domain, mm_get_enqcmd_pasid(mm), &quiet_cd);
++ arm_smmu_update_ctx_desc_devices(smmu_domain, mm_get_enqcmd_pasid(mm), &quiet_cd);
arm_smmu_tlb_inv_asid(smmu_domain->smmu, smmu_mn->cd->asid);
- arm_smmu_atc_inv_domain(smmu_domain, mm->pasid, 0, 0);
+ arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), 0, 0);
smmu_mn->cleared = true;
mutex_unlock(&sva_lock);
@@@ -323,16 -290,7 +323,16 @@@ arm_smmu_mmu_notifier_get(struct arm_sm
goto err_free_cd;
}
- ret = arm_smmu_write_ctx_desc(smmu_domain, mm_get_enqcmd_pasid(mm), cd);
+ spin_lock_irqsave(&smmu_domain->devices_lock, flags);
+ list_for_each_entry(master, &smmu_domain->devices, domain_head) {
- ret = arm_smmu_write_ctx_desc(master, mm->pasid, cd);
++ ret = arm_smmu_write_ctx_desc(master, mm_get_enqcmd_pasid(mm), cd);
+ if (ret) {
+ list_for_each_entry_from_reverse(master, &smmu_domain->devices, domain_head)
- arm_smmu_write_ctx_desc(master, mm->pasid, NULL);
++ arm_smmu_write_ctx_desc(master, mm_get_enqcmd_pasid(mm), NULL);
+ break;
+ }
+ }
+ spin_unlock_irqrestore(&smmu_domain->devices_lock, flags);
if (ret)
goto err_put_notifier;
@@@ -357,8 -315,7 +357,8 @@@ static void arm_smmu_mmu_notifier_put(s
return;
list_del(&smmu_mn->list);
- arm_smmu_write_ctx_desc(smmu_domain, mm_get_enqcmd_pasid(mm), NULL);
+
- arm_smmu_update_ctx_desc_devices(smmu_domain, mm->pasid, NULL);
++ arm_smmu_update_ctx_desc_devices(smmu_domain, mm_get_enqcmd_pasid(mm), NULL);
/*
* If we went through clear(), we've already invalidated, and no
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2023-10-26 3:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 3:27 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-30 6:00 linux-next: manual merge of the iommufd tree with the iommu tree Stephen Rothwell
2025-06-30 13:02 ` Jason Gunthorpe
2025-03-21 8:09 Stephen Rothwell
2023-10-27 4:55 Stephen Rothwell
2023-10-27 6:15 ` Stephen Rothwell
2023-10-30 18:26 ` Jason Gunthorpe
2023-10-31 5:12 ` Stephen Rothwell
2023-10-31 11:31 ` Jason Gunthorpe
2023-11-02 23:53 ` Stephen Rothwell
2023-11-03 0:33 ` Jason Gunthorpe
2023-10-25 4:44 Stephen Rothwell
2023-10-25 12:17 ` Jason Gunthorpe
2023-11-02 23:53 ` Stephen Rothwell
2023-10-25 4:34 Stephen Rothwell
2023-10-25 12:12 ` Jason Gunthorpe
2023-10-25 12:16 ` Baolu Lu
2023-10-25 12:17 ` Jason Gunthorpe
2023-10-25 12:25 ` Baolu Lu
2023-10-23 4:56 Stephen Rothwell
2023-10-11 5:03 Stephen Rothwell
2023-10-11 13:58 ` Jason Gunthorpe
2023-08-16 6:21 Stephen Rothwell
2022-11-04 4:24 Stephen Rothwell
2022-11-04 12:33 ` Jason Gunthorpe
2022-11-04 19:21 ` Jason Gunthorpe
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=20231026142733.442e18a5@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=jgg@nvidia$(echo .)com \
--cc=jgg@ziepe$(echo .)ca \
--cc=joro@8bytes$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mshavit@google$(echo .)com \
--cc=tina.zhang@intel$(echo .)com \
--cc=will@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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