内核版本 3.10.90
arch\arm\kernel\entry-armv.S
/*
* Register switch for ARMv3 and ARMv4 processors
* r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
* previous and next are guaranteed not to be the same.
*/
ENTRY(__switch_to) /* 其调用流程为:__schedule --> context_switch --> switch_to --> __switch_to
* 由于 arch\arm\include\asm\switch_to.h 里:
* #define switch_to(prev,next,last) \
* do { \
* last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \
* } while (0)
* 从而执行到该函数时,lr 为 context_switch 中 switch_to 的下一条指令,即 barrier();
*/
UNWIND(.fnstart )
UNW