Subject: Re: local_irq_save not masking interrupts

From: Scott Wood <[email-masked]>
Date: Tue, 26 Sep 2006 11:02:39 -0500

Alex Zeffertt wrote:
> Well, mpc832xemds_phy_interrupt_enable() does nothing except call
> request_irq(,,SA_SHIRQ,,).  I suspect that request_irq() is somehow
> reenabling interrupts, but I can't see where it might be doing so.

One possibile way (in 2.6.18; I'm assuming 2.6.11 is similar) is that 
request_irq() calls setup_irq(), which calls register_irq_proc() and 
register_handler_proc(), both of which call proc_mkdir(), which 
eventually calls proc_create(), which calls kmalloc() with GFP_KERNEL. 
This is probably a bug, since request_irq itself uses GFP_ATOMIC, 
indicating an intent for request_irq() to be safely callable in atomic 
context.

Can you disable the interrupts at the device level until the handler is 
in place, and thus avoid the need to disable IRQs at all?

-Scott