Thread (77 messages) 77 messages, 11 authors, 2012-07-06
STALE5133d

[PATCH 15/16] ARM: fiq: save FIQ_START by passing absolute fiq number

From: Shawn Guo <hidden>
Date: 2012-06-19 05:26:56
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

On Mon, Jun 18, 2012 at 05:44:02PM +0100, Russell King - ARM Linux wrote:
FIQs should be an entirely separate number space from IRQs, as we
may want to totally decouple them from the IRQ stuff (we probably
should have already done this when genirq came along.)

About the only stuff FIQs use is the enable/disable_irq as a short
cut to dealing with the mask registers.
I do not quite understand what you are asking for, but I'm guessing it
with the patch below.  Please elaborate it a little bit more if that's
not what you are asking for.

Regards,
Shawn

--8<---
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index c32f845..dce12fb 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -39,6 +39,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/seq_file.h>

 #include <asm/cacheflush.h>
@@ -124,12 +125,20 @@ void release_fiq(struct fiq_handler *f)

 void enable_fiq(int fiq)
 {
-       enable_irq(fiq + FIQ_START);
+       struct irq_data *d = irq_get_irq_data(fiq);
+       struct irq_chip *chip = irq_data_get_irq_chip(d);
+
+       if (chip->irq_unmask)
+               chip->irq_unmask(d);
 }

 void disable_fiq(int fiq)
 {
-       disable_irq(fiq + FIQ_START);
+       struct irq_data *d = irq_get_irq_data(fiq);
+       struct irq_chip *chip = irq_data_get_irq_chip(d);
+
+       if (chip->irq_mask)
+               chip->irq_mask(d);
 }

 EXPORT_SYMBOL(set_fiq_handler);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help