[RFC PATCH 24/35] subarch support for mask value for irq nubmers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Abstract the mask value for irq numbers into subarch-specific headers.
Xen extends the IRQ numbering space to include room for dynamically
allocated virtual interrupts (in the range 256-511), which requires a
more permissive mask value.

Signed-off-by: Ian Pratt <[email protected]>
Signed-off-by: Christian Limpach <[email protected]>
Signed-off-by: Chris Wright <[email protected]>
---
 arch/i386/kernel/irq.c                      |    2 +-
 include/asm-i386/mach-default/irq_vectors.h |    2 ++
 include/asm-i386/mach-visws/irq_vectors.h   |    2 ++
 include/asm-i386/mach-voyager/irq_vectors.h |    2 ++
 include/asm-i386/mach-xen/irq_vectors.h     |    8 ++++++--
 5 files changed, 13 insertions(+), 3 deletions(-)

--- xen-subarch-2.6.orig/arch/i386/kernel/irq.c
+++ xen-subarch-2.6/arch/i386/kernel/irq.c
@@ -54,7 +54,7 @@ static union irq_ctx *softirq_ctx[NR_CPU
 fastcall unsigned int do_IRQ(struct pt_regs *regs)
 {	
 	/* high bits used in ret_from_ code */
-	int irq = regs->orig_eax & 0xff;
+	int irq = regs->orig_eax & DO_IRQ_MASK;
 #ifdef CONFIG_4KSTACKS
 	union irq_ctx *curctx, *irqctx;
 	u32 *isp;
--- xen-subarch-2.6.orig/include/asm-i386/mach-default/irq_vectors.h
+++ xen-subarch-2.6/include/asm-i386/mach-default/irq_vectors.h
@@ -86,6 +86,8 @@
 
 #include "irq_vectors_limits.h"
 
+#define DO_IRQ_MASK		255
+
 #define FPU_IRQ			13
 
 #define	FIRST_VM86_IRQ		3
--- xen-subarch-2.6.orig/include/asm-i386/mach-visws/irq_vectors.h
+++ xen-subarch-2.6/include/asm-i386/mach-visws/irq_vectors.h
@@ -53,6 +53,8 @@
 #define NR_IRQS 224
 #define NR_IRQ_VECTORS NR_IRQS
 
+#define DO_IRQ_MASK		255
+
 #define FPU_IRQ			13
 
 #define	FIRST_VM86_IRQ		3
--- xen-subarch-2.6.orig/include/asm-i386/mach-voyager/irq_vectors.h
+++ xen-subarch-2.6/include/asm-i386/mach-voyager/irq_vectors.h
@@ -59,6 +59,8 @@
 #define NR_IRQS 224
 #define NR_IRQ_VECTORS NR_IRQS
 
+#define DO_IRQ_MASK 			255
+
 #define FPU_IRQ				13
 
 #define	FIRST_VM86_IRQ		3
--- xen-subarch-2.6.orig/include/asm-i386/mach-xen/irq_vectors.h
+++ xen-subarch-2.6/include/asm-i386/mach-xen/irq_vectors.h
@@ -109,14 +109,18 @@
  */
 
 #define PIRQ_BASE		0
-#define NR_PIRQS		256
+#define PIRQ_BITS		8
+#define NR_PIRQS		(1 << PIRQ_BITS)
 
 #define DYNIRQ_BASE		(PIRQ_BASE + NR_PIRQS)
-#define NR_DYNIRQS		256
+#define DYNIRQ_BITS		8
+#define NR_DYNIRQS		(1 << DYNIRQ_BITS)
 
 #define NR_IRQS			(NR_PIRQS + NR_DYNIRQS)
 #define NR_IRQ_VECTORS		NR_IRQS
 
+#define DO_IRQ_MASK		__IRQ_MASK(PIRQ_BITS + DYNIRQ_BITS)
+
 #define pirq_to_irq(_x)		((_x) + PIRQ_BASE)
 #define irq_to_pirq(_x)		((_x) - PIRQ_BASE)
 

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux