111struct irq_chip {
112 const char *name;
113 unsigned int (*startup)(unsigned int irq);
114 void (*shutdown)(unsigned int irq);
115 void (*enable)(unsigned int irq);
116 void (*disable)(unsigned int irq);
117
118 void (*ack)(unsigned int irq);
119 void (*mask)(unsigned int irq);
120 void (*mask_ack)(unsigned int irq);
121 void (*unmask)(unsigned int irq);
122 void (*eoi)(unsigned int irq);
123
124 void (*end)(unsigned int irq);
125 int (*set_affinity)(unsigned int irq,
126 const struct cpumask *dest);
127 int (*retrigger)(unsigned int irq);
128 int (*set_type)(unsigned int irq, unsigned int flow_type);
129 int (*set_wake)(unsigned int irq, unsigned int on);
130
131 void (*bus_lock)(unsigned int irq);
132 void (*bus_sync_unlock)(unsigned int irq);
133
134 /* Currently used only by UML, might disappear one day.*/
135#ifdef CONFIG_IRQ_RELEASE_METHOD
136 void (*release)(unsigned int irq, void *dev_id);
137#endif
138 /*
139 * For compatibility, ->typename is copied into ->name.
140 * Will disappear.
141 */
142 const char *typename;
143};
144
111struct irq_chip {
112 const char *name;
113 unsigned int (*startup)(unsigned int irq);
114 void (*shutdown)(unsigned int irq);
115 void (*enable)(unsigned int irq);
116 void (*disable)(unsigned int irq);
117
118 void (*ack)(unsigned int irq);
119 void (*mask)(unsigned int irq);
120 void (*mask_ack)(unsigned int irq);
121 void (*unmask)(unsigned int irq);
122 void (*eoi)(unsigned int irq);
123
124 void (*end)(unsigned int irq);
125 int (*set_affinity)(unsigned int irq,
126 const struct cpumask *dest);
127 int (*retrigger)(unsigned int irq);
128 int (*set_type)(unsigned int irq, unsigned int flow_type);
129 int (*set_wake)(unsigned int irq, unsigned int on);
130
131 void (*bus_lock)(unsigned int irq);
132 void (*bus_sync_unlock)(unsigned int irq);
133
134 /* Currently used only by UML, might disappear one day.*/
135#ifdef CONFIG_IRQ_RELEASE_METHOD
136 void (*release)(unsigned int irq, void *dev_id);
137#endif
138 /*
139 * For compatibility, ->typename is copied into ->name.
140 * Will disappear.
141 */
142 const char *typename;
143};
144
name:中断控制器的名字;
Startup:启动中断线;
Shutdown:关闭中断线;
Enable:允许中断;
Disable:禁止中断;
分析了struct irq_desc,struct irq_chip和irqaction的数据结构之后我们来看看他们之间的关系 。
现在深入分析request_irq()内部是如何实现的。