From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA5vD-0001jm-Ej for qemu-devel@nongnu.org; Sun, 02 Feb 2014 17:53:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WA5v7-0001Z0-Kv for qemu-devel@nongnu.org; Sun, 02 Feb 2014 17:53:51 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA5v7-0001Yw-EZ for qemu-devel@nongnu.org; Sun, 02 Feb 2014 17:53:45 -0500 Received: by mail-pa0-f47.google.com with SMTP id kp14so6394932pab.20 for ; Sun, 02 Feb 2014 14:53:44 -0800 (PST) Date: Sun, 2 Feb 2014 14:53:49 -0800 From: Christoffer Dall Message-ID: <20140202225349.GB2469@cbox> References: <1390941165-2079-1-git-send-email-christoffer.dall@linaro.org> <1390941165-2079-4-git-send-email-christoffer.dall@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v5 3/8] arm_gic: Fix GIC pending behavior List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Patch Tracking , QEMU Developers , "kvmarm@lists.cs.columbia.edu" On Fri, Jan 31, 2014 at 06:09:20PM +0000, Peter Maydell wrote: > On 28 January 2014 20:32, Christoffer Dall wrote: [...] > > This looks broadly right; a couple of comments below. > [...] > > + > > +static void gic_set_irq_generic(GICState *s, int irq, int level, > > + int cm, int target) > > +{ > > + if (level) { > > + GIC_SET_LEVEL(irq, cm); > > + DPRINTF("Set %d pending mask %x\n", irq, target); > > + if (GIC_TEST_EDGE_TRIGGER(irq)) { > > + GIC_SET_PENDING(irq, target); > > + } > > + } else { > > + if (GIC_TEST_EDGE_TRIGGER(irq)) { > > + GIC_CLEAR_PENDING(irq, target); > > + } > > This doesn't look right. A falling edge for an edge triggered > interrupt should just CLEAR_LEVEL and leave the state of the > pending latch alone. > duh, yeah, thanks for spotting. [...] Thanks, -Christoffer