From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ng0RO-0001C9-0J for qemu-devel@nongnu.org; Fri, 12 Feb 2010 13:40:34 -0500 Received: from [199.232.76.173] (port=52554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ng0RN-0001Bt-Lh for qemu-devel@nongnu.org; Fri, 12 Feb 2010 13:40:33 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ng0RM-0002h8-GN for qemu-devel@nongnu.org; Fri, 12 Feb 2010 13:40:33 -0500 Received: from mail-pz0-f187.google.com ([209.85.222.187]:49219) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ng0RM-0002gt-3R for qemu-devel@nongnu.org; Fri, 12 Feb 2010 13:40:32 -0500 Received: by pzk17 with SMTP id 17so1588043pzk.4 for ; Fri, 12 Feb 2010 10:40:30 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1265841648-27249-1-git-send-email-atar4qemu@google.com> References: <1265841648-27249-1-git-send-email-atar4qemu@google.com> From: Artyom Tarasenko Date: Fri, 12 Feb 2010 19:40:10 +0100 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: sparc32 fix spurious dma interrupts List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org 2010/2/10 Artyom Tarasenko : > 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 > --- > 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 l= evel) > =A0{ > =A0 =A0 DMAState *s =3D opaque; > =A0 =A0 if (level) { > - =A0 =A0 =A0 =A0DPRINTF("Raise IRQ\n"); > =A0 =A0 =A0 =A0 s->dmaregs[0] |=3D DMA_INTR; > - =A0 =A0 =A0 =A0qemu_irq_raise(s->irq); > + =A0 =A0 =A0 =A0if (s->dmaregs[0] & DMA_INTREN) { > + =A0 =A0 =A0 =A0 =A0 =A0DPRINTF("Raise IRQ\n"); > + =A0 =A0 =A0 =A0 =A0 =A0qemu_irq_raise(s->irq); > + =A0 =A0 =A0 =A0} > =A0 =A0 } else { > =A0 =A0 =A0 =A0 s->dmaregs[0] &=3D ~DMA_INTR; > =A0 =A0 =A0 =A0 DPRINTF("Lower IRQ\n"); > @@ -142,8 +145,6 @@ void espdma_memory_read(void *opaque, uint8_t *buf, i= nt len) > =A0 =A0 DPRINTF("DMA read, direction: %c, addr 0x%8.8x\n", > =A0 =A0 =A0 =A0 =A0 =A0 s->dmaregs[0] & DMA_WRITE_MEM ? 'w': 'r', s->dmar= egs[1]); > =A0 =A0 sparc_iommu_memory_read(s->iommu, s->dmaregs[1], buf, len); > - =A0 =A0DPRINTF("Raise IRQ\n"); > - =A0 =A0s->dmaregs[0] |=3D DMA_INTR; > =A0 =A0 s->dmaregs[1] +=3D len; > =A0} > > @@ -154,8 +155,6 @@ void espdma_memory_write(void *opaque, uint8_t *buf, = int len) > =A0 =A0 DPRINTF("DMA write, direction: %c, addr 0x%8.8x\n", > =A0 =A0 =A0 =A0 =A0 =A0 s->dmaregs[0] & DMA_WRITE_MEM ? 'w': 'r', s->dmar= egs[1]); > =A0 =A0 sparc_iommu_memory_write(s->iommu, s->dmaregs[1], buf, len); > - =A0 =A0DPRINTF("Raise IRQ\n"); > - =A0 =A0s->dmaregs[0] |=3D DMA_INTR; > =A0 =A0 s->dmaregs[1] +=3D len; > =A0} > > --=20 Regards, Artyom Tarasenko solaris/sparc under qemu blog: http://tyom.blogspot.com/