Linux内核开发教程:中断处理与数据结构详解.pptxVIP

  • 0
  • 0
  • 约小于1千字
  • 约 5页
  • 2026-01-26 发布于北京
  • 举报

Linux内核开发教程:中断处理与数据结构详解.pptx

Linux内核

第十五讲Linux中的中断处理

主讲人:赵亚

华章培训网、[]华章培训网

Linux中断数据结构

第2页

一、数据结构

1、irqaction

structirqaction{

irqreturn_t(*handler)(int,void*,structpt_regs*);

unsignedlongflags;

cpumask_tmask;

constchar*name;

void*dev_id;

structirqaction*next;

intirq;

structproc_dir_entry*dir;

};

Linux中断数据结构

第3页

2、irq_desc

typedefstructirq_desc{

hw_irq_controller*handler;

void*handler_data;

structirqaction*action; /*IRQactionlist*/

unsignedintstatus; /*IRQstatus*/

unsignedintdepth; /*nestedirqdisables*/

}____cacheline_alignedirq_desc_t;

Linux中断处理

第4页

二、Linux中断处理

1、中断号确定

一般而言在驱动程序的probe函数中调用硬件io例 程确定中断号,对于pci设备,传统意义上,该中断 号是fireware写入设备的配置空间的。

pci_read_config_XX

2、中断处理程序申请

request_irq函数

3、中断处理

do_IRQ函数

感谢您对华章培训网的支持!

.

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档