From patchwork Sat Sep 15 15:34:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 1461821 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B81BCDF264 for ; Sat, 15 Sep 2012 15:35:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753485Ab2IOPfB (ORCPT ); Sat, 15 Sep 2012 11:35:01 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:58893 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751781Ab2IOPe5 (ORCPT ); Sat, 15 Sep 2012 11:34:57 -0400 Received: by qcro28 with SMTP id o28so3525744qcr.19 for ; Sat, 15 Sep 2012 08:34:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=5q2Ft2g+h8BVspVw0PH4hShS8ra8gEjFu4BG+hTH51s=; b=fp+sAjzfhoDuTweXJ5efK4RSfklTDiGhXXkl5KjqfSF27Ehrn6tbIFYH0ellYjREWY BgmBitAN427DckYDNzVd37goSCZSzq5wMXlpm1A2Yv83I3eZP4cBRekARShnudYrunsY MwAjHKDhLKbLk3SfTTmvtYmHs1QAq/J1cTLI46kbLFFGjcr7Ay776lXdp2CP7sI7D8hE oJV40xdO8HpsJ/KDkIXI2trNGmVDBIv8FGq5pOs9TclOgacPQWeGzF7YO4t5162Rce+J ZLYiWNUhXVEFPzpXGYTpUi18DFnUG+PBahfG5FT6NNwCwPgtatJRpuHcfqQOSpbrQc+8 kGwQ== Received: by 10.224.181.70 with SMTP id bx6mr15083600qab.79.1347723296963; Sat, 15 Sep 2012 08:34:56 -0700 (PDT) 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 eh7sm6995514qab.13.2012.09.15.08.34.56 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Sep 2012 08:34:56 -0700 (PDT) Subject: [PATCH 04/15] ARM: idmap: only initialize HYP idmap when HYP mode is available To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu From: Christoffer Dall Date: Sat, 15 Sep 2012 11:34:55 -0400 Message-ID: <20120915153455.21241.27798.stgit@ubuntu> In-Reply-To: <20120915153359.21241.86002.stgit@ubuntu> References: <20120915153359.21241.86002.stgit@ubuntu> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlmYjwwqthH8spMEpne+hnsbOTKTyOH1Yp6P/j67HLa1lhk8xmbJIqrj0zloI1722V3Xfvo Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Marc Zyngier Signed-off-by: Marc Zyngier --- arch/arm/mm/idmap.c | 4 ++++ 1 file changed, 4 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index 7a944af..95e8d67 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c @@ -8,6 +8,7 @@ #include #include #include +#include pgd_t *idmap_pgd; @@ -149,6 +150,9 @@ EXPORT_SYMBOL_GPL(hyp_idmap_setup); static int __init hyp_init_static_idmap(void) { + if (!is_hyp_mode_available()) + return 0; + hyp_pgd = kzalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL); if (!hyp_pgd) return -ENOMEM;