From patchwork Fri Aug 29 14:37:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 36295 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8796B2054D for ; Fri, 29 Aug 2014 14:41:29 +0000 (UTC) Received: by mail-oi0-f70.google.com with SMTP id u20sf13967639oif.5 for ; Fri, 29 Aug 2014 07:41:29 -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=HKEsW5jiH24h8tBFqgXpHYflN2PxUrY/sriyxdAEXjc=; b=TON3D+ALO4cx8DQLJXdnhDB4aWPxtg9SjeT3YINeuHu12PJn8WD9monwg75UovHnF/ 2MvVbUE36Gj49KVwAdDLj96oa6UFyz21Xkbgj9/xNZzjGVIgApqAVNMD47XxudbV4hTv C8Dmle70W1Mv3Si+HhJidu273pjAckubsfLEnWb2OGK1v3m79Q+Mgimyntx+mSs2DlLN JBNobCsJR9RoiPwNeEXY5tPbTR341aGXPA6tjG6F+nbVbOoKmIfJxZpaCtyQQ4Jz5JD2 MrGd4gDMeQ+0yIauaQSEq20HyEcqsXt+RjnRBnuttVzUPI28s2MbTZKBoZhWf9yuas9I odaw== X-Gm-Message-State: ALoCoQl7IlFeXFGBmaMkjqzpijZ9wr5YACwtLx6pQ28W5DrP3xDs9Taqj5fTdY116r3BPPsgo1qL X-Received: by 10.42.118.200 with SMTP id y8mr6865621icq.4.1409323288974; Fri, 29 Aug 2014 07:41:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.119 with SMTP id f110ls592983qga.96.gmail; Fri, 29 Aug 2014 07:41:28 -0700 (PDT) X-Received: by 10.220.59.138 with SMTP id l10mr1278390vch.59.1409323288768; Fri, 29 Aug 2014 07:41:28 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id uy8si229708vcb.72.2014.08.29.07.41.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Aug 2014 07:41:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hq11so2554428vcb.14 for ; Fri, 29 Aug 2014 07:41:28 -0700 (PDT) X-Received: by 10.220.169.72 with SMTP id x8mr8189318vcy.45.1409323288699; Fri, 29 Aug 2014 07:41:28 -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.221.45.67 with SMTP id uj3csp27145vcb; Fri, 29 Aug 2014 07:41:28 -0700 (PDT) X-Received: by 10.140.29.35 with SMTP id a32mr17356699qga.39.1409323287233; Fri, 29 Aug 2014 07:41:27 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 36si384438qgx.35.2014.08.29.07.41.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 29 Aug 2014 07:41:27 -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]:42354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNNMk-00045p-Mf for patch@linaro.org; Fri, 29 Aug 2014 10:41:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNNJ8-00079d-6b for qemu-devel@nongnu.org; Fri, 29 Aug 2014 10:37:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNNIz-00086B-HE for qemu-devel@nongnu.org; Fri, 29 Aug 2014 10:37:42 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNNIz-000805-BP for qemu-devel@nongnu.org; Fri, 29 Aug 2014 10:37:33 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XNNIv-00051Q-8n for qemu-devel@nongnu.org; Fri, 29 Aug 2014 15:37:29 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 29 Aug 2014 15:37:17 +0100 Message-Id: <1409323049-19255-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409323049-19255-1-git-send-email-peter.maydell@linaro.org> References: <1409323049-19255-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 81.2.115.146 Subject: [Qemu-devel] [PULL 05/16] arm_gic: GICD_ICFGR: Write model only for pre v1 GICs 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.220.169 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: Adam Lackorzynski Setting the model is only available in pre-v1 GIC models. Acked-by: Christoffer Dall Signed-off-by: Adam Lackorzynski Message-id: 1408372255-12358-3-git-send-email-adam@os.inf.tu-dresden.de Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index d2b1aaf..e546647 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -561,10 +561,12 @@ static void gic_dist_writeb(void *opaque, hwaddr offset, if (irq < GIC_INTERNAL) value |= 0xaa; for (i = 0; i < 4; i++) { - if (value & (1 << (i * 2))) { - GIC_SET_MODEL(irq + i); - } else { - GIC_CLEAR_MODEL(irq + i); + if (s->revision == REV_11MPCORE || s->revision == REV_NVIC) { + if (value & (1 << (i * 2))) { + GIC_SET_MODEL(irq + i); + } else { + GIC_CLEAR_MODEL(irq + i); + } } if (value & (2 << (i * 2))) { GIC_SET_EDGE_TRIGGER(irq + i);