Received: from eggs.gnu.org ([2001:4830:134:3::10]:39404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WH10U-0006Tb-ES for qemu-devel@nongnu.org; Fri, 21 Feb 2014 20:04:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WH10O-0000NK-KA for qemu-devel@nongnu.org; Fri, 21 Feb 2014 20:03:54 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:64872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WH10O-0000N9-E3 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 20:03:48 -0500 Received: by mail-pa0-f46.google.com with SMTP id rd3so4205124pab.33 for ; Fri, 21 Feb 2014 17:03:47 -0800 (PST) From: Christoffer Dall Date: Fri, 21 Feb 2014 17:03:50 -0800 Message-Id: <1393031030-8692-1-git-send-email-christoffer.dall@linaro.org> Subject: [Qemu-devel] [PATCH] hw/intc/arm_gic: Fix GIC_SET_LEVEL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: rob.herring@linaro.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall The GIC_SET_LEVEL macro unfortunately overwrote the entire level bitmask instead of just or'ing on the necessary bits, causing active level PPIs on a core to clear PPIs on other cores. I introduced this bug, sorry about that. Reported-by: Rob Herring Signed-off-by: Christoffer Dall --- hw/intc/gic_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/gic_internal.h b/hw/intc/gic_internal.h index 92a6f7a..48a58d7 100644 --- a/hw/intc/gic_internal.h +++ b/hw/intc/gic_internal.h @@ -40,7 +40,7 @@ #define GIC_SET_MODEL(irq) s->irq_state[irq].model = true #define GIC_CLEAR_MODEL(irq) s->irq_state[irq].model = false #define GIC_TEST_MODEL(irq) s->irq_state[irq].model -#define GIC_SET_LEVEL(irq, cm) s->irq_state[irq].level = (cm) +#define GIC_SET_LEVEL(irq, cm) s->irq_state[irq].level |= (cm) #define GIC_CLEAR_LEVEL(irq, cm) s->irq_state[irq].level &= ~(cm) #define GIC_TEST_LEVEL(irq, cm) ((s->irq_state[irq].level & (cm)) != 0) #define GIC_SET_EDGE_TRIGGER(irq) s->irq_state[irq].edge_trigger = true -- 1.8.5.2