On Mon, 23 Sep 2002, Keith Whitwell wrote:
> 
> This is an open question for me.  Does linux require an irq bh just to do a 
> wake_up_interruptible?  Could/should we do something equivalent from the tophalf?

You can do pretty much anything from an interrupt context, as long as you
don't sleep or try to access process data structures (ie a lot of
process-related data structures are not designed to be interrupt-safe). 

The only reason to try to keep the irq handler lean and mean is interrupt 
latency for other handlers - this is noticeable mainly for things like 
networking where an incoming packet will result in a _lot_ of work, and 
thus the irq handler does only the minimum "get the packet off the card" 
and the real work is done elsewhere.

Feel free to fill buffers etc from irq handlers, the only caveat is that 
the buffers have to be _kernel_ buffers, and you cannot try to find the 
process memory and do any user-space access. The actual kernel<->user 
transfer has to happen in process context, not irq context.

                Linus



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to