博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
微视linux 挂接中断action的前奏 设置中断处理函数
阅读量:4070 次
发布时间:2019-05-25

本文共 2101 字,大约阅读时间需要 7 分钟。

unsigned int irq_of_parse_and_map(struct device_node *dev, int index)	struct of_irq oirq;		of_irq_map_one(dev, index, &oirq)		return irq_create_of_mapping(oirq.controller, oirq.specifier, oirq.size);		=>unsigned int irq_create_of_mapping(struct device_node *controller, const u32 *intspec, unsigned int intsize)		host = irq_find_host(controller);				host->ops->xlate(host, controller, intspec, intsize, &hwirq, &type))				/* Create mapping */		virq = irq_create_mapping(host, hwirq);		=>unsigned int irq_create_mapping(struct irq_host *host, irq_hw_number_t hwirq)			/* Check if mapping already exist, if it does, call			 * host->ops->map() to update the flags			 */			virq = irq_find_mapping(host, hwirq);			if (virq != NO_IRQ) {				if (host->ops->remap)					host->ops->remap(host, virq, hwirq);				pr_debug("irq: -> existing mapping on virq %d\n", virq);				return virq;			}						/* Allocate a virtual interrupt number */			hint = hwirq % irq_virq_count;			virq = irq_alloc_virt(host, 1, hint);					irq_setup_virq(host, virq, hwirq)			=>int irq_setup_virq(struct irq_host *host, unsigned int virq, irq_hw_number_t hwirq)				struct irq_desc *desc = irq_to_desc_alloc_node(virq, 0);								/* Clear IRQ_NOREQUEST flag */				desc->status &= ~IRQ_NOREQUEST;				/* map it */				smp_wmb();				irq_map[virq].hwirq = hwirq;				smp_mb();								host->ops->map(host, virq, hwirq)				=>static struct irq_host_ops mpic_host_ops = {//在irq_alloc_host里面设置					.match = mpic_host_match,					.map = mpic_host_map,					.xlate = mpic_host_xlate,				};					=>int mpic_host_map(struct irq_host *h, unsigned int virq, irq_hw_number_t hw)						struct mpic *mpic = h->host_data;						struct irq_chip *chip;						set_irq_chip_data(virq, mpic);						set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq);//设置中断处理函数						/* Set default irq type */						set_irq_type(virq, IRQ_TYPE_NONE);						return 0;									return virq;				/* Set type if specified and different than the current one */		if (type != IRQ_TYPE_NONE &&			type != (irq_to_desc(virq)->status & IRQF_TRIGGER_MASK))			set_irq_type(virq, type);					return virq;

 

转载地址:http://evlji.baihongyu.com/

你可能感兴趣的文章
osd 故障测试
查看>>
openstack 管理 三十七 - 创建 vm 并 指定IP 地址
查看>>
利用数据库自定义并发 bunket 功能
查看>>
ceph OSD 故障记录
查看>>
ceph osd 更换硬盘记录
查看>>
logstash 常见解决方法
查看>>
ceph 故障分析(backfill_toofull)
查看>>
ceph 故障解决备忘
查看>>
更改 ceph journal 位置
查看>>
docker private registry using rados beckend
查看>>
使用 docker 后出现的网络异常现象
查看>>
ceph ( requests are blocked ) 异常解决方法
查看>>
ceph 报警 [ low disk space] 解决
查看>>
python 调用 lvs 脚本 [备忘]
查看>>
openstack 命令行管理二十一 - 云盘管理 (备忘)
查看>>
docker 文件位置[备忘]
查看>>
rhel7 kickstart 参考[备忘]
查看>>
DNS请求分析
查看>>
docker - 资源限制
查看>>
puppet 配置 1. 服务器, 客户端配置说明
查看>>