I am looking at a very old version of the Linux kernel for learning purposes. Specifically the IRQ handler as linked here IRQ handler.
My understanding from a typical OS 101 course, is that context switches typically happen when the system takes an IRQ. Consequently using Linux as a reference, I have been trying to understand the following:
What are the differences in the IRQ handling, if the IRQ were to happen when system is in USR mode (User-Space) vs if the IRQ were to happen when the system is in the SVC mode (Kernel Space). Because it seems like there are two possible paths __irq_svc and __irq_usr.
Secondly, what are the implications of the differences (if any) in the above IRQ handling, on the context switching procedure ?
I would appreciate some insight in this regard.