Skip to contentSkip to conversation

#include <asm/irq.h> in interrupt.h

RFC PATCH In review Adrian Bunk 3 participants 5 messages Aug 24, 2005

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 #include <asm/irq.h> in interrupt.h

If #includ'ing interrupt.h should be enough for getting the prototype of e.g. enable_irq() on all architectures, we need this patch.

include/linux/interrupt.h renamed from include/linux/interrupt.h.old +1 -0
@@ -12,6 +12,7 @@
 #include <asm/atomic.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
+#include <asm/irq.h>
 
 /*
  * For 2.4.x compatibility, 2.4.x can use
#1 lore raw
Quoted 2 lines · Adrian Bunk

If #includ'ing interrupt.h should be enough for getting the prototype of e.g. enable_irq() on all architectures, we need this patch.

Per defintion you need to include <asm/irq.h> right now. I'd like to change that to <linux/interrupt.h>, but not my including <asm/irq.h> there. We should just make the prototypes in <linux/interrupt.h> unconditional and get rid of the macro/inline tricks some architectures do, these calls aren't exactly fastpathes where that matters.

#2 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 2 lines · Adrian Bunk

If #includ'ing interrupt.h should be enough for getting the prototype of e.g. enable_irq() on all architectures, we need this patch.

Per defintion you need to include <asm/irq.h> right now. I'd like to change that to <linux/interrupt.h>, but not my including <asm/irq.h> there. We should just make the prototypes in <linux/interrupt.h> unconditional and get rid of the macro/inline tricks some architectures do, these calls aren't exactly fastpathes where that matters.

Looking at 2.6.13-rc6-mm2, the only architectures with own enable_irq() implementations are m68knommu and sparc.

On m68knommu, enable_irq() does nothing unless a hook is used that has no in-kernel users.

The 32bit sparc arch seems to be the only arch doing funky things.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
Quoted 2 lines · Adrian Bunk

Looking at 2.6.13-rc6-mm2, the only architectures with own enable_irq() implementations are m68knommu and sparc.

You missed ARM.

tglx

#4 lore raw
Quoted 6 lines · Thomas Gleixner
Quoted 2 lines · Adrian Bunk

Looking at 2.6.13-rc6-mm2, the only architectures with own enable_irq() implementations are m68knommu and sparc.

You missed ARM.

Yes and no.

Yes, because you are right that I missed architectures.

No, because I was only looking at what would be required to unconditionally offer the enable_irq() prototyp in interrupt.h .

Quoted 1 line

tglx

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed