Linux Interrupt Context maps to ARM CPSR.mode = IRQ
Hi, As per a lot of linux documentation some components work in process context and some work in interrupt context. If we try to map these contexts to ARM processor modes then is it safely to assume that Process Context : CPSR.mode = SVC Interrupt Context : CPSR.mode = IRQ If not how to define interrupt context properly. Confusing at times. -- -mj
Adding Marc to comment Marc Please clarify the doubt On Fri, May 2, 2014 at 5:15 PM, Mj Embd <mj.embd@gmail.com> wrote:
Hi,
As per a lot of linux documentation some components work in process context and some work in interrupt context.
If we try to map these contexts to ARM processor modes then is it safely to assume that Process Context : CPSR.mode = SVC Interrupt Context : CPSR.mode = IRQ
If not how to define interrupt context properly. Confusing at times.
-- -mj
-- -mj
On 2014-05-02 13:34, Mj Embd wrote:
Adding Marc to comment Marc Please clarify the doubt
On Fri, May 2, 2014 at 5:15 PM, Mj Embd <mj.embd@gmail.com> wrote:
Hi,
As per a lot of linux documentation some components work in process context and some work in interrupt context.
If we try to map these contexts to ARM processor modes then is it safely to assume that Process Context : CPSR.mode = SVC Interrupt Context : CPSR.mode = IRQ
If not how to define interrupt context properly. Confusing at times.
Well, none of this is completely true. Process context exists both in USR (process in user mode) and SVC (process in kernel mode, executing a syscall for example). As for interrupts, the processor indeed starts executing the interrupt in IRQ mode, but this is a useless complication as far as Linux is concerned, and we quickly switch to SVC (see the definition of the vector_stub macro in arch/arm/kernel/entry-armv.S). Hope this helps. M. -- Fast, cheap, reliable. Pick two.
participants (2)
-
Marc Zyngier -
Mj Embd