From patchwork Mon Jun 15 17:24:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49895 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2580D211FD for ; Mon, 15 Jun 2015 17:27:43 +0000 (UTC) Received: by wgla2 with SMTP id a2sf26643196wgl.1 for ; Mon, 15 Jun 2015 10:27:42 -0700 (PDT) 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: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=WC1JA/830zqg/koa4msluQVMuuMXvehqaa+q8Q7BE6I=; b=XFR+a9vc8GSh89T4i/lPl73lxZNYokOha0J83xwOHKpQPTH5cL1MfzBFXUzn7XnUFx Hl4pBXkxY88TyYsaHqiZVObD6/aVDB3RA/giFWfhv6eKVfOMwE6aYdoce9sHUGZibP1z vx8FbR39OVzjNSFx9mJlEQ3uHpYAG4POBRnRHiUyvQszDEIPjuDEcFnS+mUylpP3btBS d+OvnosE/uKcoRo1Xz1PaK3vVdQtiDgZndFGBUl1msAcH9Ocw6XnaNU6GAuQsydfYlQs BW3BgvuhMCftT/vqQcd+ia635QIp38ypWJUrPVLsyntxQPpndn/W2aUz5EOgEwjI6pI4 PHew== X-Gm-Message-State: ALoCoQkkQqX/uR9ZBdrLHtXG80PvosFsHOKuDA0hdfkKrKEGCxCc+mVCXg7tLe8Nrqh3zdWqYvmh X-Received: by 10.180.182.49 with SMTP id eb17mr10195955wic.2.1434389262432; Mon, 15 Jun 2015 10:27:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.34 with SMTP id n2ls844763laj.15.gmail; Mon, 15 Jun 2015 10:27:42 -0700 (PDT) X-Received: by 10.152.18.199 with SMTP id y7mr27790732lad.39.1434389262259; Mon, 15 Jun 2015 10:27:42 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id am2si11008951lac.0.2015.06.15.10.27.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 10:27:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labko7 with SMTP id ko7so62612072lab.2 for ; Mon, 15 Jun 2015 10:27:42 -0700 (PDT) X-Received: by 10.152.87.33 with SMTP id u1mr5039701laz.35.1434389261988; Mon, 15 Jun 2015 10:27:41 -0700 (PDT) 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.112.108.230 with SMTP id hn6csp1563591lbb; Mon, 15 Jun 2015 10:27:41 -0700 (PDT) X-Received: by 10.140.28.99 with SMTP id 90mr11146393qgy.99.1434389260469; Mon, 15 Jun 2015 10:27:40 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 11si13424717qhq.44.2015.06.15.10.27.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Jun 2015 10:27:40 -0700 (PDT) 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]:35610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4YAd-0002gD-HZ for patch@linaro.org; Mon, 15 Jun 2015 13:27:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Y8B-0007TM-Ed for qemu-devel@nongnu.org; Mon, 15 Jun 2015 13:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Y89-0001Ko-Gl for qemu-devel@nongnu.org; Mon, 15 Jun 2015 13:25:07 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Y89-0001AA-BF for qemu-devel@nongnu.org; Mon, 15 Jun 2015 13:25:05 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Z4Y82-0003VP-E2 for qemu-devel@nongnu.org; Mon, 15 Jun 2015 18:24:58 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 15 Jun 2015 18:24:33 +0100 Message-Id: <1434389098-13430-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1434389098-13430-1-git-send-email-peter.maydell@linaro.org> References: <1434389098-13430-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 Subject: [Qemu-devel] [PULL 03/28] arm_gic: gic_update should always update all cores 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) 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: Johan Karlsson This patch fixes so that gic_update always updates all the cores with new pending irq states. If the function returns early it is possible to get interrupts that has already been acknowledged. Signed-off-by: Johan Karlsson [PMM: rebased to apply to current master] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index c1d2e70..454bfd7 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -71,7 +71,7 @@ void gic_update(GICState *s) || !(s->cpu_ctlr[cpu] & (GICC_CTLR_EN_GRP0 | GICC_CTLR_EN_GRP1))) { qemu_irq_lower(s->parent_irq[cpu]); qemu_irq_lower(s->parent_fiq[cpu]); - return; + continue; } best_prio = 0x100; best_irq = 1023;