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-ppc-devel

[Xen-devel] [PATCH 6 of 8] [powerpc] support additional interrupt contro

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 6 of 8] [powerpc] support additional interrupt controller types in xen/arch/x86/irq.c
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 12 Jul 2006 17:55:40 -0500
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Jul 2006 16:04:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1152744934@xxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1152744166 18000
# Node ID d3533a195a15902ad8b7bd0b9118118fae18e79c
# Parent  9157cbc1793231f2c95a4bdbba4a8e70681b1c6d
[powerpc] support additional interrupt controller types in xen/arch/x86/irq.c
PowerPC #includes xen/arch/x86/irq.c, so we need to support MPIC and XT-PIC
interrupt controllers here.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r 9157cbc17932 -r d3533a195a15 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Wed Jul 12 17:42:46 2006 -0500
+++ b/xen/arch/x86/irq.c        Wed Jul 12 17:42:46 2006 -0500
@@ -397,6 +397,20 @@ int pirq_acktype(int irq)
      */
     if ( !strcmp(desc->handler->typename, "IO-APIC-level") )
         return ioapic_ack_new ? ACKTYPE_EOI : ACKTYPE_UNMASK;
+
+    /* Legacy PIC interrupts can be acknowledged from any CPU. */
+    if ( !strcmp(desc->handler->typename, "XT-PIC") )
+        return ACKTYPE_UNMASK;
+
+    if ( strstr(desc->handler->typename, "MPIC") ) {
+        if (desc->status & IRQ_LEVEL) {
+            if (desc->status & IRQ_PER_CPU)
+                return ACKTYPE_EOI;
+            else
+                return ACKTYPE_UNMASK;
+        }
+        return ACKTYPE_NONE;
+    }
 
     BUG();
     return 0;
diff -r 9157cbc17932 -r d3533a195a15 xen/include/xen/irq.h
--- a/xen/include/xen/irq.h     Wed Jul 12 17:42:46 2006 -0500
+++ b/xen/include/xen/irq.h     Wed Jul 12 17:42:46 2006 -0500
@@ -22,6 +22,7 @@ struct irqaction
 #define IRQ_PENDING    4       /* IRQ pending - replay on enable */
 #define IRQ_REPLAY     8       /* IRQ has been replayed but not acked yet */
 #define IRQ_GUEST       16      /* IRQ is handled by guest OS(es) */
+#define IRQ_LEVEL              64      /* IRQ level triggered */
 #define IRQ_PER_CPU     256     /* IRQ is per CPU */
 
 /*

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