From patchwork Fri Nov 4 17:31:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9412973 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 26AEB6022E for ; Fri, 4 Nov 2016 17:31:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 177CB2ADFB for ; Fri, 4 Nov 2016 17:31:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C6B32B138; Fri, 4 Nov 2016 17:31:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84DD52ADFB for ; Fri, 4 Nov 2016 17:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936528AbcKDRbv (ORCPT ); Fri, 4 Nov 2016 13:31:51 -0400 Received: from foss.arm.com ([217.140.101.70]:36638 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935172AbcKDRbt (ORCPT ); Fri, 4 Nov 2016 13:31:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 672CC15B2; Fri, 4 Nov 2016 10:31:48 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 435573F318; Fri, 4 Nov 2016 10:31:47 -0700 (PDT) From: Andre Przywara To: Will Deacon Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vladimir Murzin Subject: [PATCH v8 08/16] arm: gic: allow 32-bit compilation Date: Fri, 4 Nov 2016 17:31:55 +0000 Message-Id: <20161104173203.21168-9-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161104173203.21168-1-andre.przywara@arm.com> References: <20161104173203.21168-1-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ARM GIC code is shared between ARM and arm64, though the header files from the Linux kernel are actually different, reflecting the different level of GIC emulation support between the two architectures. Since it is conceivable that ARM will gain GICv3 (and possibly ITS) emulation support too, lets conditionally define those missing symbols in the source file until an upcoming ARM header update eventually includes those. Signed-off-by: Andre Przywara --- arm/gic.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arm/gic.c b/arm/gic.c index 2c1a547..4d12f31 100644 --- a/arm/gic.c +++ b/arm/gic.c @@ -18,6 +18,14 @@ #define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 #endif +#ifndef KVM_VGIC_ITS_ADDR_TYPE +#define KVM_VGIC_ITS_ADDR_TYPE 4 +#endif + +#ifndef KVM_VGIC_V3_ITS_SIZE +#define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K) +#endif + static int gic_fd = -1; static u64 gic_redists_base; static u64 gic_redists_size;