On Tue, Jun 26, 2012 at 11:07:43AM -0700, Chris Wright wrote:
> * Joerg Roedel ([email protected]) wrote:
> > On Fri, Jun 22, 2012 at 03:28:14PM +0400, Alexandra N. Kossovsky wrote:
> > > Hello.
> > >
> > > It is not clear from the documentation if iommu_map()/iommu_unmap()
> > > functions may be called from atomic context.
> > > In case of Intel IOMMU, it works; in case of AMD IOMMU, it does not.
> > >
> > > Was it done by purpose? May I propose a patch for AMD IOMMU replacing
> > > GFP_KERNEL by GFP_ATOMIC to make things better?
> >
> > Well, a better option would be to have an iommu_map_atomic() alongside
> > the current iommu_map API call.
>
> A simple change for ->map to include flags and an iommu_map_atomic helper
> that calls ->map w/ GFP_ATOMIC will hit this in AMD IOMMU:
>
> mutex_lock(&domain->api_lock);
> - ret = iommu_map_page(domain, iova, paddr, prot, page_size);
> + ret = iommu_map_page(domain, iova, paddr, prot, page_size, flags);
> mutex_unlock(&domain->api_lock);
Yes, something like this was in my mind too. Can you send this as a real
patch-set for inclusion or is it better if someone else is picking this
up?
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu