WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [RFC PATCH 24/35] subarch support for mask value for irq nub

To: linux-kernel@xxxxxxxxxxxxxxx
Subject: [Xen-devel] [RFC PATCH 24/35] subarch support for mask value for irq nubmers
From: Chris Wright <chrisw@xxxxxxxxxxxx>
Date: Tue, 21 Mar 2006 22:31:04 -0800
Cc: virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Wed, 22 Mar 2006 06:46:39 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060322063040.960068000@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <ian.pratt@xxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
---
 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)
 

--

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>