From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15696C433F5 for ; Thu, 10 Feb 2022 18:44:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B9D86B0075; Thu, 10 Feb 2022 13:44:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 841276B0078; Thu, 10 Feb 2022 13:44:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BC006B007B; Thu, 10 Feb 2022 13:44:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 57A346B0075 for ; Thu, 10 Feb 2022 13:44:16 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2A9BF8B758 for ; Thu, 10 Feb 2022 18:44:16 +0000 (UTC) X-FDA: 79127745312.22.07B0982 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf23.hostedemail.com (Postfix) with ESMTP id AB94314000F for ; Thu, 10 Feb 2022 18:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644518655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PXnVtI935m7FvZKpfg4pjfmoPSIc7HpPcrtV3vV4Jm8=; b=eBvP2om3YmJfIjOFEKeDj0FpykoFR/3HU0m+80plKp79obnaoh0LJNlo+jTGGq9WQdFIfe wVO7jdFYBPlY+Ihvh2VdSZjnyipe6M2oqhCW22fbkozb1D8xWLYZ36BCdD19PQ7uer21s0 XK0jfx5w3jF+uKv1X4uWSWauC9yXCqw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-632-tqGQOJ3dN5-9TdKnRD6Tsw-1; Thu, 10 Feb 2022 13:44:10 -0500 X-MC-Unique: tqGQOJ3dN5-9TdKnRD6Tsw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D4D9992502; Thu, 10 Feb 2022 18:44:08 +0000 (UTC) Received: from t480s.redhat.com (unknown [10.39.194.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA6EA7E124; Thu, 10 Feb 2022 18:44:06 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , "Rafael J. Wysocki" , Greg Kroah-Hartman , Michal Hocko , Oscar Salvador Subject: [PATCH v2 1/2] drivers/base/node: rename link_mem_sections() to register_memory_block_under_node() Date: Thu, 10 Feb 2022 19:43:58 +0100 Message-Id: <20220210184359.235565-2-david@redhat.com> In-Reply-To: <20220210184359.235565-1-david@redhat.com> References: <20220210184359.235565-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eBvP2om3; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf23.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Rspam-User: X-Rspamd-Queue-Id: AB94314000F X-Stat-Signature: o1nzwcaez9okrd6jwf4j6m3jrnrdbhiz X-Rspamd-Server: rspam07 X-HE-Tag: 1644518655-729103 Content-Transfer-Encoding: quoted-printable 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: Let's adjust the stale terminology, making it match unregister_memory_block_under_nodes() and do_register_memory_block_under_node(). We're dealing with memory block devices, which span 1..X memory sections. Acked-by: Oscar Salvador Signed-off-by: David Hildenbrand --- drivers/base/node.c | 5 +++-- include/linux/node.h | 16 ++++++++-------- mm/memory_hotplug.c | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index a133981a12fc..5d75341413ce 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -892,8 +892,9 @@ void unregister_memory_block_under_nodes(struct memor= y_block *mem_blk) kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); } =20 -void link_mem_sections(int nid, unsigned long start_pfn, unsigned long e= nd_pfn, - enum meminit_context context) +void register_memory_blocks_under_node(int nid, unsigned long start_pfn, + unsigned long end_pfn, + enum meminit_context context) { walk_memory_blocks_func_t func; =20 diff --git a/include/linux/node.h b/include/linux/node.h index f3be6ccfebed..9ec680dd607f 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -99,13 +99,13 @@ extern struct node *node_devices[]; typedef void (*node_registration_func_t)(struct node *); =20 #if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_NUMA) -void link_mem_sections(int nid, unsigned long start_pfn, - unsigned long end_pfn, - enum meminit_context context); +void register_memory_blocks_under_node(int nid, unsigned long start_pfn, + unsigned long end_pfn, + enum meminit_context context); #else -static inline void link_mem_sections(int nid, unsigned long start_pfn, - unsigned long end_pfn, - enum meminit_context context) +static inline void register_memory_blocks_under_node(int nid, unsigned l= ong start_pfn, + unsigned long end_pfn, + enum meminit_context context) { } #endif @@ -129,8 +129,8 @@ static inline int register_one_node(int nid) error =3D __register_one_node(nid); if (error) return error; - /* link memory sections under this node */ - link_mem_sections(nid, start_pfn, end_pfn, MEMINIT_EARLY); + register_memory_blocks_under_node(nid, start_pfn, end_pfn, + MEMINIT_EARLY); } =20 return error; diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 2a9627dc784c..69af90e9f507 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1421,9 +1421,9 @@ int __ref add_memory_resource(int nid, struct resou= rce *res, mhp_t mhp_flags) BUG_ON(ret); } =20 - /* link memory sections under this node.*/ - link_mem_sections(nid, PFN_DOWN(start), PFN_UP(start + size - 1), - MEMINIT_HOTPLUG); + register_memory_blocks_under_node(nid, PFN_DOWN(start), + PFN_UP(start + size - 1), + MEMINIT_HOTPLUG); =20 /* create new memmap entry */ if (!strcmp(res->name, "System RAM")) --=20 2.34.1