From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYITK-0006Y3-VY for qemu-devel@nongnu.org; Tue, 23 Feb 2016 14:18:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYITK-0005a1-2k for qemu-devel@nongnu.org; Tue, 23 Feb 2016 14:18:10 -0500 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:35586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYITJ-0005ZS-TB for qemu-devel@nongnu.org; Tue, 23 Feb 2016 14:18:09 -0500 Received: by mail-vk0-x22a.google.com with SMTP id e6so170932992vkh.2 for ; Tue, 23 Feb 2016 11:18:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1456253425-13541-1-git-send-email-peter.maydell@linaro.org> References: <1456253425-13541-1-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Tue, 23 Feb 2016 19:17:48 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] hw/intc/arm_gic.c: Implement GICv2 GICC_DIR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: Shlomo Pongratz , qemu-arm , Patch Tracking On 23 February 2016 at 18:50, Peter Maydell wrote: > The GICv2 introduces a new CPU interface register GICC_DIR, which > allows an OS to split the "priority drop" and "deactivate interrupt" > parts of interrupt completion. Implement this register. > (Note that the register is at offset 0x1000 in the CPU interface, > which means it is on a different 4K page from all the other registers.) > > Signed-off-by: Peter Maydell > +static void gic_deactivate_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs) > +{ > + int cm = 1 << cpu; > + int group = gic_has_groups(s) && GIC_TEST_GROUP(irq, cm); > + > + if (!gic_eoi_split(s, cpu, attrs)) { > + /* This is UNPREDICTABLE; we choose to ignore it */ > + qemu_log_mask(LOG_GUEST_ERROR, > + "gic_deactivate_irq: GICC_DIR write when EOIMode clear"); > + return; > + } > + > + if (s->security_extn && !attrs.secure && !group) { > + DPRINTF("Non-secure DI for Group0 interrupt %d ignored\n", irq); > + return; > + } > + > + GIC_CLEAR_ACTIVE(irq, cm); > + gic_update(s); Whoops, this gic_update() call should be deleted, because the caller will do a gic_update anyway. (The extra call is harmless but unnecessary.) thanks -- PMM