Chinaunix首页 | 论坛 | 博客
  • 博客访问: 417644
  • 博文数量: 99
  • 博客积分: 65
  • 博客等级: 民兵
  • 技术积分: 1012
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-20 16:30
个人简介

linux kernel 工程师

文章分类

全部博文(99)

文章存档

2018年(5)

2017年(12)

2016年(27)

2015年(10)

2014年(43)

2012年(2)

我的朋友

发布时间:2014-02-08 16:14:33

handle_edge_irq,handle_level_irq等函数会调用handle_irq_event,我们来看一下它的流程handle_irq_event->handle_irq_event_percpu->action->handlerirqreturn_t handle_irq_event(struct irq_desc *desc){ struct irqaction *action = desc->action; irqreturn_t ret; desc->istate &= ~IRQS.........【阅读全文】

阅读(4432) | 评论(0) | 转发(0)

发布时间:2014-02-08 16:04:24

linux中断(2):中断注册之__irq_set_handler 文中提到 __irq_set_handler作为中断注册的第一个层次,通过这个函数为desc->handle_irq 安排一个处理函数。通常安排的处理函数有handle_edge_irq,handle_level_irq等 假如安排的处理函数是   handle_level_irq,我们看一下处理流程 /** *&.........【阅读全文】

阅读(1673) | 评论(0) | 转发(0)

发布时间:2014-02-08 15:37:08

 在x86里面irq的入口函数是 do_irq() 在arm里面irq的入口函数是 asm_do_irq() unsigned int __irq_entry do_IRQ(struct pt_regs *regs){struct pt_regs *old_regs = set_irq_regs(regs);/* high bit used in ret_from_ code  */unsigned vector = ~regs->orig_ax;unsigned irq;irq_enter().........【阅读全文】

阅读(1402) | 评论(0) | 转发(0)

发布时间:2014-02-08 15:26:46

__setup_irq是request_irq的核心部分,真正实现把 irqaction添加到irq_desc上面/* * Internal function to register an irqaction - typically used to * allocate special interrupts that are part of the architecture. */static int__setup_irq(unsigned int irq, struct irq_desc *desc, .........【阅读全文】

阅读(3119) | 评论(0) | 转发(0)

发布时间:2014-02-08 15:14:36

注册中断的函数是request_irq,实际上这个函数会调用request_threaded_irq,但由于调用request_threaded_irq(irq, handler, NULL, flags, name, dev);时,参数3,也就是thread_fn为NULL,调用request_irq注册的isr不会被线程化。request_threaded_irq(unsigned int irq, irq_handler_t handler,   .........【阅读全文】

阅读(3665) | 评论(1) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册