lkml.org 
[lkml]   [2004]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: calling pci_find_device in interrupt ?
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.049 / U:4.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site