Title: [6724] trunk/arch/blackfin/kernel/irqchip.c: Blackfin: abstract irq14 lowering in do_irq
- Revision
- 6724
- Author
- vapier
- Date
- 2009-06-15 05:23:58 -0500 (Mon, 15 Jun 2009)
Log Message
Blackfin: abstract irq14 lowering in do_irq
Split out the optional IRQ14 lowering code to further simplify the
asm_do_IRQ() function and keep the ifdef nest under control.
Modified Paths
Diff
Modified: trunk/arch/blackfin/kernel/irqchip.c (6723 => 6724)
--- trunk/arch/blackfin/kernel/irqchip.c 2009-06-15 10:23:24 UTC (rev 6723)
+++ trunk/arch/blackfin/kernel/irqchip.c 2009-06-15 10:23:58 UTC (rev 6724)
@@ -104,6 +104,29 @@
static inline void check_stack_overflow(int irq) { }
#endif
+#ifndef CONFIG_IPIPE
+static void maybe_lower_to_irq14(void)
+{
+ unsigned short pending, other_ints;
+
+ /*
+ * If we're the only interrupt running (ignoring IRQ15 which
+ * is for syscalls), lower our priority to IRQ14 so that
+ * softirqs run at that level. If there's another,
+ * lower-level interrupt, irq_exit will defer softirqs to
+ * that. If the interrupt pipeline is enabled, we are already
+ * running at IRQ14 priority, so we don't need this code.
+ */
+ CSYNC();
+ pending = bfin_read_IPEND() & ~0x8000;
+ other_ints = pending & (pending - 1);
+ if (other_ints == 0)
+ lower_to_irq14();
+}
+#else
+static inline void maybe_lower_to_irq14(void) { }
+#endif
+
/*
* do_IRQ handles all hardware IRQs. Decoded IRQs should not
* come via this function. Instead, they should provide their
@@ -114,9 +137,6 @@
#endif
asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
-#ifndef CONFIG_IPIPE
- unsigned short pending, other_ints;
-#endif
struct pt_regs *old_regs = set_irq_regs(regs);
irq_enter();
@@ -132,21 +152,8 @@
else
generic_handle_irq(irq);
-#ifndef CONFIG_IPIPE
- /*
- * If we're the only interrupt running (ignoring IRQ15 which
- * is for syscalls), lower our priority to IRQ14 so that
- * softirqs run at that level. If there's another,
- * lower-level interrupt, irq_exit will defer softirqs to
- * that. If the interrupt pipeline is enabled, we are already
- * running at IRQ14 priority, so we don't need this code.
- */
- CSYNC();
- pending = bfin_read_IPEND() & ~0x8000;
- other_ints = pending & (pending - 1);
- if (other_ints == 0)
- lower_to_irq14();
-#endif /* !CONFIG_IPIPE */
+ maybe_lower_to_irq14();
+
irq_exit();
set_irq_regs(old_regs);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits