From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: [PATCH 04/15] ARM: idmap: only initialize HYP idmap when HYP mode is available Date: Sat, 15 Sep 2012 11:34:55 -0400 Message-ID: <20120915153455.21241.27798.stgit@ubuntu> References: <20120915153359.21241.86002.stgit@ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Return-path: 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) In-Reply-To: <20120915153359.21241.86002.stgit@ubuntu> Sender: kvm-owner@vger.kernel.org List-ID: From: Marc Zyngier Signed-off-by: Marc Zyngier --- arch/arm/mm/idmap.c | 4 ++++ 1 file changed, 4 insertions(+) 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; From mboxrd@z Thu Jan 1 00:00:00 1970 From: c.dall@virtualopensystems.com (Christoffer Dall) Date: Sat, 15 Sep 2012 11:34:55 -0400 Subject: [PATCH 04/15] ARM: idmap: only initialize HYP idmap when HYP mode is available In-Reply-To: <20120915153359.21241.86002.stgit@ubuntu> References: <20120915153359.21241.86002.stgit@ubuntu> Message-ID: <20120915153455.21241.27798.stgit@ubuntu> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Marc Zyngier Signed-off-by: Marc Zyngier --- arch/arm/mm/idmap.c | 4 ++++ 1 file changed, 4 insertions(+) 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;