|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 6 of 8] [powerpc] support additional interrupt contro
# 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
|
|
|
|
|