From patchwork Tue Dec 19 19:28:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 10124211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A5CFB6019C for ; Tue, 19 Dec 2017 19:44:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95ED329405 for ; Tue, 19 Dec 2017 19:44:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A8542951E; Tue, 19 Dec 2017 19:44:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2493E29405 for ; Tue, 19 Dec 2017 19:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=yCrVf81gsorDUHnbh91cgIk4gJFQvLdE1EajYOJHPps=; b=gVF 1U6lyJAHj1O3hzQQA6Q1KaAXwT4+dFuU/nY4/38PfJo0FTMZXk1tDGMSnRZ1v805ddxdXZSIQKfzw ARSL7aWGAp1OvJpHItoyrwOHSPfwM2P0mKijKcOucQofmnDuYVxWziDXBL9oqYIGsuAvGk+HZA0vV IgzGPoYjzuB2GM7JdqAPyTL81mWufLS4MU5o83r8oPgcAdhS326ndFOQxtmZD8qXLsyd/XrKzD/2J QHlDQI3FKG3e06MZMD3HJinQikuNq3xodsj1ZTXonDSE1QG5GdxmIPfRVJoMnourmSqMN8GJRCPKk EEDSLut+t/R2A4bdveIojmAVZqGd4Yg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eRNoC-0001gl-K1; Tue, 19 Dec 2017 19:44:12 +0000 Received: from mail-ot0-f193.google.com ([74.125.82.193]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eRNYx-00039T-Tw for linux-arm-kernel@lists.infradead.org; Tue, 19 Dec 2017 19:28:37 +0000 Received: by mail-ot0-f193.google.com with SMTP id d5so17712173oti.3 for ; Tue, 19 Dec 2017 11:28:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lwcVdgvut6wo2iTbHBocCrpvLGebjAXN+4ozPeS43kw=; b=Yc8sWv0Rbe9imznluhWwX7pt6HNWsTuF20O7EZk4dSBfmLUHkNz1wFST1jTt50xJCA Z5ztxSCJt0sLidaTHekcqTIzn8ydhauAyYtRKIc73SZZgJtWiAD+l69tuCigST5ETHBD zVorDYGhTjg3ou/Gjkh/uiJTXMgP0zTbce1zDHFdBuZtYweAbyAtKC29zJ6gvoG/EdGq q9XH/NQ242JAsSAyXl9b5o9KoRVTlZwAg1Hjr+7VyLrsNobN/PPx0aGx+Ua7gJAmvMMo hmc6jfB7TPSuK9LXD4s5kI6bAajq2z1rGkYFOYqIXnKR89esUWQbs8KSb6M32UzIRIvW v2lQ== X-Gm-Message-State: AKGB3mKRCS6eTzHJebWCD0vBaz2aJBPJ7KuZCAYOFZpCOQOoDDkmaS5t g3rsf3TRHZZVuBE+K1iyRZIIAA== X-Google-Smtp-Source: ACJfBotBfe8Dm3vtgZN7EEiuQRizlFPt/oSwWU5nomxHXstw9YLyJyEZue6gYx9ArBoCqyPdCa/+6w== X-Received: by 10.157.11.59 with SMTP id a56mr3518468ota.154.1513711696602; Tue, 19 Dec 2017 11:28:16 -0800 (PST) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc::4670]) by smtp.gmail.com with ESMTPSA id l12sm7616807otd.34.2017.12.19.11.28.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Dec 2017 11:28:15 -0800 (PST) From: Laura Abbott To: Will Deacon , Mark Rutland , Catalin Marinas Subject: [PATCH] arm64: Stop printing the virtual memory layout Date: Tue, 19 Dec 2017 11:28:10 -0800 Message-Id: <20171219192810.22537-1-labbott@redhat.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171219_112828_454779_D8F06039 X-CRM114-Status: UNSURE ( 7.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , Laura Abbott , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kees Cook MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Laura Abbott Acked-by: Kees Cook --- 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.