@@ -1182,45 +1182,42 @@ static void irq_finalize_oneshot(struct irq_desc *desc,
1182
1182
}
1183
1183
1184
1184
/*
1185
- * Interrupts which are not explicitly requested as threaded
1186
- * interrupts rely on the implicit bh/preempt disable of the hard irq
1187
- * context. So we need to disable bh here to avoid deadlocks and other
1188
- * side effects.
1185
+ * Interrupts explicitly requested as threaded interrupts want to be
1186
+ * preemptible - many of them need to sleep and wait for slow busses to
1187
+ * complete.
1189
1188
*/
1190
- static irqreturn_t
1191
- irq_forced_thread_fn (struct irq_desc * desc , struct irqaction * action )
1189
+ static irqreturn_t irq_thread_fn (struct irq_desc * desc , struct irqaction * action )
1192
1190
{
1193
- irqreturn_t ret ;
1191
+ irqreturn_t ret = action -> thread_fn ( action -> irq , action -> dev_id ) ;
1194
1192
1195
- local_bh_disable ();
1196
- if (!IS_ENABLED (CONFIG_PREEMPT_RT ))
1197
- local_irq_disable ();
1198
- ret = action -> thread_fn (action -> irq , action -> dev_id );
1199
1193
if (ret == IRQ_HANDLED )
1200
1194
atomic_inc (& desc -> threads_handled );
1201
1195
1202
1196
irq_finalize_oneshot (desc , action );
1203
- if (!IS_ENABLED (CONFIG_PREEMPT_RT ))
1204
- local_irq_enable ();
1205
- local_bh_enable ();
1206
1197
return ret ;
1207
1198
}
1208
1199
1209
1200
/*
1210
- * Interrupts explicitly requested as threaded interrupts want to be
1211
- * preemptible - many of them need to sleep and wait for slow busses to
1212
- * complete.
1201
+ * Interrupts which are not explicitly requested as threaded
1202
+ * interrupts rely on the implicit bh/preempt disable of the hard irq
1203
+ * context. So we need to disable bh here to avoid deadlocks and other
1204
+ * side effects.
1213
1205
*/
1214
- static irqreturn_t irq_thread_fn (struct irq_desc * desc ,
1215
- struct irqaction * action )
1206
+ static irqreturn_t irq_forced_thread_fn (struct irq_desc * desc , struct irqaction * action )
1216
1207
{
1217
1208
irqreturn_t ret ;
1218
1209
1210
+ local_bh_disable ();
1211
+ if (!IS_ENABLED (CONFIG_PREEMPT_RT ))
1212
+ local_irq_disable ();
1219
1213
ret = action -> thread_fn (action -> irq , action -> dev_id );
1220
1214
if (ret == IRQ_HANDLED )
1221
1215
atomic_inc (& desc -> threads_handled );
1222
1216
1223
1217
irq_finalize_oneshot (desc , action );
1218
+ if (!IS_ENABLED (CONFIG_PREEMPT_RT ))
1219
+ local_irq_enable ();
1220
+ local_bh_enable ();
1224
1221
return ret ;
1225
1222
}
1226
1223
0 commit comments