From patchwork Sat Feb 22 01:03:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 25131 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18EB4201EE for ; Sat, 22 Feb 2014 01:04:28 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id x3sf7509341qcv.5 for ; Fri, 21 Feb 2014 17:04:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=dUUdViOgNfYzXDfBGbJ5LoAac+qWyHFqdQgPSVb4WGk=; b=Ol8g/Lzrm/1Iel2v/zS7TEC/KEgQGZusYKaq82H00fexFa7IGpAyaCjjKK8PVWZyfW 7Rc4/ocQP2yOiKDPFodhMsxSCB+BWq1NSfHy6xN1SjP+UHmCZPAZKDiAQiPvXqZDsgSV wzKtpSodE+49anJM2+FOCGHMApkhRKaHTYuBweN6Fe39B76eOKUM1ySW52+m+tKnDOe9 UUy8n27GFIGrJBpNeQPSdmPxYD8cfQFQvFxpWQAK6R4y1Led2N/uFvePdkH8v3Jm/3oG jd6NLXZ1u+iLkJtmggN6E8uHsVArePea0VQPkA54gTseywZDH1UKkJrbF+0xD3dQRnTa OnLA== X-Gm-Message-State: ALoCoQkJHRz2hbimb2IAtuX26WQxU9duofbzqudA+qxd5inZLQxbQDZZgk4JIMvuJ6oce47qq4p7 X-Received: by 10.236.65.136 with SMTP id f8mr4581151yhd.11.1393031068806; Fri, 21 Feb 2014 17:04:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.102 with SMTP id a93ls1212204qga.33.gmail; Fri, 21 Feb 2014 17:04:28 -0800 (PST) X-Received: by 10.52.243.164 with SMTP id wz4mr5637629vdc.31.1393031068640; Fri, 21 Feb 2014 17:04:28 -0800 (PST) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id kp12si3728739vcb.91.2014.02.21.17.04.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Feb 2014 17:04:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id jy13so578894veb.37 for ; Fri, 21 Feb 2014 17:04:28 -0800 (PST) X-Received: by 10.220.98.204 with SMTP id r12mr6820911vcn.48.1393031068572; Fri, 21 Feb 2014 17:04:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp76195vcz; Fri, 21 Feb 2014 17:04:28 -0800 (PST) X-Received: by 10.140.49.9 with SMTP id p9mr13415976qga.75.1393031068195; Fri, 21 Feb 2014 17:04:28 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v9si5568320qgd.163.2014.02.21.17.04.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 21 Feb 2014 17:04:28 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:47953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WH111-0006lr-O2 for patch@linaro.org; Fri, 21 Feb 2014 20:04:27 -0500 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) X-Received: by 10.66.164.104 with SMTP id yp8mr12159490pab.25.1393031026991; Fri, 21 Feb 2014 17:03:46 -0800 (PST) Received: from localhost.localdomain (c-67-169-181-221.hsd1.ca.comcast.net. [67.169.181.221]) by mx.google.com with ESMTPSA id kc9sm25523592pbc.25.2014.02.21.17.03.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Feb 2014 17:03:46 -0800 (PST) From: Christoffer Dall To: qemu-devel@nongnu.org Date: Fri, 21 Feb 2014 17:03:50 -0800 Message-Id: <1393031030-8692-1-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.5.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.46 Cc: rob.herring@linaro.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall Subject: [Qemu-devel] [PATCH] hw/intc/arm_gic: Fix GIC_SET_LEVEL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 Reviewed-by: Peter Maydell --- 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