From patchwork Wed Aug 27 05:55:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 4786311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E0669F375 for ; Wed, 27 Aug 2014 05:58:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A543B20158 for ; Wed, 27 Aug 2014 05:58:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A98612014A for ; Wed, 27 Aug 2014 05:58:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMWE5-0007BA-GQ; Wed, 27 Aug 2014 05:56:57 +0000 Received: from mail-pa0-f51.google.com ([209.85.220.51]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMWE2-0006uk-KY for linux-arm-kernel@lists.infradead.org; Wed, 27 Aug 2014 05:56:55 +0000 Received: by mail-pa0-f51.google.com with SMTP id ey11so25347024pad.10 for ; Tue, 26 Aug 2014 22:56:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0UjdMvDec1dqk+RxxnxDTpnlcWqD8AoARROQAtiDXRA=; b=PXfLDPZrnhQA/uM2+s3efbJPeYqPjfcX4mcef0+PZbTwA3ROfK+uQjAhIxFf61ueoq iOh7lvdhmA5QQleq4ujymIQLhdRv6iM52mR8OUpd+hw/pOJEfVV4i97zEJENlx+/zjHg dn5PbwaybywY3UI4gKNq3e5DcmHL72HJU8RgTwAQlLsC7CEc0RCBrrzAhOrjZ3ml9RyF hjAxREUk7wgHSim4i2vslCqcsQgG2eoBPDUttpgqQfAs8Nc+RW2Jaw/Z89hoIhRpdlBm iBSpOoJn0vKKKPke6DCVCJGyg46yT9w8sU7h/hpvrU/6UUTk4qRD3q0GfXB4uxP+447J T+oA== X-Gm-Message-State: ALoCoQl9VnGbpLIHnRxkBKFktHubsOPvr/Yoe9u1cjvy70rCDVvJR9mF1UegrTQUi+ivVVT+Bo71 X-Received: by 10.68.125.202 with SMTP id ms10mr43118931pbb.71.1409118992581; Tue, 26 Aug 2014 22:56:32 -0700 (PDT) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id fk5sm5294237pbb.13.2014.08.26.22.56.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Aug 2014 22:56:31 -0700 (PDT) From: Anup Patel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: Fix GIC addresses for APM X-Gene Date: Wed, 27 Aug 2014 11:25:42 +0530 Message-Id: <1409118942-7290-1-git-send-email-anup.patel@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140826_225654_692367_6B5AC235 X-CRM114-Status: GOOD ( 12.52 ) X-Spam-Score: -0.7 (/) Cc: ian.campbell@citrix.com, Anup Patel , marc.zyngier@arm.com, Catalin Marinas , patches@apm.com, will.deacon@arm.com, stefano.stabellini@citrix.com, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, Pranavkumar Sawargaonkar X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The APM X-Gene CPU does not implement security extensions but uses GIC-400 which has security extensions implemented. To take care of this situation APM HW designers provided two sets of GIC addresses for accessing secured and non-secured GIC registers seperately. Currently, the APM X-Gene DTS file points to secured GIC registers and uses GIC Group0 for all irqs. This works fine in most cases but does not work when routing host irqs to guest or VM using the GICH_LRn.HW bit. It happens because if Guest or VM EOIs routed irqs using GICV_EOI register then GIC-400 treats that Guest or VM is trying to EOI a Group0 irq (i.e. secured irq) from non-secured mode hence GIC-400 does not deactivate the routed irq. To take care of the above issue, we initialize secured GIC registers from bootloader such that all host irqs are treated as Group1 irqs (i.e. non-secured irqs) and we only access non-secured GIC registers from Linux, Xen and other hypervisors. The bootloader GIC initialization part is already taken care and is available to all APM Mustang users in latest APM SW release. This patch updates Linux DTS files to use non-secured GIC registers for Linux and Xen. Folks who want to try this patch, please update your APM Mustang u-boot from any APM SW release after 7th July 2014. Signed-off-by: Anup Patel Signed-off-by: Pranavkumar Sawargaonkar --- arch/arm64/boot/dts/apm-storm.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi index c0aceef..2b162f1 100644 --- a/arch/arm64/boot/dts/apm-storm.dtsi +++ b/arch/arm64/boot/dts/apm-storm.dtsi @@ -81,10 +81,10 @@ compatible = "arm,cortex-a15-gic"; #interrupt-cells = <3>; interrupt-controller; - reg = <0x0 0x78010000 0x0 0x1000>, /* GIC Dist */ - <0x0 0x78020000 0x0 0x1000>, /* GIC CPU */ - <0x0 0x78040000 0x0 0x2000>, /* GIC VCPU Control */ - <0x0 0x78060000 0x0 0x2000>; /* GIC VCPU */ + reg = <0x0 0x78090000 0x0 0x1000>, /* GIC Dist */ + <0x0 0x780A0000 0x0 0x1000>, /* GIC CPU */ + <0x0 0x780C0000 0x0 0x2000>, /* GIC VCPU Control */ + <0x0 0x780E0000 0x0 0x2000>; /* GIC VCPU */ interrupts = <1 9 0xf04>; /* GIC Maintenence IRQ */ };