static irqreturn_t fpga_interrupt_irq(int irq,void *dev_id)//中断服务函数
{
flag = 1;
printk("=====ods_fpga IRQ: %d\n",irq);
printk("==============flag: %d\n",flag);
wake_up_interruptible(&wq);
return IRQ_HANDLED;
}
ret = request_irq(IRQ_EINT2,fpga_interrupt_irq,IRQF_DISABLED | IRQF_TRIGGER_HIGH ,DEVICE_NAME,NULL);//申请注册中断
是这样的,2440总线上接了FPGA,FPGA数据准备好后,就给一个中断给2440,2440开始读数据,中断后,唤醒read,现在感觉中断服务函数一直在执行,打印信息如下:
==============flag: 1
=====ods_fpga IRQ: 18
==============flag: 1
=====ods_fpga IRQ: 18
==============flag: 1
=====ods_fpga IRQ: 18
==============flag: 1
=====ods_fpga IRQ: 18
==============flag: 1
=====ods_fpga IRQ: 18
==============flag: 1
无限次执行下去,而read也没有被唤醒,求大大指点啊,这是什么原因啊 |