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: 1972961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 4DE4B3FD86 for ; Mon, 14 Jan 2013 17:13:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TunXa-0007hf-Jn; Mon, 14 Jan 2013 17:09:43 +0000 Received: from mail-vb0-f45.google.com ([209.85.212.45]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TunWz-0007Sp-GL for linux-arm-kernel@lists.infradead.org; Mon, 14 Jan 2013 17:09:09 +0000 Received: by mail-vb0-f45.google.com with SMTP id p1so3749707vbi.18 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=c3rEjevanP+ber99FkArsY7gH/9GJwTTrbC38mHwuqYurb7JH6nX7eGv2J7pg7GTI9 5hPmSJX0oN29qwh0WzU3FZm476bkvwN+RXKT6zfX/8UVopB4+0RdVo9pT60eKCrNUv8f uFzY0sdmFkAt0+XxAO8YVi94rviRvzRrhnDhmG8OjSkKFG0GoH8OrgUXaab0zTUr3Yp5 IVzS3hAYfeqT8g9EC19vdacl7fi1diblFLGFow1iZEbwP9yooNDGbPcorPPkOgLF5aFT bstnAXmpEwYiBP/y28w8tJyVFCv31JUvqJLOFLlpgYnXaFtImrbSxQ5ASdRuFU6hIl9m wqjA== 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 X-Gm-Message-State: ALoCoQlqJWUeGAOU1A6W39iKWmf6jX/ry6EcvG7CW1SJLq0+y7oyuiL7DrWhX0ZkUKVrg56roSrS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130114_120908_202822_4EC16B2C X-CRM114-Status: GOOD ( 12.51 ) 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.212.45 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kvm@vger.kernel.org, Marc Zyngier , Marcelo Tosatti , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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 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 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;