[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: sparc32 fix spurious dma interrupts
From: |
Artyom Tarasenko |
Subject: |
[Qemu-devel] Re: sparc32 fix spurious dma interrupts |
Date: |
Fri, 12 Feb 2010 19:40:10 +0100 |
2010/2/10 Artyom Tarasenko <address@hidden>:
> Don't raise interrupt when not enabled.
> Don't set DMA_INTR bit spuriously.
> Don't print misleading debug messages "Raise IRQ" when not raising any.
Haven't noticed that these were introduced recently.
Shall we revert 787cfbc432bf1d353a77cbdb613754f3963371a3 and rebase?
>
> Signed-off-by: Artyom Tarasenko <address@hidden>
> ---
> diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c
> index 6e991e0..b2992ca 100644
> --- a/hw/sparc32_dma.c
> +++ b/hw/sparc32_dma.c
> @@ -125,9 +125,11 @@ static void dma_set_irq(void *opaque, int irq, int level)
> {
> DMAState *s = opaque;
> if (level) {
> - DPRINTF("Raise IRQ\n");
> s->dmaregs[0] |= DMA_INTR;
> - qemu_irq_raise(s->irq);
> + if (s->dmaregs[0] & DMA_INTREN) {
> + DPRINTF("Raise IRQ\n");
> + qemu_irq_raise(s->irq);
> + }
> } else {
> s->dmaregs[0] &= ~DMA_INTR;
> DPRINTF("Lower IRQ\n");
> @@ -142,8 +145,6 @@ void espdma_memory_read(void *opaque, uint8_t *buf, int
> len)
> DPRINTF("DMA read, direction: %c, addr 0x%8.8x\n",
> s->dmaregs[0] & DMA_WRITE_MEM ? 'w': 'r', s->dmaregs[1]);
> sparc_iommu_memory_read(s->iommu, s->dmaregs[1], buf, len);
> - DPRINTF("Raise IRQ\n");
> - s->dmaregs[0] |= DMA_INTR;
> s->dmaregs[1] += len;
> }
>
> @@ -154,8 +155,6 @@ void espdma_memory_write(void *opaque, uint8_t *buf, int
> len)
> DPRINTF("DMA write, direction: %c, addr 0x%8.8x\n",
> s->dmaregs[0] & DMA_WRITE_MEM ? 'w': 'r', s->dmaregs[1]);
> sparc_iommu_memory_write(s->iommu, s->dmaregs[1], buf, len);
> - DPRINTF("Raise IRQ\n");
> - s->dmaregs[0] |= DMA_INTR;
> s->dmaregs[1] += len;
> }
>
>
--
Regards,
Artyom Tarasenko
solaris/sparc under qemu blog: http://tyom.blogspot.com/