深入中断

http://bbs.chinaunix.net/thread-3628928-1-1.html 

Q:中断线屏蔽与禁用什么区别?

A:local_irq_disable就是调用的汇编指令 cli,所以是禁止中断。
disable_irq是将相应的irqdesc->status |= IRQ_DISABLE, 所以是屏蔽中断。
禁止中断和屏蔽中断的区别就是,cli后,不会产生中断信号; disable后会产生中断信号,但是不会处理中断,只是置位IRQ_PENDING 

 

非常好的分析的文章:

http://www.ibm.com/developerworks/cn/linux/l-cn-linuxkernelint/index.html#resources

http://bbs.chinaunix.net/thread-2015970-1-1.html

http://www.ibm.com/developerworks/cn/linux/l-affinity.html

http://www.linuxidc.com/Linux/2011-02/32129.htm

http://www.vrlinux.com/naheyuanma/20100404/12340_2.html

http://wenku.baidu.com/view/98118ad1240c844769eaee72.html

http://bbs.chinaunix.net/thread-1979496-1-1.html 在多核系统上网络数据转发实验和一点思考

 

 

西邮兴趣小组

http://edsionte.com/techblog/archives/1495  什么是中断?

http://edsionte.com/techblog/archives/1618  与中断有关的数据结构

http://edsionte.com/techblog/archives/1539  对中断进行上部分和下部分的划分

http://edsionte.com/techblog/archives/1547  中断下半部-tasklet

http://edsionte.com/techblog/archives/1582  中断下半部-工作队列

http://edsionte.com/techblog/archives/1521  你的第一个中断程序!

http://www.kerneltravel.net/journal/viii/01.htm  中断解析

中断的应用

/*

usage: Compiling this file by make

and using the following command to insert the mode which the make generated just now

command: sudo insmod filename.ko irq=1 devname=myirq

This interrupt shared the one irq with keyboard

*/

#include <linux/kernel.h>

#include <linux/module.h>

#include <linux/init.h>

#include <linux/interrupt.h>



static int irq;

static char* devname;

static struct tasklet_struct mytasklet;



module_param(irq,int,0644);

module_param(devname,charp,0644);



struct myirq

{

int devid;

};

struct myirq mydev={1119};



static void mytasklet_handler(unsigned long data)

{

printk("tasklet is wroking..\n");

}



static irqreturn_t myirq_handler(int irq,void* dev)

{

struct myirq mydev;

static int count=0;

mydev=*(struct myirq*)dev;

printk("key:%d..\n",count+1);

printk("devid:%d ISR is working..\n",mydev.devid);

printk("Bottom half will be working..\n");

tasklet_init(&mytasklet,mytasklet_handler,0);

tasklet_schedule(&mytasklet);

printk("ISR is leaving..\n");

count++;

return IRQ_HANDLED;

}



static int __init myirq_init()

{

printk("Module is working..\n");

if(request_irq(irq,myirq_handler,IRQF_SHARED,devname,&mydev)!=0)

{

printk("%s request IRQ:%d failed..\n",devname,irq);

return -1;

}

printk("%s rquest IRQ:%d success..\n",devname,irq);

return 0;

}



static void __exit myirq_exit()

{

printk("Module is leaving..\n");

free_irq(irq,&mydev);

printk("%s request IRQ:%d success..\n",devname,irq);

}



module_init(myirq_init);

module_exit(myirq_exit);

MODULE_LICENSE("GPL");

cat /proc/interrupts出来的

 

IO-APIC-edge

IO-APIC-level 

之间的区别

http://www.douban.com/note/52173385/

 

normalnotebook的几篇异常精彩的文章

http://blog.csdn.net/normalnotebook/article/details/1649770

http://blog.csdn.net/normalnotebook/article/details/1649792

中断处理源码情景分析

原文地址:https://www.cnblogs.com/moonflow/p/2296216.html