还记得系统时钟初始化的时候吗,定义了系统时钟中断函数,
static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id)
{
struct clock_event_device *evt = &clockevent_mxc;
uint32_t tstat;
if (timer_is_v2())
tstat = __raw_readl(timer_base + MX3_TSTAT);
else
tstat = __raw_readl(timer_base + MX1_2_TSTAT);
gpt_irq_acknowledge();
evt->event_handler(evt); //这里就是系统中断,里面完成了好多东西,包括软中断的执行系统调用
return IRQ_HANDLED;
}
系统时钟中断发生后最终到这里来执行系统时钟中断。