sync: rvck #287: iommu, dma-mapping: Simplify arch_setup_dma_ops#238
Conversation
mainline inclusion from Linux 6.10-rc1 commit ad4750b07d3462ce29a0c9b1e88b2a1f9795290e category: feature bugzilla: RVCK-Project/rvck#286 -------------------------------- It's now easy to retrieve the device's DMA limits if we want to check them against the domain aperture, so do that ourselves instead of relying on them being passed through the callchain. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> [sync from rvck.] Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion from Linux 6.10-rc1 commit b67483b3c44eaef2f771fa4c712e13f452675a67 category: feature bugzilla: RVCK-Project/rvck#286 -------------------------------- It's somewhat hard to see, but arm64's arch_setup_dma_ops() should only ever call iommu_setup_dma_ops() after a successful iommu_probe_device(), which means there should be no harm in achieving the same order of operations by running it off the back of iommu_probe_device() itself. This then puts it in line with the x86 and s390 .probe_finalize bodges, letting us pull it all into the main flow properly. As a bonus this lets us fold in and de-scope the PCI workaround setup as well. At this point we can also then pull the call up inside the group mutex, and avoid having to think about whether iommu_group_store_type() could theoretically race and free the domain if iommu_setup_dma_ops() ran just *before* iommu_device_use_default_domain() claims it... Furthermore we replace one .probe_finalize call completely, since the only remaining implementations are now one which only needs to run once for the initial boot-time probe, and two which themselves render that path unreachable. This leaves us a big step closer to realistically being able to unpick the variety of different things that iommu_setup_dma_ops() has been muddling together, and further streamline iommu-dma into core API flows in future. Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> # For Intel IOMMU Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Niklas Schnelle <schnelle@linux.ibm.com> # for s390 Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> # for s390 Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> [sync from rvck.] Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
mainline inclusion from Linux 6.10-rc1 commit f091e93306e0429ebb7589b9874590b6a9705e64 category: feature bugzilla: RVCK-Project/rvck#286 -------------------------------- The dma_base, size and iommu arguments are only used by ARM, and can now easily be deduced from the device itself, so there's no need to pass them through the callchain as well. Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Michael Kelley <mhklinux@outlook.com> # For Hyper-V Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> [sync from rvck.] Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/27118087805 参数解析结果
测试完成 详细结果:
Kunit Test Resultkunit test failed
Kernel Build Result
Check Patch Result
LAVA Check (qemu)
result: Lava check done!
|
…ver" driver inclusion category: cleanup bugzilla: RVCK-Project/rvck#286 -------------------------------- This reverts commit cc4640f. Starting with 3ced95f, iommu_setup_dma_ops() has been centralized and is no longer exported. riscv_iommu_ops also no longer requires the probe_finalize callback. Therefore, we need to revert the patch that added the probe_finalize callback. Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/27184171656 参数解析结果
测试完成 详细结果:
Kunit Test Resultkunit test failed
Kernel Build Result
Check Patch Result
LAVA Check (qemu)
result: Lava check done!
|
Sync commits from rvck PR 287.
Source PR: RVCK-Project/rvck#287
原始提交共7个commit,其中前4个当前源码树中已存在,同步剩余3个commit。
新增一个revert补丁,移除了riscv iommu驱动中的probe_finalize实现,解决编译报错问题。