From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIG81-0002Aa-O9 for qemu-devel@nongnu.org; Fri, 15 Aug 2014 07:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIG7v-0006q6-Of for qemu-devel@nongnu.org; Fri, 15 Aug 2014 07:57:05 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:39140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIG7v-0006pv-He for qemu-devel@nongnu.org; Fri, 15 Aug 2014 07:56:59 -0400 Received: by mail-la0-f50.google.com with SMTP id pi18so2218034lab.37 for ; Fri, 15 Aug 2014 04:56:58 -0700 (PDT) Date: Fri, 15 Aug 2014 13:57:06 +0200 From: Christoffer Dall Message-ID: <20140815115706.GV10550@cbox> References: <1407947471-26981-1-git-send-email-serge.fdrv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1407947471-26981-1-git-send-email-serge.fdrv@gmail.com> Subject: Re: [Qemu-devel] [PATCH] hw/intc/arm_gic: honor target mask in gic_update() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov Cc: Peter Maydell , Marcel Apfelbaum , qemu-devel@nongnu.org, Andreas =?iso-8859-1?Q?F=E4rber?= , Markus Armbruster On Wed, Aug 13, 2014 at 08:31:11PM +0400, Sergey Fedorov wrote: > Take IRQ target mask into account when determining the highest priority > pending interrupt. > > Signed-off-by: Sergey Fedorov > --- > hw/intc/arm_gic.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c > index 1532ef9..a5ad7b9 100644 > --- a/hw/intc/arm_gic.c > +++ b/hw/intc/arm_gic.c > @@ -66,7 +66,8 @@ void gic_update(GICState *s) > best_prio = 0x100; > best_irq = 1023; > for (irq = 0; irq < s->num_irq; irq++) { > - if (GIC_TEST_ENABLED(irq, cm) && gic_test_pending(s, irq, cm)) { > + if (GIC_TEST_ENABLED(irq, cm) && gic_test_pending(s, irq, cm) && > + (irq < GIC_INTERNAL || GIC_TARGET(irq) & cm)) { > if (GIC_GET_PRIORITY(irq, cpu) < best_prio) { > best_prio = GIC_GET_PRIORITY(irq, cpu); > best_irq = irq; > -- > 1.9.1 > Acked-by: Christoffer Dall