Andi Kleen wrote: > The standard Linux approach to such a problem is to write > a library that drivers can use for common functionality, not put a middle > layer inbetween. Libraries are much more flexible than layers. I've been thinking about this statement. Its very true. I use the genalloc lib which is a great piece of software to manage VCMs (domains in linux/iommu.h parlance?). On our hardware we have 3 things we have to do, use the minimum set of mappings to map a buffer because of the extremely small TLBs in all the IOMMUs we have to support, use special virtual alignments and direct various multimedia flows through certain IOMMUs. To support this we: 1. Use the genalloc lib to allocate virtual space for our IOMMUs, allowing virtual alignment to be specified. 2. Have a maxmunch allocator that manages our own physical pool. I think I may be able to support this using the iommu interface and some util functions. The big thing that's lost is the unified topology management, but as demonstrated that may fall out from a refactor. Anyhow, sounds like a few things to try. Thanks for the feedback so far. I'll do some refactoring and see what's missing. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html