# HG changeset patch
# User Steven Smith <ssmith@xxxxxxxxxxxxx>
# Node ID 159af40a1b37531b3d90b605f55341c1983b6edd
# Parent 79a40acadb41fbe5e5b88b20de5fe53f4dd6b413
[XEN] Add a warning to the i8259 if we generate spurious IRQs. Tidy up
a little while I'm here.
Signed-off-by: Steven Smith <sos22@xxxxxxxxx>
---
xen/arch/x86/hvm/i8259.c | 24 ++++--------------------
xen/include/asm-x86/hvm/vpic.h | 2 --
2 files changed, 4 insertions(+), 22 deletions(-)
diff -r 79a40acadb41 -r 159af40a1b37 xen/arch/x86/hvm/i8259.c
--- a/xen/arch/x86/hvm/i8259.c Tue Oct 31 11:38:55 2006 +0000
+++ b/xen/arch/x86/hvm/i8259.c Tue Oct 31 11:44:28 2006 +0000
@@ -210,7 +210,7 @@ static inline void pic_intack(PicState *
s->irr &= ~(1 << irq);
}
-int pic_read_irq(struct hvm_virpic *s)
+static int pic_read_irq(struct hvm_virpic *s)
{
int irq, irq2, intno;
unsigned long flags;
@@ -225,6 +225,7 @@ int pic_read_irq(struct hvm_virpic *s)
pic_intack(&s->pics[1], irq2);
} else {
/* spurious IRQ on slave controller */
+ gdprintk(XENLOG_WARNING, "Spurious irq on slave i8259.\n");
irq2 = 7;
}
intno = s->pics[1].irq_base + irq2;
@@ -236,10 +237,11 @@ int pic_read_irq(struct hvm_virpic *s)
/* spurious IRQ on host controller */
irq = 7;
intno = s->pics[0].irq_base + irq;
+ gdprintk(XENLOG_WARNING, "Spurious irq on master i8259.\n");
}
pic_update_irq(s);
spin_unlock_irqrestore(&s->lock, flags);
-
+
return intno;
}
@@ -430,24 +432,6 @@ static uint32_t pic_ioport_read(void *op
return ret;
}
-/* memory mapped interrupt status */
-/* XXX: may be the same than pic_read_rq() */
-uint32_t pic_intack_read(struct hvm_virpic *s)
-{
- int ret;
- unsigned long flags;
-
- spin_lock_irqsave(&s->lock, flags);
- ret = pic_poll_read(&s->pics[0], 0x00);
- if (ret == 2)
- ret = pic_poll_read(&s->pics[1], 0x80) + 8;
- /* Prepare for ISR read */
- s->pics[0].read_reg_select = 1;
- spin_unlock_irqrestore(&s->lock, flags);
-
- return ret;
-}
-
static void elcr_ioport_write(void *opaque, uint32_t addr, uint32_t val)
{
PicState *s = opaque;
diff -r 79a40acadb41 -r 159af40a1b37 xen/include/asm-x86/hvm/vpic.h
--- a/xen/include/asm-x86/hvm/vpic.h Tue Oct 31 11:38:55 2006 +0000
+++ b/xen/include/asm-x86/hvm/vpic.h Tue Oct 31 11:44:28 2006 +0000
@@ -70,9 +70,7 @@ void pic_init(struct hvm_virpic *s,
void pic_init(struct hvm_virpic *s,
void (*irq_request)(void *, int),
void *irq_request_opaque);
-int pic_read_irq(struct hvm_virpic *s);
void pic_update_irq(struct hvm_virpic *s); /* Caller must hold s->lock */
-uint32_t pic_intack_read(struct hvm_virpic *s);
void register_pic_io_hook (void);
int cpu_get_pic_interrupt(struct vcpu *v, int *type);
int is_periodic_irq(struct vcpu *v, int irq, int type);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|