From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AE46331EDA for ; Fri, 12 Jun 2026 04:00:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781236838; cv=none; b=FCK8jQXjd9jut9Q2rz+rM46Gs8uNF5CpV2gmuInfs9Ev5C4tZA1jG2p4rGqMsF82xsmLoFy3M/0FLH1M+JPrn4UP51kuYrrYMy1UTwyCS4QNRD5AzVWPDLIvkE2e3ZBLWLJZjW8eumoG4FbFPTxknp+4+tMF2zApCgvrbZuxqP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781236838; c=relaxed/simple; bh=StSyHcrA+Ga3XyW5zLZJYNeunqGIgcJpw4RVbbBHXLk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V9GA06vPzXxraqug1zKarpaskPFJKV5u1/gDP4bqcE1MfzVu/n4KqKaJLxedGmnEV2linN8TZkteR2+tCWx2qfYSizkKRIW8lk1p+ViN9H7bdj156hfIYMlIp6AeB6kIB8utIkKcRIfuCP0ylnZpngahq8Wvr1Ms11C4zUHdQ4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=D3DMT1Vo; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="D3DMT1Vo" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-842288702fbso288692b3a.1 for ; Thu, 11 Jun 2026 21:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1781236837; x=1781841637; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jCx1RUengY48xTOlIsoUMtEFNjaipzvLjVymwrQ/1F0=; b=D3DMT1VoTKEeonJ/2ALKT0KSYIHY+JPRiwaOtC5J3qxWFHsYKiS2j46ijZp/qkGiEO fmLjLTPor+acaKBmU2s2alBkGHNCFpyDY1XxOQG/1hlgqZ4SgjWTT1hpPkyF0Yu3YUSx g1Xitn7aaI65Xvc9qJ5I0b7gIfr6ceBAE2ZsadPrLx2N1l+eShQNfY3ElyvLaIMJX5wl xRMHWV5oaVZVXgw2RU75LH6xycEHpilrFz56po36FScORhqf+EbrPZ57r4aiwcNFum89 rwnPqyO6+x5f0z6p0z1U2Epfq1RT3UzNi24DmGLpvgCQIKvgHaN2up7ruh8mI0NGPsvO qx0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781236837; x=1781841637; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jCx1RUengY48xTOlIsoUMtEFNjaipzvLjVymwrQ/1F0=; b=FB4b9fsVwq1Fb+qa2IAdf2exTrozUIqbj6/cA1GtJROc83ztmHcuS1xpgJynaprz+6 Gjrp1Pk1JO0Atqk2fv53rZNKW27o3zOidYTTnPV3Lft0s9vKlA1DH6jCYkfi4m4Y4VzV ckiZfWTEf9bUjpxaIpyFvE4b7cK0jCxl5FLiiCEoCQj1dNI0tE+X1W56r/QM7KoFVn6z KdX3GFSWNEjSLOVP0PRLfo9F8L6WASJhnSwXtXrFTsecaMIwNTG8SrZstvbMzJ32k94u 3QzJEp5WApY6mSIf6qs4b9K8a57V2k1/Z4uxs9mru0OYWyw2PZtvVz6ao7oPI/orr9kl H+hg== X-Forwarded-Encrypted: i=1; AFNElJ83wolCqCADHZ3Ps6mlxk4XLkEDBjy96prCgCCji/ozooEmgu8WhfslzpdJlL96LxvC/x5LyiY9OSVSBdA=@vger.kernel.org X-Gm-Message-State: AOJu0Yx6WVC9eEv/63VCO2CqoEhphUPv798CVi/mSZNFxmpeo26pSBha nySweXessVJsLzQ/rdd7KvS7zgEXXSfPmMl1L6sbLUkGRabRVKZ9PvoomBMm13D7n5k= X-Gm-Gg: Acq92OH0cChbvAjPGffsBNGBkz6DWzVdnjizj44bvo4efRWVGHk8eIV6zVzfujrZAic 3Yr3d46FZNkis/jj/QqTFFQ3mlFaW+0F4MFwxbDGzx5ZQvWbwxL4WAPCWvCBhsMMaRUCPnXHJPo vy2e7nfQ7+/uWi1x4IrL+9n3TWQJNdk2O/4d0gJAUZ4DANFpp8R1GFKOBAokIhAsLVz24+rLidV gVOoog6fmnVIKyEGfW42kttBvb0e1PE+1UOT/+nhxjevuGy1x3iyQUUAow60HlWs5MJ62Yn7/Bs //viLBr42yDE/fIqaa3R7BgxUxJ4565DuuS4ASQsp1tz3IJrcJynb6gI1RAtU/Ck09dbw/pKVjD SQr/xs34div8Xoetqh2ztxP8DYcjc8aSLl1Bam1RYB278E2y2j4P2QG5SbCG5Nz9Ltfug/ovxTo mOWfNSDK/2wlvS62N9jg3+LpngFV/QhcqTqtSl2G1IqBo= X-Received: by 2002:a05:6a00:2e92:b0:842:4f24:f3a2 with SMTP id d2e1a72fcca58-8434ce43264mr1187972b3a.28.1781236836875; Thu, 11 Jun 2026 21:00:36 -0700 (PDT) Received: from n232-176-004.byted.org ([36.110.163.99]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434ad03fdcsm643352b3a.24.2026.06.11.21.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 21:00:36 -0700 (PDT) From: Muchun Song To: Oscar Salvador , David Hildenbrand , Andrew Morton , Madhavan Srinivasan , Michael Ellerman Cc: Muchun Song , Mike Rapoport , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nicholas Piggin , Christophe Leroy , Ritesh Harjani , "Aneesh Kumar K . V" , linuxppc-dev@lists.ozlabs.org, Mike Kravetz , Muchun Song Subject: [PATCH v4 17/19] mm/sparse-vmemmap: Remove sparse_vmemmap_init_nid_late() Date: Fri, 12 Jun 2026 11:59:01 +0800 Message-ID: <20260612035903.2468601-18-songmuchun@bytedance.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260612035903.2468601-1-songmuchun@bytedance.com> References: <20260612035903.2468601-1-songmuchun@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit hugetlb_vmemmap_init_late() no longer has any users, so the remaining late-init path in sparse_vmemmap_init_nid_late() is dead code. Remove sparse_vmemmap_init_nid_late() and its declarations. Signed-off-by: Muchun Song Acked-by: Mike Rapoport (Microsoft) --- v3->v4: - Collect Acked-by from Mike Rapoport --- include/linux/mmzone.h | 7 ------- mm/hugetlb_vmemmap.c | 4 ---- mm/hugetlb_vmemmap.h | 5 ----- mm/sparse-vmemmap.c | 11 ----------- mm/sparse.c | 1 - 5 files changed, 28 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index ca2712187147..db9bdf62b170 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -2156,8 +2156,6 @@ static inline int preinited_vmemmap_section(const struct mem_section *section) } void sparse_vmemmap_init_nid_early(int nid); -void sparse_vmemmap_init_nid_late(int nid); - #else static inline int preinited_vmemmap_section(const struct mem_section *section) { @@ -2166,10 +2164,6 @@ static inline int preinited_vmemmap_section(const struct mem_section *section) static inline void sparse_vmemmap_init_nid_early(int nid) { } - -static inline void sparse_vmemmap_init_nid_late(int nid) -{ -} #endif static inline int online_section_nr(unsigned long nr) @@ -2374,7 +2368,6 @@ static inline unsigned long next_present_section_nr(unsigned long section_nr) #else #define sparse_vmemmap_init_nid_early(_nid) do {} while (0) -#define sparse_vmemmap_init_nid_late(_nid) do {} while (0) #define pfn_in_present_section pfn_valid #endif /* CONFIG_SPARSEMEM */ diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index ee4fbd5fed0d..eefd6b5f9706 100644 --- a/mm/hugetlb_vmemmap.c +++ b/mm/hugetlb_vmemmap.c @@ -808,10 +808,6 @@ void __init hugetlb_vmemmap_init_early(int nid) m->flags |= HUGE_BOOTMEM_HVO; } } - -void __init hugetlb_vmemmap_init_late(int nid) -{ -} #endif static const struct ctl_table hugetlb_vmemmap_sysctls[] = { diff --git a/mm/hugetlb_vmemmap.h b/mm/hugetlb_vmemmap.h index 18b490825215..7ac49c52457d 100644 --- a/mm/hugetlb_vmemmap.h +++ b/mm/hugetlb_vmemmap.h @@ -29,7 +29,6 @@ void hugetlb_vmemmap_optimize_folios(struct hstate *h, struct list_head *folio_l void hugetlb_vmemmap_optimize_bootmem_folios(struct hstate *h, struct list_head *folio_list); #ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT void hugetlb_vmemmap_init_early(int nid); -void hugetlb_vmemmap_init_late(int nid); #endif @@ -81,10 +80,6 @@ static inline void hugetlb_vmemmap_init_early(int nid) { } -static inline void hugetlb_vmemmap_init_late(int nid) -{ -} - static inline unsigned int hugetlb_vmemmap_optimizable_size(const struct hstate *h) { return 0; diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 0b4019a93188..515a404b66c0 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -579,17 +579,6 @@ void __init sparse_vmemmap_init_nid_early(int nid) { hugetlb_vmemmap_init_early(nid); } - -/* - * This is called just before the initialization of page structures - * through memmap_init. Zones are now initialized, so any work that - * needs to be done that needs zone information can be done from - * here. - */ -void __init sparse_vmemmap_init_nid_late(int nid) -{ - hugetlb_vmemmap_init_late(nid); -} #endif static void subsection_mask_set(unsigned long *map, unsigned long pfn, diff --git a/mm/sparse.c b/mm/sparse.c index 3917a47153d8..324213d8bdcb 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -320,7 +320,6 @@ static void __init sparse_init_nid(int nid, unsigned long pnum_begin, } } sparse_usage_fini(); - sparse_vmemmap_init_nid_late(nid); } /* -- 2.54.0