linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: calling pci_find_device in interrupt ?
       [not found] <20040119151531.C22416@forte.austin.ibm.com>
@ 2004-01-19 21:41 ` Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2004-01-19 21:41 UTC (permalink / raw)
  To: linas; +Cc: linux-hotplug-devel, linux-kernel

On Mon, Jan 19, 2004 at 03:15:31PM -0600, linas@austin.ibm.com wrote:
> 
> Greg,

Hm, this isn't really a hotplug question.  This is better asked on
linux-kernel.

> I was calling pci_find_device() from an interrupt, when I discovered
> that it has a WARN_ON(in_interrupt()); in it.
> 
> Why?  If spin_lock(&pci_bus_lock); was changed to spin_lock_irqsave(),
> it seems like it would be interrupt-safe.  

Because you should not call such a function from an interrupt.  It is a
waste of time.  Just save off your pci device structure properly in your
setup functions.

Also, don't use the pci_find_* functions.  Use the pci_get_* functions
instead, as the pci_find_* functions will be going away in a future
kernel version (probably 2.7).

thanks,

greg k-h

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-19 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040119151531.C22416@forte.austin.ibm.com>
2004-01-19 21:41 ` calling pci_find_device in interrupt ? Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).