All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: linux-sh@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Mike Rapoport <rppt@kernel.org>, Rich Felker <dalias@libc.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 03/10] sh: mm: drop allocate_pgdat()
Date: Mon, 13 Apr 2026 13:46:41 +0300	[thread overview]
Message-ID: <20260413104649.852228-4-rppt@kernel.org> (raw)
In-Reply-To: <20260413104649.852228-1-rppt@kernel.org>

From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>

allocate_pgdat() function used to allocate the node data structure and
initialize its node_start_pfn and node_spanned_pages fields.

Without CONFIG_NUMA there is no need to allocate the node data and
setting node_start_pfn and node_spanned_pages are redundant because they
are anyway overwritten later by core MM.

Remove allocate_pgdat() function.

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
 arch/sh/mm/init.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 464a3a63e2fa..977392b478b3 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -199,20 +199,6 @@ void __init page_table_range_init(unsigned long start, unsigned long end,
 }
 #endif	/* CONFIG_MMU */
 
-void __init allocate_pgdat(unsigned int nid)
-{
-	unsigned long start_pfn, end_pfn;
-
-	get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
-
-#ifdef CONFIG_NUMA
-	alloc_node_data(nid);
-#endif
-
-	NODE_DATA(nid)->node_start_pfn = start_pfn;
-	NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
-}
-
 static void __init do_init_bootmem(void)
 {
 	unsigned long start_pfn, end_pfn;
@@ -222,8 +208,6 @@ static void __init do_init_bootmem(void)
 	for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL)
 		__add_active_range(0, start_pfn, end_pfn);
 
-	/* All of system RAM sits in node 0 for the non-NUMA case */
-	allocate_pgdat(0);
 	node_set_online(0);
 
 	plat_mem_setup();
-- 
2.53.0



  parent reply	other threads:[~2026-04-13 10:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 10:46 [PATCH 00/10] sh: remove NUMA and SPARSEMEM support Mike Rapoport
2026-04-13 10:46 ` [PATCH 01/10] sh: remove CONFIG_NUMA and realted configuration options Mike Rapoport
2026-04-13 10:46 ` [PATCH 02/10] sh: mm: remove numa.c Mike Rapoport
2026-04-13 10:46 ` Mike Rapoport [this message]
2026-04-13 10:46 ` [PATCH 04/10] sh: remove setup_bootmem_node() and plat_mem_setup() Mike Rapoport
2026-04-13 10:46 ` [PATCH 05/10] sh: drop dead code guarded by #ifdef CONFIG_NUMA Mike Rapoport
2026-04-13 10:46 ` [PATCH 06/10] sh: drop include/asm/mmzone.h Mike Rapoport
2026-04-13 10:46 ` [PATCH 07/10] init/Kconfig: drop ARCH_WANT_NUMA_VARIABLE_LOCALITY Mike Rapoport
2026-04-13 10:46 ` [PATCH 08/10] sh: init: remove call the memblock_set_node() Mike Rapoport
2026-04-13 10:46 ` [PATCH 09/10] sh: remove SPARSEMEM related entries from Kconfig Mike Rapoport
2026-04-13 10:46 ` [PATCH 10/10] sh: drop include/asm/sparsemem.h Mike Rapoport
2026-04-13 10:57 ` [PATCH 00/10] sh: remove NUMA and SPARSEMEM support John Paul Adrian Glaubitz
2026-04-13 11:10   ` Mike Rapoport
2026-04-13 11:14 ` Arnd Bergmann
2026-04-28 16:34   ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260413104649.852228-4-rppt@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dalias@libc.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.