Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-24 Thread Ohad Ben-Cohen
On Wed, Aug 24, 2011 at 4:15 PM, Roedel, Joerg 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/dea

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-24 Thread Roedel, Joerg
On Wed, Aug 24, 2011 at 08:46:13AM -0400, Ohad Ben-Cohen wrote: > On Tue, Aug 23, 2011 at 5:59 PM, Ohad Ben-Cohen wrote: > > On Tue, Aug 23, 2011 at 5:07 PM, Roedel, Joerg wrote: > >> Can this be easily converted to a spin_lock? > > > > Sure, thanks for reviewing. > > Taking a second look, I don

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-24 Thread Ohad Ben-Cohen
On Tue, Aug 23, 2011 at 5:59 PM, Ohad Ben-Cohen wrote: > On Tue, Aug 23, 2011 at 5:07 PM, Roedel, Joerg wrote: >> Can this be easily converted to a spin_lock? > > Sure, thanks for reviewing. Taking a second look, I don't think it's necessary - the mutex isn't used to protect the page table. The

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-23 Thread Ohad Ben-Cohen
On Tue, Aug 23, 2011 at 5:07 PM, Roedel, Joerg wrote: > Can this be easily converted to a spin_lock? Sure, thanks for reviewing. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kerne

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-23 Thread Roedel, Joerg
On Wed, Aug 17, 2011 at 07:10:02PM -0400, Ohad Ben-Cohen wrote: > +/** > + * omap_iommu_attach() - attach iommu device to an iommu domain > + * @dev: target omap iommu device > + * @iopgd: page table > **/ > -struct iommu *iommu_get(const char *name) > +static struct iommu *omap_iommu_a

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-18 Thread Arnd Bergmann
On Thursday 18 August 2011, Laurent Pinchart wrote: > > +static int omap_iommu_domain_init(struct iommu_domain *domain) > > +{ > > + struct omap_iommu_domain *omap_domain; > > + > > + omap_domain = kzalloc(sizeof(*omap_domain), GFP_KERNEL); > > + if (!omap_domain) { > > + pr

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-18 Thread Ohad Ben-Cohen
Hi Laurent, On Thu, Aug 18, 2011 at 12:01 PM, Laurent Pinchart wrote: > Just one small comment in case you resubmit the whole series for another > reason. .. > You can directly return -ENOMEM here, and remove the "out:" label. Sure thing, Thanks, Ohad. -- To unsubscribe from this list: send the

Re: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-18 Thread Laurent Pinchart
Hi Ohad, Thanks for the patch. Just one small comment in case you resubmit the whole series for another reason. On Thursday 18 August 2011 01:10:02 Ohad Ben-Cohen wrote: > Migrate OMAP's iommu driver to the generic IOMMU API, so users can stay > generic, and any generic IOMMU functionality can

[PATCH 1/7] omap: iommu: migrate to the generic IOMMU API

2011-08-17 Thread Ohad Ben-Cohen
Migrate OMAP's iommu driver to the generic IOMMU API, so users can stay generic, and any generic IOMMU functionality can be developed once in the generic framework. Migrate omap's iovmm (virtual memory manager) to the generic IOMMU API, and adapt omap3isp as needed, so the latter won't break. The