lkml.org 
[lkml]   [2008]   [Sep]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 29 Sep 2008 11:29:17 +0200
FromJoerg Roedel <>
SubjectRe: [PATCH 9/9] x86/iommu: use dma_ops_list in get_dma_ops
On Mon, Sep 29, 2008 at 12:25:49PM +0300, Muli Ben-Yehuda wrote:
> On Sun, Sep 28, 2008 at 08:44:24PM +0200, Joerg Roedel wrote:
> 
> > Hmm, we should only call find_dma_ops_for_device() the first time a
> > dma api call is done (look into get_dma_ops). But I also thought
> > about how this lock can be avoided. In the real world it should not
> > be necessary because the dma_ops list is initialized before dma api
> > calls are done. But since there is now a register function which can
> > be called its safer this way. What do you think, are we still safe
> > enough without this lock?
> 
> We could be, if we add a check to the register function that verifies
> it isn't being called after DMAs have started. Something like:
> 
> in register:
> 
>   if (dma_started)
>     yell loudly
> 
> before PCI device initialization and after IOMMU initialization:
>   dma_started = true

Good idea. I will change this in my patchset, thanks.

Joerg



\
 
 \ /
  Last update: 2008-09-29 11:33    [from the cache]
©2003-2008