On Wed, Aug 24, 2011 at 4:15 PM, Roedel, Joerg <Joerg.Roedel@xxxxxxx> wrote: > Yes, it should be safe in your context. But the iommu-api is generic and > I would prefer that all functions it provides can be called from any > context. Not a problem. I thought you only cared about map/unmap, but if you prefer attach/deattach to be atomic too, I'll migrate the driver to use a spin lock. > Or is the time required for attaching/detaching too long so that it > makes sense to put secondary threads to sleep? It doesn't look like it. I think a mutex was originally chosen at that point because those functions were used in a process context. Thanks, Ohad. -- 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