Received: by 10.223.148.5 with SMTP id 5csp7978751wrq; Thu, 18 Jan 2018 12:03:07 -0800 (PST) X-Google-Smtp-Source: ACJfBotox2C4rclT+gnwLdiNghbq8HYnA+2KDy6Z8OAjMhVNFuvULv3H+xhldSiNnLfcsDyl4b7I X-Received: by 10.98.147.7 with SMTP id b7mr43260753pfe.236.1516305787230; Thu, 18 Jan 2018 12:03:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516305787; cv=none; d=google.com; s=arc-20160816; b=jLuzOIi5hFtgP9+VsRo9hMImvJgIDTYYTAJSpBvNW+W6N3lz69rH10t6vADlAWiEoA izO2JFVpRK02ezvAwBoxWqSUqUWzqUP18kBOkAoCBNmypubF7F/UTFxBc9cvLzGnkETm LH98cOf186H1fM/2KuvQ/vAR1teDc1QNw/ON1XSFEZ6re44SHO9/jL3JJB1MJEC55zN0 /5cyOL2cpwe7h6nHVhwEflNnz+gCZ6m3AFjRamNEjfKk9Pipd0JHPUt/lPaUXuFoFqSB /uRN3xym1GDr/QB7SWDsD+D3VR6zsNv1M6ANNtlNXKbmONnq9TH2JLVofb0ehkIkDtIs cRrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=2HzWWCQTO7Y37q/F5XcDzF5cssO1wvkwDcXYhVEFVwE=; b=rKItPuerfr2HOrl2Uqwj8luko+WHq+bEH8mNOEnTAtUR0LAtEP7Z8pKmmLzucde4un 1Mb/2vRTNXKJ5NFYn94AoS7zAZwgQfzWTtWwHDSukBUckI2hNg8txk2u9d3ktb6vd12r POUOCLoYkoVGL/C3QjwD/+yo6Ozsnubhlc4z+ykxK3SmW5v5SIX/TpN1HTjvML3z150O L+DTMG4q64JhQ+jOs7akkBx01uHvmWcCRqSnxWolV8oeCyUHczSdbX1vYd3ngbLe6fa2 Iz9hJ9EceeatQQ/B98nMJ2I/hgdbb6MmqP6E/hANB+HX3+5KsSEd3qvHhiwFs9dgV/s2 My0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AQ6td6tE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u79si7853583pfa.354.2018.01.18.12.02.50; Thu, 18 Jan 2018 12:03:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AQ6td6tE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932562AbeARUBi (ORCPT + 99 others); Thu, 18 Jan 2018 15:01:38 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:40649 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932341AbeARUBg (ORCPT ); Thu, 18 Jan 2018 15:01:36 -0500 Received: by mail-qt0-f194.google.com with SMTP id s39so16191071qth.7 for ; Thu, 18 Jan 2018 12:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2HzWWCQTO7Y37q/F5XcDzF5cssO1wvkwDcXYhVEFVwE=; b=AQ6td6tEmWzEnqEEwaUrlEkVYKbGqcI4ZtRi4q4qNXBSVrWE2Oj2zbAPiNOqZqHIHp Lc+BRvQPb/xCKGoXrH4qhBmIkzIwoe+CtYUjpmy/T/zct7Azv7wBqInfTOPqzRDJ5tKZ 66WUBZ618KCR38uPPGIt31M1grVv/5U/vZYg38cSg+ZcWWnF9qC0gNauvTAb+XmWgxge Advcy3efwbpuvy89BQg4c4TJb/kg4dvJ+Oua2W3KZXNkbHmedVT4A01fONCMLQqulnke zXQPaLCzLt8DXzFKUJsJy2m/nBCdvUbtl5SO28Zv0Li+rrPGzKzc9vSI9nNCIBLAdoK1 MZ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2HzWWCQTO7Y37q/F5XcDzF5cssO1wvkwDcXYhVEFVwE=; b=O/+bZ/RQSji2SyAn18MzfMP8DFqgoJdMGjMLOyM580pL7YcaeaZXxQBqEE7X5xK/ol oUGHkZvy2WMisF7cHZsnfC1Yo8j0QQY79M9twu7u7r/vr8ksVXordiEe+LndUtedCrQU BNYHRUuj08QoGjj1QHAz80RHN3WZo0TlojZ2kAyz5osIqY1PcA+YdODgFfT5KR88XZVf baiTeVtCXGg4tuuqCcvBLI3Idv/aQKUDBYAT9HdDPQ7I9z7E43UQKBrE1uX4ecf70LM2 JmHwfbKQNDLox4+vDFplFXIzo5fcrSCSAznHJYcuna6WNhtFo9oE7z/drkBmxS9pRBJX LvJw== X-Gm-Message-State: AKwxytct8i1bpJv2uHdFicofXF/HYX23OloCc0cJP30SKmgDBUOvb47d cm6wt9UyAr5cQvYVzI3UgKI= X-Received: by 10.55.108.199 with SMTP id h190mr25623185qkc.78.1516305695607; Thu, 18 Jan 2018 12:01:35 -0800 (PST) Received: from [10.69.41.93] ([192.19.223.250]) by smtp.googlemail.com with ESMTPSA id p76sm5141250qke.43.2018.01.18.12.01.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 12:01:34 -0800 (PST) Subject: Re: [PATCH] arm64: Stop printing the virtual memory layout To: Laura Abbott , Will Deacon , Mark Rutland , Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kees Cook , Ard Biesheuvel References: <20171219192810.22537-1-labbott@redhat.com> From: Florian Fainelli Message-ID: <94d6b5c8-07c4-32b5-9746-646b0021d2e9@gmail.com> Date: Thu, 18 Jan 2018 12:01:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171219192810.22537-1-labbott@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/19/2017 11:28 AM, Laura Abbott wrote: > Printing kernel addresses should be done in limited circumstances, mostly > for debugging purposes. Printing out the virtual memory layout at every > kernel bootup doesn't really fall into this category so delete the prints. > There are other ways to get the same information. This really has some value when debugging systems, could we possibly just hide that behind an appropriate configuration option instead of completely removing this? > > Signed-off-by: Laura Abbott > --- > Follow up to my previous proposal to switch all these to %px > --- > arch/arm64/mm/init.c | 43 ------------------------------------------- > 1 file changed, 43 deletions(-) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 5960bef0170d..672094ed7e07 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -599,49 +599,6 @@ void __init mem_init(void) > > mem_init_print_info(NULL); > > -#define MLK(b, t) b, t, ((t) - (b)) >> 10 > -#define MLM(b, t) b, t, ((t) - (b)) >> 20 > -#define MLG(b, t) b, t, ((t) - (b)) >> 30 > -#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K) > - > - pr_notice("Virtual kernel memory layout:\n"); > -#ifdef CONFIG_KASAN > - pr_notice(" kasan : 0x%16lx - 0x%16lx (%6ld GB)\n", > - MLG(KASAN_SHADOW_START, KASAN_SHADOW_END)); > -#endif > - pr_notice(" modules : 0x%16lx - 0x%16lx (%6ld MB)\n", > - MLM(MODULES_VADDR, MODULES_END)); > - pr_notice(" vmalloc : 0x%16lx - 0x%16lx (%6ld GB)\n", > - MLG(VMALLOC_START, VMALLOC_END)); > - pr_notice(" .text : 0x%p" " - 0x%p" " (%6ld KB)\n", > - MLK_ROUNDUP(_text, _etext)); > - pr_notice(" .rodata : 0x%p" " - 0x%p" " (%6ld KB)\n", > - MLK_ROUNDUP(__start_rodata, __init_begin)); > - pr_notice(" .init : 0x%p" " - 0x%p" " (%6ld KB)\n", > - MLK_ROUNDUP(__init_begin, __init_end)); > - pr_notice(" .data : 0x%p" " - 0x%p" " (%6ld KB)\n", > - MLK_ROUNDUP(_sdata, _edata)); > - pr_notice(" .bss : 0x%p" " - 0x%p" " (%6ld KB)\n", > - MLK_ROUNDUP(__bss_start, __bss_stop)); > - pr_notice(" fixed : 0x%16lx - 0x%16lx (%6ld KB)\n", > - MLK(FIXADDR_START, FIXADDR_TOP)); > - pr_notice(" PCI I/O : 0x%16lx - 0x%16lx (%6ld MB)\n", > - MLM(PCI_IO_START, PCI_IO_END)); > -#ifdef CONFIG_SPARSEMEM_VMEMMAP > - pr_notice(" vmemmap : 0x%16lx - 0x%16lx (%6ld GB maximum)\n", > - MLG(VMEMMAP_START, VMEMMAP_START + VMEMMAP_SIZE)); > - pr_notice(" 0x%16lx - 0x%16lx (%6ld MB actual)\n", > - MLM((unsigned long)phys_to_page(memblock_start_of_DRAM()), > - (unsigned long)virt_to_page(high_memory))); > -#endif > - pr_notice(" memory : 0x%16lx - 0x%16lx (%6ld MB)\n", > - MLM(__phys_to_virt(memblock_start_of_DRAM()), > - (unsigned long)high_memory)); > - > -#undef MLK > -#undef MLM > -#undef MLK_ROUNDUP > - > /* > * Check boundaries twice: Some fundamental inconsistencies can be > * detected at build time already. > -- Florian