Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp868843imu; Thu, 13 Dec 2018 05:55:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xcw3k0Pnyk8Wu1hPFHaDGPfrgPtaFaYxLbnMgGqYgVbjznh3tRP7+8+Xa9/WiIiZpCI82O X-Received: by 2002:a17:902:7614:: with SMTP id k20mr24006424pll.285.1544709325105; Thu, 13 Dec 2018 05:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544709325; cv=none; d=google.com; s=arc-20160816; b=lT++wjF3SmcaEsLl/Gdgu60vc3mWtTa4zf93IYJlDwdjwsjLvrfpd2AKyRrKEI6eFl +5NBWgmvXLZLe5tOmnwVhpVlcLUHUiuWuMkzfftzBMN7YMR4BmpN6aRv9PHVGyOMj+5p dPe2B+2hfmlGf2AXlugXDQdbaqvsowF7Q9v2lxAq4V0V9IuFfy4HYacLBm40slitqv9v gTeyHhM4jjoHPlf82ncZsGW3AcoSg/9dyD9u4ziaiLoTKKBkWtys4Qc3jsVSHyVDxWHj 3viI+qqq2PaI7EFQF6aCjdpN45EEk7Ma+MFSqD9z3niCt0J/F57KXY5VxgjaUXEKINpy IH3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=v0dGvl2KuMQ1aDNrwKInRdiEf2Nw7cBeRLXC7V2ezcs=; b=WT58jIJ1qptxbyKqcAV4qNfl+vXTsgiHdiybmB1qxzvCQncRwILpRMKabrePHTRbir 4Qnfs7o05qXndwwIRztnsxsSYP/3U0CVVBxozQYU1qzTRu1CL16YDEXjkXRPhJFeSCK/ enrNXk4fuJ5uI/Z21yqoCOuqBMsvNM5A8U+7d2s6A1FLZW2KVrN5T3uxwihHsrPsj0Ix u2fxnP5nJ4bWmkjcoWvz+4AyOAxx056aA1S9a959/BKNgPxEKaL7BATy0O3qSvWehfzP 64eSWIyr6re1h2fu7KC1E+c0Cxi1TFrx+nPqIkZeEm2+V8m/8COG/3skkz1LFcfpFd7i 1fOw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si1552838pls.400.2018.12.13.05.55.10; Thu, 13 Dec 2018 05:55:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729570AbeLMNyL (ORCPT + 99 others); Thu, 13 Dec 2018 08:54:11 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:39611 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729477AbeLMNyI (ORCPT ); Thu, 13 Dec 2018 08:54:08 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43FwC14LDzz9v1BB; Thu, 13 Dec 2018 14:54:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id luckFdVKSudX; Thu, 13 Dec 2018 14:54:05 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 43FwC13mHVz9v1B9; Thu, 13 Dec 2018 14:54:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DAE6C8B885; Thu, 13 Dec 2018 14:54:06 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id C6z8slSvHBTQ; Thu, 13 Dec 2018 14:54:06 +0100 (CET) Received: from po14163vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B4EBD8B883; Thu, 13 Dec 2018 14:54:06 +0100 (CET) Received: by po14163vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 7880671703; Thu, 13 Dec 2018 13:54:06 +0000 (UTC) Message-Id: <531e7e818b5c4867148412c7902a9cbeee5745ee.1544709040.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH] powerpc/prom: fix early DEBUG messages To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 13 Dec 2018 13:54:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Use %x instead of %llx when phys_addr_t is not 64 bits. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/prom.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index fe758cedb93f..d8e56e03c9c6 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -129,7 +129,7 @@ static void __init move_device_tree(void) p = __va(memblock_phys_alloc(size, PAGE_SIZE)); memcpy(p, initial_boot_params, size); initial_boot_params = p; - DBG("Moved device tree to 0x%p\n", p); + DBG("Moved device tree to 0x%px\n", p); } DBG("<- move_device_tree\n"); @@ -689,7 +689,7 @@ void __init early_init_devtree(void *params) { phys_addr_t limit; - DBG(" -> early_init_devtree(%p)\n", params); + DBG(" -> early_init_devtree(%px)\n", params); /* Too early to BUG_ON(), do it by hand */ if (!early_init_dt_verify(params)) @@ -749,7 +749,11 @@ void __init early_init_devtree(void *params) memblock_allow_resize(); memblock_dump_all(); +#ifdef CONFIG_PHYS_64BIT DBG("Phys. mem: %llx\n", memblock_phys_mem_size()); +#else + DBG("Phys. mem: %x\n", memblock_phys_mem_size()); +#endif /* We may need to relocate the flat tree, do it now. * FIXME .. and the initrd too? */ -- 2.13.3