From patchwork Tue Jan 8 18:41:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 1947581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 1C463DF23A for ; Tue, 8 Jan 2013 18:53:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TseER-0001z7-KC; Tue, 08 Jan 2013 18:49:04 +0000 Received: from mail-vc0-f174.google.com ([209.85.220.174]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tse7O-0006LD-N2 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jan 2013 18:41:48 +0000 Received: by mail-vc0-f174.google.com with SMTP id d16so727661vcd.5 for ; Tue, 08 Jan 2013 10:41:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=GyBMcTvEmW/CoXicbcYuE8NkqC5XKK1+/AYQrwJj2Kw=; b=eAzxB9DuAWpNCy+TEtzKOhRXxYGFzmbizXDv60it0FxraC+hMKymxzgleYv2+Dncv6 Jt9fA1T85pyqtrC8L8VfpIQWs4dEkLu8LNLg1HYl5wiVGOkIw+izy9AVC8Lfx93dAAi8 aACQGKLujFNQzH9d0E21Iet1+tIFhxJLuzmyVGCJjghA7bepW7MiBVzVEe2o1DUgWzt8 BK5wOry0FcYaEm0Khrho/OZ3TBlVaJbMJT1RNdg2y4Nkiu8Hwcs+0QxRMcK/iTrYLClG Wq4Fo18VYBWL+u11g8n86wflWbi9lB90T3gUZGNdc5YhsHjWWg8eMhRJx2D3WjL5M+mR FfqA== X-Received: by 10.52.90.18 with SMTP id bs18mr75029066vdb.89.1357670505887; Tue, 08 Jan 2013 10:41:45 -0800 (PST) Received: from [127.0.1.1] (pool-72-80-83-148.nycmny.fios.verizon.net. [72.80.83.148]) by mx.google.com with ESMTPS id sk8sm54257038vdb.13.2013.01.08.10.41.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Jan 2013 10:41:45 -0800 (PST) Subject: [PATCH v5 03/12] ARM: gic: define GICH offsets for VGIC support To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu From: Christoffer Dall Date: Tue, 08 Jan 2013 13:41:44 -0500 Message-ID: <20130108184144.46558.11556.stgit@ubuntu> In-Reply-To: <20130108184116.46558.3558.stgit@ubuntu> References: <20130108184116.46558.3558.stgit@ubuntu> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQm3QIWE+YBqdvYDTv/blkdzmNlea+u+ziP2kCHSSC3ikw3+eOB3Xvzh9RCos2FBKr5DkrMI X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130108_134148_349339_68143A0C X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.174 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Marc Zyngier X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Marc Zyngier The GICH_* constants are defined by the GIC HW spec, and even though they only be used by KVM to begin with, define them generically in gic.h. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/include/asm/hardware/gic.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h index 4b1ce6c..dd1add1 100644 --- a/arch/arm/include/asm/hardware/gic.h +++ b/arch/arm/include/asm/hardware/gic.h @@ -32,6 +32,31 @@ #define GIC_DIST_CONFIG 0xc00 #define GIC_DIST_SOFTINT 0xf00 +#define GICH_HCR 0x0 +#define GICH_VTR 0x4 +#define GICH_VMCR 0x8 +#define GICH_MISR 0x10 +#define GICH_EISR0 0x20 +#define GICH_EISR1 0x24 +#define GICH_ELRSR0 0x30 +#define GICH_ELRSR1 0x34 +#define GICH_APR 0xf0 +#define GICH_LR0 0x100 + +#define GICH_HCR_EN (1 << 0) +#define GICH_HCR_UIE (1 << 1) + +#define GICH_LR_VIRTUALID (0x3ff << 0) +#define GICH_LR_PHYSID_CPUID_SHIFT (10) +#define GICH_LR_PHYSID_CPUID (7 << GICH_LR_PHYSID_CPUID_SHIFT) +#define GICH_LR_STATE (3 << 28) +#define GICH_LR_PENDING_BIT (1 << 28) +#define GICH_LR_ACTIVE_BIT (1 << 29) +#define GICH_LR_EOI (1 << 19) + +#define GICH_MISR_EOI (1 << 0) +#define GICH_MISR_U (1 << 1) + #ifndef __ASSEMBLY__ #include struct device_node;