From: Artyom Tarasenko <atar4qemu@googlemail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: sparc32 fix spurious dma interrupts
Date: Fri, 12 Feb 2010 19:40:10 +0100 [thread overview]
Message-ID: <fb8d4f71002121040x4a54f82ap25160ed431a7031e@mail.gmail.com> (raw)
In-Reply-To: <1265841648-27249-1-git-send-email-atar4qemu@google.com>
2010/2/10 Artyom Tarasenko <atar4qemu@googlemail.com>:
> 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 <atar4qemu@gmail.com>
> ---
> 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/
next prev parent reply other threads:[~2010-02-12 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 22:40 [Qemu-devel] sparc32 fix spurious dma interrupts Artyom Tarasenko
2010-02-12 18:40 ` Artyom Tarasenko [this message]
2010-02-12 19:27 ` [Qemu-devel] " Blue Swirl
2010-02-12 22:32 ` Artyom Tarasenko
2010-02-13 7:52 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb8d4f71002121040x4a54f82ap25160ed431a7031e@mail.gmail.com \
--to=atar4qemu@googlemail.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).