lkml.org 
[lkml]   [2010]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pci_get_dev_by_id() from interrupt handlers
On Tue, Apr 20, 2010 at 06:04:24PM +0200, Joerg Roedel wrote:
> Hi Jesse,
>
> I have a question regarding the warning in the pci_get_dev_by_id()
> [search.c] function which triggers when called from interrupt context.
> As far as I have seen this function should be save to be called in
> atomic mode.

Are you sure?

> Is there any other reason it should not be called in interrupt
> handlers?

klist traversal is not safe to be done in interrupt context as the
spinlock is not told to be interrupt safe. Now you could go and change
the klist core to be interrupt safe, but you should probably rethink
your need here first.

> I need to (indirectly) call this function for my IOMMU driver to
> handle events from the IOMMU.

From interrupt? Why not use an interrupt thread instead if you really
need to do this.

Actually, what are you trying to accomplish here?

thanks,

greg k-h


\
 
 \ /
  Last update: 2010-04-20 18:33    [W:1.204 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site