内核版本(3.10.90)
1. arch\arm\kernel\entry-common.S
/*
* "slow" syscall return path. "why" tells us if this was a real syscall.
*/
ENTRY(ret_to_user) /* 执行路径 :
* __dabt_usr --> ret_from_exception --> ret_to_user
* __pabt_usr --> ret_from_exception --> ret_to_user
*/
ret_slow_syscall:
disable_irq @ disable interrupts
/* 这里为什么要 disable_irq 呢 ??? r0 表示的就是中断号 ???
* 在 kernel\irq\manage.c 里定义了:
* void disable_irq(unsigned int irq)
*/
ENTRY(ret_to_user_from_irq) /* 执行路径: __irq_usr --> ret_to_user_from_irq */
ldr r1, [tsk, #TI_FLAGS] /* arch\arm\kernel\entry-header.S 里定义了
* tsk .req r9 @ current thread_info
* 在 __irq_usr 里通过 get_thread_info tsk 得到值
*/
tst r1, #_TIF_WORK_MASK
bne work_pending
no_work_pending:
asm_trace_hardirqs_on
/* perform architecture specific actions before user return */
arch