From patchwork Wed Aug 11 08:54:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12430497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB073C4338F for ; Wed, 11 Aug 2021 08:54:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7920860FA0 for ; Wed, 11 Aug 2021 08:54:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7920860FA0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D862F6B0071; Wed, 11 Aug 2021 04:54:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0EA46B0072; Wed, 11 Aug 2021 04:54:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD5BF6B0073; Wed, 11 Aug 2021 04:54:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 9FB406B0071 for ; Wed, 11 Aug 2021 04:54:42 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3FDB91802ACCE for ; Wed, 11 Aug 2021 08:54:42 +0000 (UTC) X-FDA: 78462189204.04.F81DDC8 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [195.130.137.89]) by imf14.hostedemail.com (Postfix) with ESMTP id A21B2600B65C for ; Wed, 11 Aug 2021 08:54:41 +0000 (UTC) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:438:1ff1:1071:f524]) by laurent.telenet-ops.be with bizsmtp id g8uf2500p1gJxCh018ufmu; Wed, 11 Aug 2021 10:54:40 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mDk0V-001yim-KC; Wed, 11 Aug 2021 10:54:39 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mDk0U-0059DD-WD; Wed, 11 Aug 2021 10:54:39 +0200 From: Geert Uytterhoeven To: Mike Rapoport , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] memblock: Add missing debug code to memblock_add_node() Date: Wed, 11 Aug 2021 10:54:36 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A21B2600B65C Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=none; spf=none (imf14.hostedemail.com: domain of geert@linux-m68k.org has no SPF policy when checking 195.130.137.89) smtp.mailfrom=geert@linux-m68k.org X-Stat-Signature: 53jc8a5decfe47zeinezie5n3wqhw414 X-HE-Tag: 1628672081-32608 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: All other memblock APIs built on top of memblock_add_range() contain debug code to print their parameters. Signed-off-by: Geert Uytterhoeven Reviewed-by: David Hildenbrand --- mm/memblock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/memblock.c b/mm/memblock.c index de7b553baa50004c..57a9849a5d820c34 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -665,6 +665,11 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size, int nid) { + phys_addr_t end = base + size - 1; + + memblock_dbg("%s: [%pa-%pa] nid=%d %pS\n", __func__, + &base, &end, nid, (void *)_RET_IP_); + return memblock_add_range(&memblock.memory, base, size, nid, 0); }