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: 36074 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A34FA2054F for ; Wed, 27 Aug 2014 05:57:59 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lf10sf135688769pab.9 for ; Tue, 26 Aug 2014 22:57:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=+1U0TJS//8oNTtteOlRDaWUYRUWnb+1hzbSuzazw/7Y=; b=lffVINQOSz6O3vjL1E01wVOKELhiie+KicAMHPUqzQSVFWu6L8HClG9bdnlWfOYtl/ KvcRjhZC2hLAI6y1fvPvRQYZmkcmIjAtttDJ/jZbOgZWfDySBRiNYVAy2F0wiXIQxw7/ Q9EXWn4mTZqgECteXTW0d8qoknbLwIRWmx0CiUmLgn4Q4eeYelA4fRkMz0ug4bmhR/iF qTjaP3de5x42+mRVY55jY6RPvfJH24RdwI8j0eN2KV4ZYjr9W2ADSvVRInumM9yAno9f LazkvMNPWoaiApL9O+TmN4Z/FhFqq5TMe27JTATAzKiMWl4bJSFkOpic/Hg9VV77uQDP kq8Q== X-Gm-Message-State: ALoCoQn18pUhD0BMNzYL9maGEPlYomnYonYsNYoekBwFnG6RWlwIKgFDqoqLiZg6k1J59re/rL5v X-Received: by 10.66.216.233 with SMTP id ot9mr21208612pac.38.1409119078914; Tue, 26 Aug 2014 22:57:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.74 with SMTP id x68ls164472qge.28.gmail; Tue, 26 Aug 2014 22:57:58 -0700 (PDT) X-Received: by 10.236.27.105 with SMTP id d69mr50913780yha.72.1409119078795; Tue, 26 Aug 2014 22:57:58 -0700 (PDT) Received: from mail-yh0-f52.google.com (mail-yh0-f52.google.com [209.85.213.52]) by mx.google.com with ESMTPS id k29si4429976yha.8.2014.08.26.22.57.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Aug 2014 22:57:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.213.52 as permitted sender) client-ip=209.85.213.52; Received: by mail-yh0-f52.google.com with SMTP id t59so12915355yho.25 for ; Tue, 26 Aug 2014 22:57:58 -0700 (PDT) X-Received: by 10.52.138.210 with SMTP id qs18mr2257515vdb.18.1409119078708; Tue, 26 Aug 2014 22:57:58 -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 uj3csp33745vcb; Tue, 26 Aug 2014 22:57:58 -0700 (PDT) X-Received: by 10.70.95.34 with SMTP id dh2mr9036649pdb.119.1409119077874; Tue, 26 Aug 2014 22:57:57 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id bi17si7146853pdb.236.2014.08.26.22.57.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2014 22:57:57 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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-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 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.51 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.220.51 listed in wl.mailspike.net] 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anup.patel@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.213.52 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 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 */ };