From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50061 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PphLN-0004hi-8j for qemu-devel@nongnu.org; Wed, 16 Feb 2011 08:23:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PphLG-0006oD-MN for qemu-devel@nongnu.org; Wed, 16 Feb 2011 08:22:51 -0500 Received: from mail-fx0-f45.google.com ([209.85.161.45]:63720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PphLG-0006nz-Ex for qemu-devel@nongnu.org; Wed, 16 Feb 2011 08:22:50 -0500 Received: by fxm12 with SMTP id 12so1420024fxm.4 for ; Wed, 16 Feb 2011 05:22:49 -0800 (PST) From: Dmitry Eremin-Solenikov Date: Wed, 16 Feb 2011 16:22:33 +0300 Message-Id: <1297862553-9491-1-git-send-email-dbaryshkov@gmail.com> Subject: [Qemu-devel] [PATCH] mst_fpga: correct irq level settings List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Final corrections for IRQ levels that are set by mst_fpga: * Don't retranslate IRQ if previously IRQ was masked. * After setting or clearing IRQs through register, apply mask before setting parent IRQ level. Signed-off-by: Dmitry Eremin-Solenikov --- hw/mst_fpga.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mst_fpga.c b/hw/mst_fpga.c index afed2ac..407bac9 100644 --- a/hw/mst_fpga.c +++ b/hw/mst_fpga.c @@ -50,7 +50,7 @@ static void mst_fpga_set_irq(void *opaque, int irq, int level) { mst_irq_state *s = (mst_irq_state *)opaque; - uint32_t oldint = s->intsetclr; + uint32_t oldint = s->intsetclr & s->intmskena; if (level) s->prev_level |= 1u << irq; @@ -139,7 +139,7 @@ mst_fpga_writeb(void *opaque, target_phys_addr_t addr, uint32_t value) break; case MST_INTSETCLR: /* clear or set interrupt */ s->intsetclr = (value & 0xFEEFF); - qemu_set_irq(s->parent, s->intsetclr); + qemu_set_irq(s->parent, s->intsetclr & s->intmskena); break; case MST_PCMCIA0: s->pcmcia0 = value; -- 1.7.2.3