From: Sowmini Varadhan <sowmini.varadhan@xxxxxxxxxx> Date: Fri, 19 Dec 2014 13:31:33 -0500 > I could look into that, but would need help from other arch experts for > help with extraction of the platform-dependant parts, implementation and > testing. Looks like pci-calgary_64.c also has an obvious copy of the > powerpc algorithm, and there are other *iommu.c implementations as well, > where the duplication may be there, but is not obvious (from cscope etc.). I suspect that if we come up with something that should work for both powerpc and sparc, we can just let linux-arch@xxxxxxxxxxxxxxx know about it to give a heads up for other platform maintainers so they can do the conversions for their code too. The core operation is the range allocation. So if you just put the powerpc alloc/free code (basically, the bulk of your patch) into lib/iommu-common.c or similar, that ought to be a good starting point. The patch set would look like: 1) move powerpc iommu range alloc/free into lib/iommu-common.c 2) make sparc64 use it -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html