From patchwork Wed Feb 26 18:01:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25390 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C145320636 for ; Wed, 26 Feb 2014 18:20:42 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id i4sf4443050oah.3 for ; Wed, 26 Feb 2014 10:20:42 -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:in-reply-to:references: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=5Wz4j428RuKOEHYFCBmj6G6vgfDJIg64cJiIZV5Ebq0=; b=RL986O1Bu3VRJdOCemhAxRXH89bWyucgelbbssuZpYFb9z8CKBA4FHyr3Dqpi1wZnQ vNZVoyyrvlmGcK6P4DJ8Ua438NFtrzXR8RMLWtHJ0NZQrs1tZHMV8RBprK61UZfLm2CU gYD/NZUdo15yWtaRh6a5BMoGNG39R2Zy+fsw2A8b3aIAwh7hatHnsDlJPfgZ7gDXWAuX dhUQrH3I/CZ6tA1moDain34GvdgYBkChfxBITkDY/POPsVF4IgR5MuMithUVPLATGfZm HrIliFWH+gd/ppT0YKWhhz5wJnyCaG3rlsgkEA8LqCzCM9GC1xVEjUYKk41ch0kVCkI1 JIqQ== X-Gm-Message-State: ALoCoQm2vBN4NAuGUCDsCvB0uBC0+CsDuR11gv+nN++PmKvMiKZbChgQZTJXr6KoxMYeXYAyw3dS X-Received: by 10.50.127.148 with SMTP id ng20mr15324264igb.4.1393438842232; Wed, 26 Feb 2014 10:20:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.117 with SMTP id z108ls324705qge.51.gmail; Wed, 26 Feb 2014 10:20:42 -0800 (PST) X-Received: by 10.221.66.132 with SMTP id xq4mr37720vcb.57.1393438842052; Wed, 26 Feb 2014 10:20:42 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id dr8si446852vcb.13.2014.02.26.10.20.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:20:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 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.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so2593638veb.31 for ; Wed, 26 Feb 2014 10:20:42 -0800 (PST) X-Received: by 10.58.12.169 with SMTP id z9mr43450veb.61.1393438841968; Wed, 26 Feb 2014 10:20:41 -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 u4csp45535vcz; Wed, 26 Feb 2014 10:20:41 -0800 (PST) X-Received: by 10.224.157.7 with SMTP id z7mr9950535qaw.37.1393438841310; Wed, 26 Feb 2014 10:20:41 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s22si456077qge.166.2014.02.26.10.20.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:20:41 -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]:42354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIj60-0005hp-HT for patch@linaro.org; Wed, 26 Feb 2014 13:20:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIioq-0000zw-OD for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIiop-0007Qm-F7 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:56 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIiop-0007Eu-9C for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:55 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WIioV-00069O-Mu; Wed, 26 Feb 2014 18:02:35 +0000 From: Peter Maydell To: Anthony Liguori Date: Wed, 26 Feb 2014 18:01:58 +0000 Message-Id: <1393437755-23586-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> References: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 08/45] 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: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 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 From: 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. Cc: qemu-stable@nongnu.org Reported-by: Rob Herring Signed-off-by: Christoffer Dall Message-id: 1393031030-8692-1-git-send-email-christoffer.dall@linaro.org Signed-off-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