[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:       Chris McKillop <cdm () killerstuff ! net>
Date:       2005-01-28 5:19:23
Message-ID: 41F9CB5B.2060900 () killerstuff ! net
[Download RAW message or body]


> 
> 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.
> 

The best thing you can do is read kernel/sched.c, starting with 
schedule() so you can better understand how the linux kernel manages 
process.  Basically the architecture of the kernel doesn't allow for 
interrupt handlers to sleep.  A different kernel with a different 
architecture could certainly provide such a feature.

	chris




-------------------------------------------------------------------
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