[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: why cannot block inside interrupt context
From:       Li Xinyi <lxinyi () gmail ! com>
Date:       2005-01-28 5:07:03
Message-ID: 41F9C877.2010005 () gmail ! com
[Download RAW message or body]

Chris McKillop wrote:
> 
> Because there is no associated process to "wake up" after the sleep is 
> finished.  Having a (new) process context setup each time there is an 
> interrupt is counter to the ideal of interrupts being small, fast and 
> efficient. There are certainly ways to trigger a process (thread) to run 
> on interrupt, which will let you sleep.  If you aren't worried about 
> worst-case latency you can simply do all the processing outside of the ISR.
> 

Hi,

In ARM Linux (kernel 2.4.x), when interrupt happens, processor jumps to 
vecotr_IRQ, where the processor saves certain registers to temp memory 
and moves to SVC mode. sp now points to the Kernle Mode Stack of the 
process being interrupted, deosnt it? After the rountine push certain 
information required to go back to user mode in the Kernle Mode Stack, 
sleep should safe given interrupt in re-enabled. Of course this is a bad 
practice. What I try to understand is if it is possble in theory.

Thanks,
Li Xinyi

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic