From patchwork Mon Jan 14 17:09:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 1972901 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 78058DF2E1 for ; Mon, 14 Jan 2013 17:09:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757663Ab3ANRJE (ORCPT ); Mon, 14 Jan 2013 12:09:04 -0500 Received: from mail-vc0-f177.google.com ([209.85.220.177]:40943 "EHLO mail-vc0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757631Ab3ANRJE (ORCPT ); Mon, 14 Jan 2013 12:09:04 -0500 Received: by mail-vc0-f177.google.com with SMTP id m8so3721758vcd.8 for ; Mon, 14 Jan 2013 09:09:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=3OS4KFDL21PqjWWufYHoJvg0IiKduSt5BMwnjERFEUs=; b=VUfFF8314RYddEvDuqlY0oci/GKvGhRHyR0eDWnFYGyi37B0i09h8p4w4mnrj0Obup 26pa9+oW1wn102URr0FjBDo1AQm2RWaFs+HJErpCLUwHQnlicPRnwMt/RpiNrRATZglX jPfRv3uy4/a2MnSGrcAs9im8HwywNohfIYmSpyKLGUMYtll/7+Qm5lH0eHkp5FDsUYYs dZGNBqTOVx9nLSVX9i7Q938HIAb+luNS16ahQrU6/GW8vnygDKvJqh5be/K0aRua3R1k 5J6typPRuiRSnGlwQEpsAyi9TE3Jnwx6qomlu5EZFtU2R2jHuYqs4hgxmMG+Ffc+lxnm GZcw== MIME-Version: 1.0 Received: by 10.58.2.226 with SMTP id 2mr103970688vex.53.1358183343061; Mon, 14 Jan 2013 09:09:03 -0800 (PST) Received: by 10.221.7.71 with HTTP; Mon, 14 Jan 2013 09:09:02 -0800 (PST) X-Originating-IP: [72.80.83.148] In-Reply-To: <20130114161337.GE23505@n2100.arm.linux.org.uk> References: <20130108183811.46302.58543.stgit@ubuntu> <20130108183848.46302.77369.stgit@ubuntu> <20130114161337.GE23505@n2100.arm.linux.org.uk> Date: Mon, 14 Jan 2013 12:09:02 -0500 Message-ID: Subject: Re: [PATCH v5 02/14] ARM: Section based HYP idmap From: Christoffer Dall To: Russell King - ARM Linux Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Marc Zyngier , Marcelo Tosatti , Will Deacon X-Gm-Message-State: ALoCoQkKxbLc5MB+5S28utGDN90Tmy//bgkvRF8c57JyeYIfOviTICG8W9j8g8Pjv8bXPNU3yFWm Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Jan 14, 2013 at 11:13 AM, Russell King - ARM Linux wrote: > On Tue, Jan 08, 2013 at 01:38:48PM -0500, Christoffer Dall wrote: >> + pr_info("Setting up static %sidentity map for 0x%llx - 0x%llx\n", >> + prot ? "HYP " : "", >> + (long long)addr, (long long)end); > > There's no point using 0x%llx and casting to 64-bit longs if the arguments > are always going to be 32-bit. true, that's silly. This should improve the code, suggested by Will: commit 1baa03f3d70f082e4522fd32db09e4f5542ff48d Author: Christoffer Dall Date: Mon Jan 14 12:06:26 2013 -0500 ARM: idmap: cleanup pr_info It's cleaner to simply print the info messages in the callers and there's no reason to convert 32-bit values to 64-bit values. Signed-off-by: Christoffer Dall if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) @@ -97,6 +94,8 @@ static int __init init_static_idmap_hyp(void) if (!hyp_pgd) return -ENOMEM; + pr_info("Setting up static HYP identity map for 0x%p - 0x%p\n", + __hyp_idmap_text_start, __hyp_idmap_text_end); identity_mapping_add(hyp_pgd, __hyp_idmap_text_start, __hyp_idmap_text_end, PMD_SECT_AP1); @@ -119,6 +118,8 @@ static int __init init_static_idmap(void) if (!idmap_pgd) return -ENOMEM; + pr_info("Setting up static identity map for 0x%p - 0x%p\n", + __idmap_text_start, __idmap_text_end); identity_mapping_add(idmap_pgd, __idmap_text_start, __idmap_text_end, 0); --- -Christoffer -- 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 d9213a5..b9ae344 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c @@ -71,9 +71,6 @@ static void identity_mapping_add(pgd_t *pgd, const char *text_start, addr = virt_to_phys(text_start); end = virt_to_phys(text_end); - pr_info("Setting up static %sidentity map for 0x%llx - 0x%llx\n", - prot ? "HYP " : "", - (long long)addr, (long long)end); prot |= PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF;