From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34BA335E93C; Mon, 13 Apr 2026 10:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077218; cv=none; b=pNdjQ7duFyUpUYEiGH/gcFDUywNsXzc0P3ElYH5tBV2qX9GkRgWNw9G0oexZOAfFfn1FoX5Pu0ctf8VguKFeHMRdhvKNbA3QO9HZgks0caWaWIyHKsHjF8uRNft24YHD66JPtNe4ZPGWKtgWrA/631t+qVce2X66epsc8tgEHh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077218; c=relaxed/simple; bh=o+bRmTWfQc+OTMbhFAbbaOgxp/R/J7MaFpD/5SmWYO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lq1nCXlXOUTmoqXOel927hiIaDjSHyO56IiGa71ANfLCdBg6FfWTNAr+QhZqmS2wp/d0/QhdoGJtO5YZbU9Wf5meo/KOTer7jS19lT+s1NkoAYIdhtIFK3dVdJUCINV6/emULsGdLK9vgvYWlwYLNRiN2al9PALq8QX+fvTA8as= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F1/t6hzl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F1/t6hzl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C6DEC19421; Mon, 13 Apr 2026 10:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077217; bh=o+bRmTWfQc+OTMbhFAbbaOgxp/R/J7MaFpD/5SmWYO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F1/t6hzls0Rjl3gyKupeUJWxd+mYvAWoin2QDRTaHfVaenGgwRweLoJiYCns/lygw 1Npu61IKoodT/KgO0m/rQZlWyXp7jTbwDjBvhRO4o0A/WxeXzbXBoA0DUfo6bk+qeU oHbs4FKM8DiP9teJ+ampOxl/c+EHA8///3tykEWbkPEQOWxH/ELqGKqj/6nlr5BFUi eXSR09mkDRIk+tJrj1blBy5Pv8t2FkYR/UYyChOztnsz/T7uelXgUq/XgugVDRCa+Z +r6glmj5kvP723TA1I0Ul3blSZ4cP8Hv3BgstuCbTFQcMvEAxND3nN4I8+TaAiGHrf l5FEVSkpsHueg== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 01/10] sh: remove CONFIG_NUMA and realted configuration options Date: Mon, 13 Apr 2026 13:46:39 +0300 Message-ID: <20260413104649.852228-2-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" NUMA support for SuperH was introduced a long time ago by commit b241cb0c885e ("sh: Support for multiple nodes.") "... for boards with many different memory blocks that are otherwise unused (SH7722/SH7785 URAM and so forth)" In reality, this added 128K of memory on sh7722 and sh7785 and 256K on shx3 at the expense of all the NUMA related code in the kernel. For build of v7.0-rc7 with defconfig and the same configuration with CONFIG_NUMA disabled, bloat-o-meter reports difference of ~76k. Disabling CONFIG_SPARSMEM on top increases the difference to ~94k. And that's only overhead in code and static data that does not take into the account data structures allocated at run time. And all this overhead has been there for nothing for almost 8 years because since commit ac21fc2dcb40 ("sh: switch to NO_BOOTMEM") those additional "nodes" could not be used by the core MM because the maximal pfn for ZONE_NORMAL was cut out at the end of the normal memory. Start removing NUMA support on sh with removing CONFIG_NUMA and related configuration options in arch/sh/Kconfig and arch/sh/mm/Kconfig. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/configs/migor_defconfig | 1 - arch/sh/configs/sdk7786_defconfig | 1 - arch/sh/configs/se7722_defconfig | 1 - arch/sh/configs/shx3_defconfig | 1 - arch/sh/configs/ul2_defconfig | 1 - arch/sh/mm/Kconfig | 19 ------------------- 6 files changed, 24 deletions(-) diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defcon= fig index 1d9d543eef4c..db993616f14e 100644 --- a/arch/sh/configs/migor_defconfig +++ b/arch/sh/configs/migor_defconfig @@ -9,7 +9,6 @@ CONFIG_MODULES=3Dy # CONFIG_BLK_DEV_BSG is not set CONFIG_CPU_SUBTYPE_SH7722=3Dy CONFIG_MEMORY_START=3D0x0c000000 -CONFIG_NUMA=3Dy # CONFIG_MIGRATION is not set CONFIG_SH_MIGOR=3Dy # CONFIG_SH_TIMER_CMT is not set diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_de= fconfig index d6fa3a422e24..36e6dd0622f7 100644 --- a/arch/sh/configs/sdk7786_defconfig +++ b/arch/sh/configs/sdk7786_defconfig @@ -41,7 +41,6 @@ CONFIG_CPU_SUBTYPE_SH7786=3Dy CONFIG_MEMORY_START=3D0x40000000 CONFIG_MEMORY_SIZE=3D0x20000000 CONFIG_PMB=3Dy -CONFIG_NUMA=3Dy CONFIG_HUGETLB_PAGE_SIZE_64MB=3Dy CONFIG_KSM=3Dy CONFIG_SH_STORE_QUEUES=3Dy diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defc= onfig index 85b8eb013b79..2908611b118e 100644 --- a/arch/sh/configs/se7722_defconfig +++ b/arch/sh/configs/se7722_defconfig @@ -10,7 +10,6 @@ CONFIG_MODULE_UNLOAD=3Dy # CONFIG_BLK_DEV_BSG is not set CONFIG_CPU_SUBTYPE_SH7722=3Dy CONFIG_MEMORY_START=3D0x0c000000 -CONFIG_NUMA=3Dy CONFIG_SH_STORE_QUEUES=3Dy CONFIG_SH_7722_SOLUTION_ENGINE=3Dy # CONFIG_SH_TIMER_CMT is not set diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig index 0cb69a0b92cb..22c242cf89f7 100644 --- a/arch/sh/configs/shx3_defconfig +++ b/arch/sh/configs/shx3_defconfig @@ -29,7 +29,6 @@ CONFIG_MODULE_UNLOAD=3Dy # CONFIG_BLK_DEV_BSG is not set CONFIG_CPU_SUBTYPE_SHX3=3Dy CONFIG_MEMORY_START=3D0x0c000000 -CONFIG_NUMA=3Dy CONFIG_PAGE_SIZE_64KB=3Dy CONFIG_SH_STORE_QUEUES=3Dy CONFIG_SH_X3PROTO=3Dy diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig index 0d1c858754db..ff15d68dd12d 100644 --- a/arch/sh/configs/ul2_defconfig +++ b/arch/sh/configs/ul2_defconfig @@ -10,7 +10,6 @@ CONFIG_MODULE_UNLOAD=3Dy # CONFIG_BLK_DEV_BSG is not set CONFIG_CPU_SUBTYPE_SH7366=3Dy CONFIG_MEMORY_SIZE=3D0x01f00000 -CONFIG_NUMA=3Dy # CONFIG_MIGRATION is not set # CONFIG_SH_DSP is not set # CONFIG_SH_TIMER_CMT is not set diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 1862411665ab..71fecbbb080e 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig @@ -112,27 +112,8 @@ config VSYSCALL For systems with an MMU that can afford to give up a page, (the default value) say Y. =20 -config NUMA - bool "Non-Uniform Memory Access (NUMA) Support" - depends on MMU && SYS_SUPPORTS_NUMA - select ARCH_WANT_NUMA_VARIABLE_LOCALITY - default n - help - Some SH systems have many various memories scattered around - the address space, each with varying latencies. This enables - support for these blocks by binding them to nodes and allowing - memory policies to be used for prioritizing and controlling - allocation behaviour. - -config NODES_SHIFT - int - default "3" if CPU_SUBTYPE_SHX3 - default "1" - depends on NUMA - config ARCH_FLATMEM_ENABLE def_bool y - depends on !NUMA =20 config ARCH_SPARSEMEM_ENABLE def_bool y --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFCF93BAD8F; Mon, 13 Apr 2026 10:47:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077220; cv=none; b=JFNhWCL2hYVQeB1JF0RAfPUdBL/vYJbEJ5u/PFbdcWl8n8xn2eFF1cu3r9PKvgpqvzrHs+x3GNkkp1VneC3K+7NR3jeHdx/ZB7mm93uCXdsfzzQqqvQExhTUrU6Lft6/PKJ9oXurH2MQ6KC6/kuYkRe7J392okjLcJJC15InHJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077220; c=relaxed/simple; bh=81EMB7S4o9tzdPXH5l/vEk9ZCs4EQ+KrdDzyhygI3S4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WtDFXMVPlD68wapfX92w47HIh9xAbBHEtPRjuVGTEnLOOVGHFSSgTvu/JG8w39YpQq1ypQ4dcQoqh4m+Zxm0gISAZyatHEAu25Nbg5J8YPQuaF01dnHV3JN00/XCqNcvVfCMUqJypF8XWmT9COd71uBDBUrt7odrfuIlEx9eY14= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M8TniFZa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M8TniFZa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BDEDC116C6; Mon, 13 Apr 2026 10:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077220; bh=81EMB7S4o9tzdPXH5l/vEk9ZCs4EQ+KrdDzyhygI3S4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M8TniFZaI+x3/UeKRImAcLzg05X5Z/Niv8RknnIWDxRcj4apBbDyDrZqPHiLyC2hM U5nRZpHixLzePeFPfOkZIFS9jqbM1ZGhwJsKfRvhHzXnduOofWD3AlNzC+DIefYJtr DpCNBfeqasmeK/oZoxmqihOzmmqluyJvDXF2/f2nOYlBObqoYVDFpJG6EMjFIrkIYV wWzTokZcPllpst35SXuHotxR2BD2ZVRc4H2XpF+8Cb4+tXKSeG+2qZOkyaitKPdBZU B91GRHlveCunXlXYMFMdBhqUTArsa07KgyofEI0XZxk6WCLuCHF5PY4id6PsHSuMza EbSKxzUI79cuA== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 02/10] sh: mm: remove numa.c Date: Mon, 13 Apr 2026 13:46:40 +0300 Message-ID: <20260413104649.852228-3-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" Since CONFIG_NUMA is removed, numa.c won't be ever compiled. Remove it. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/mm/Makefile | 1 - arch/sh/mm/numa.c | 53 --------------------------------------------- 2 files changed, 54 deletions(-) delete mode 100644 arch/sh/mm/numa.c diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile index f69ddc70b146..7033947955d6 100644 --- a/arch/sh/mm/Makefile +++ b/arch/sh/mm/Makefile @@ -37,7 +37,6 @@ endif obj-$(CONFIG_DEBUG_FS) +=3D $(debugfs-y) obj-$(CONFIG_HUGETLB_PAGE) +=3D hugetlbpage.o obj-$(CONFIG_PMB) +=3D pmb.o -obj-$(CONFIG_NUMA) +=3D numa.o obj-$(CONFIG_IOREMAP_FIXED) +=3D ioremap_fixed.o obj-$(CONFIG_UNCACHED_MAPPING) +=3D uncached.o obj-$(CONFIG_HAVE_SRAM_POOL) +=3D sram.o diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c deleted file mode 100644 index 9bc212b5e762..000000000000 --- a/arch/sh/mm/numa.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * arch/sh/mm/numa.c - Multiple node support for SH machines - * - * Copyright (C) 2007 Paul Mundt - * - * This file is subject to the terms and conditions of the GNU General Pub= lic - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ -#include -#include -#include -#include -#include -#include - -/* - * On SH machines the conventional approach is to stash system RAM - * in node 0, and other memory blocks in to node 1 and up, ordered by - * latency. Each node's pgdat is node-local at the beginning of the node, - * immediately followed by the node mem map. - */ -void __init setup_bootmem_node(int nid, unsigned long start, unsigned long= end) -{ - unsigned long start_pfn, end_pfn; - - /* Don't allow bogus node assignment */ - BUG_ON(nid >=3D MAX_NUMNODES || nid <=3D 0); - - start_pfn =3D PFN_DOWN(start); - end_pfn =3D PFN_DOWN(end); - - pmb_bolt_mapping((unsigned long)__va(start), start, end - start, - PAGE_KERNEL); - - memblock_add(start, end - start); - - __add_active_range(nid, start_pfn, end_pfn); - - /* Node-local pgdat */ - NODE_DATA(nid) =3D memblock_alloc_node(sizeof(struct pglist_data), - SMP_CACHE_BYTES, nid); - if (!NODE_DATA(nid)) - panic("%s: Failed to allocate %zu bytes align=3D0x%x nid=3D%d\n", - __func__, sizeof(struct pglist_data), SMP_CACHE_BYTES, - nid); - - NODE_DATA(nid)->node_start_pfn =3D start_pfn; - NODE_DATA(nid)->node_spanned_pages =3D end_pfn - start_pfn; - - /* It's up */ - node_set_online(nid); -} --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAEFE3BB9E0; Mon, 13 Apr 2026 10:47:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077223; cv=none; b=dLFZ+qzfV0PAVv3S0dz1/OE+Ia0ldaoaLpfkPwi4ABDDzp4gkni1lKWvx9FR5pEXkSaDLdDuCeaZaRwRdIazx1FnbCm0hKwOc+YCbddVZZ2XdVVw3KlJnGvV8Zr847BZKVekGtlA4RP/AJd6Wev5rkfYb3B/emJb97FEgUYFBoc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077223; c=relaxed/simple; bh=7BjG2iui+OOkytqZRFgX73f96pAwpD0HBcDk3D+4z8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XEKzZLrt8Jj3QhygGgiOcHuIn3ImEb7LhBk7RagZGuZIWeML4PMfNGBHEbf9FAo7zZeOb1Pb4WNDY5eofpf1JJNw5zWw8raeu9MlinrWhaGMAjDEZ4in//fuEjzrtMAc/x4XrSpHLoa/i4Ke+bjHHmBZvYQJpC0Zw2TVfHFbhhE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WGpqAMZw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WGpqAMZw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BBA1C116C6; Mon, 13 Apr 2026 10:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077223; bh=7BjG2iui+OOkytqZRFgX73f96pAwpD0HBcDk3D+4z8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WGpqAMZwqLk55Is2eL0eB1vwScZ3SQzfPptc0tEa8YnuxOBvqK65DmblEZFWTFUls BAZsmbz4EwZnRjINLzmf6p4vQA+g6H1HCXtcRNir7/ziXHSBjjxdT/GitpWpfrgmlJ F/Q7Q6N+6BN5EadXsfECMVTtel1Eci3z//R6Yz+w1J9Xj7l+O0I2jps7H+urDFTKVb F2MAspwFUMtBEl08yUiymrX2HVgZYURM/kCxKxCgvR1GQuICN8y6r3cSAw1l3EgqiC 4gQtAVkNN6Dge8uqFoVA5zzJ0d9vgj/ROCfcXfwr/qng/RG21jtSoiAqAcpsDYvUwE CORrZMuUKWTuw== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , 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 Message-ID: <20260413104649.852228-4-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" 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) Reviewed-by: Arnd Bergmann --- 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 */ =20 -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 =3D start_pfn; - NODE_DATA(nid)->node_spanned_pages =3D 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); =20 - /* All of system RAM sits in node 0 for the non-NUMA case */ - allocate_pgdat(0); node_set_online(0); =20 plat_mem_setup(); --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 205703B9DAA; Mon, 13 Apr 2026 10:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077226; cv=none; b=oadClEpSpqoPnMoUSFYZzSCZdbarU/Rxm2jIJqtw32/pYZgqK6xN84gwjMxefIuUAiNsayQewErWwcnzEKdiMd0MJ6aZYoO4+ywWCrd5qw2rSd23vwudhz6IT9i+LokIcrRBZMgQEE4DZAo0p+wuaKPd3XUqO/fKVOhsCMaGOCs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077226; c=relaxed/simple; bh=NTx/BlRB94FmVGy5XD+EGk+9lfiA/foFvPvF3Gh8bjU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I4gdEyHTcohFlC/UfEuB9GZZi+lyaZkbQUp6/AMMdnC5NqTONIaqTVJye3/aNB8W5mHbi9qBKCB4ZJBEi2vrWb0K63ZPznxD9Ji4BeZqgmK5rKq5H2+3ckMrxW9zA8F32vngukOXEW1+fe3McNBcti2yZDmB0liMst4smbL6+0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N+F5Z2nG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N+F5Z2nG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFC9EC19421; Mon, 13 Apr 2026 10:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077226; bh=NTx/BlRB94FmVGy5XD+EGk+9lfiA/foFvPvF3Gh8bjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N+F5Z2nGhLm5eUA+/YoN+Dn4qQW+AkyGZP0kCoDy+JOdVppgzGlrkv10Mp2EX2VqT o0cC7LlQIac4TUoCUQq3XxKiGQkfF2JUmSKlROxBD/KZLPgT6DoGJHk5sdq7sg9VT0 5rkt8E0i7lhguHm6lk0BSNttMd9y+UpGmVR6qNZ2gJtIkwnWuA3kUemklLFYo4npFr /QzgdaEQpF84w+WV7I+b9em7dOY7ne/yN7CVUbCeoxUgKWK+dOL3W4ojruVSARks6D y2sgQ9EDu08KAUVsUP/GNZFql/dInKz0VS0yv0Gk/2+ziSxivgvsHn565ZEza0HUvl CcQI1da6DWTEQ== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 04/10] sh: remove setup_bootmem_node() and plat_mem_setup() Date: Mon, 13 Apr 2026 13:46:42 +0300 Message-ID: <20260413104649.852228-5-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" setup_bootmem_node() and plat_mem_setup() were needed to setup NUMA "nodes" for URAM memory ranges. Since there is no NUMA support anymore, these functions are not needed. Remove them. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 5 ----- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 4 ---- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 17 ----------------- arch/sh/mm/init.c | 7 ------- 7 files changed, 49 deletions(-) diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7366.c index 6676beef053e..0a4ceb9785f6 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c @@ -381,8 +381,3 @@ void __init plat_irq_setup(void) { register_intc_controller(&intc_desc); } - -void __init plat_mem_setup(void) -{ - /* TODO: Register Node 1 */ -} diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7722.c index 0c6757ef63f4..2180819a1455 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -658,9 +658,3 @@ void __init plat_irq_setup(void) { register_intc_controller(&intc_desc); } - -void __init plat_mem_setup(void) -{ - /* Register the URAM space as Node 1 */ - setup_bootmem_node(1, 0x055f0000, 0x05610000); -} diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7757.c index 2ad19a0c5e04..1f4396da00e5 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c @@ -1239,7 +1239,3 @@ void __init plat_irq_setup_pins(int mode) BUG(); } } - -void __init plat_mem_setup(void) -{ -} diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7785.c index 3b4a414d60a9..95c3cc15a443 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c @@ -600,9 +600,3 @@ void __init plat_irq_setup_pins(int mode) BUG(); } } - -void __init plat_mem_setup(void) -{ - /* Register the URAM space as Node 1 */ - setup_bootmem_node(1, 0xe55f0000, 0xe5610000); -} diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7786.c index c048842d8a58..a46d6c3241a9 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c @@ -783,10 +783,6 @@ void __init plat_irq_setup_pins(int mode) } } =20 -void __init plat_mem_setup(void) -{ -} - static int __init sh7786_devices_setup(void) { int ret, irq; diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a= /setup-shx3.c index 7014d6d199b3..3197ec2a65cd 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c @@ -377,20 +377,3 @@ void __init plat_irq_setup(void) { register_intc_controller(&intc_desc); } - -void __init plat_mem_setup(void) -{ - unsigned int nid =3D 1; - - /* Register CPU#0 URAM space as Node 1 */ - setup_bootmem_node(nid++, 0x145f0000, 0x14610000); /* CPU0 */ - -#if 0 - /* XXX: Not yet.. */ - setup_bootmem_node(nid++, 0x14df0000, 0x14e10000); /* CPU1 */ - setup_bootmem_node(nid++, 0x155f0000, 0x15610000); /* CPU2 */ - setup_bootmem_node(nid++, 0x15df0000, 0x15e10000); /* CPU3 */ -#endif - - setup_bootmem_node(nid++, 0x16000000, 0x16020000); /* CSM */ -} diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 977392b478b3..b34ba42d1e18 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -38,11 +38,6 @@ void __init generic_mem_init(void) memblock_add(__MEMORY_START, __MEMORY_SIZE); } =20 -void __init __weak plat_mem_setup(void) -{ - /* Nothing to see here, move along. */ -} - #ifdef CONFIG_MMU static pte_t *__get_pte_phys(unsigned long addr) { @@ -209,8 +204,6 @@ static void __init do_init_bootmem(void) __add_active_range(0, start_pfn, end_pfn); =20 node_set_online(0); - - plat_mem_setup(); } =20 static void __init early_reserve_mem(void) --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30C753BADBC; Mon, 13 Apr 2026 10:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077229; cv=none; b=CkkbtjkZ4r909+uipY6gEYvKpp8i2Z+SZgtKQbfc8PlmJl7YUqaE1rNNWOOCyBKX6uT/3K4bYvL7ah6y4BF0KmG7HjEJA7ipa3bKMq5o3C8VDUDaMOr7QFchMhL3ZbUB4zqosptGrZUsGyqyRqOJSwxjsjkH7ZOUkARjfSGjsoo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077229; c=relaxed/simple; bh=s7r2AbNfz/44Y9KLQIIK4MPue07uMssbFF3qS8Ac9vE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Al5os0dH8eJexOmpjf6gOdjpVQVa73R/rG7BUGa7gj3i2NWAR8KYWusZ1gPWuFXoiX5IEx2O6KjjvdxjBXeXaiHn1gmglOex8Ftg4T1jOzGSCudKtzsq3pqySSewfxKTRygb8sl8+lWpj0tEIzhwmhZ7TlLlh+RiCegUIlcCqhw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HbANjlCY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HbANjlCY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FB19C116C6; Mon, 13 Apr 2026 10:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077228; bh=s7r2AbNfz/44Y9KLQIIK4MPue07uMssbFF3qS8Ac9vE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HbANjlCYWuaIObr2nBGm6gDpN+vTZPeEExjqyHfjgVMPVN7tXqxCXqz4mAxYN51jy ZwW+iLCrUHnh353cS1F+l9IgskuTGHPX/xzJNPx5oWGA6Q0OkfMcGq2h021w7AztXy h22iJijQmy3M8IZUKeuHMhYQzr38OtSDfABJA+yBREVg6Z8TxFx3tAAh6CXyE7QN16 b3cPY9mufVGAtjEAiQYW8iwJ68UwQri99kd9kFSbUGpeVDYllSFvT1e46P1aCnuCKF PfZ5PoD/DsthEJkNVqYzQoT6tN2Bz3UDWNQagAgyFK0+2JajO+4+IDJbCAPW4Ao9p5 9VBTeUnueySpw== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 05/10] sh: drop dead code guarded by #ifdef CONFIG_NUMA Date: Mon, 13 Apr 2026 13:46:43 +0300 Message-ID: <20260413104649.852228-6-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" and NUMA-related comments. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/include/asm/topology.h | 13 ------------- arch/sh/kernel/setup.c | 1 - arch/sh/kernel/topology.c | 12 ------------ arch/sh/kernel/vmcore_info.c | 4 ---- arch/sh/mm/sram.c | 3 +-- 5 files changed, 1 insertion(+), 32 deletions(-) diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h index 1db470e02456..a3c31754ba5f 100644 --- a/arch/sh/include/asm/topology.h +++ b/arch/sh/include/asm/topology.h @@ -2,19 +2,6 @@ #ifndef _ASM_SH_TOPOLOGY_H #define _ASM_SH_TOPOLOGY_H =20 -#ifdef CONFIG_NUMA - -#define cpu_to_node(cpu) ((void)(cpu),0) - -#define cpumask_of_node(node) ((void)node, cpu_online_mask) - -#define pcibus_to_node(bus) ((void)(bus), -1) -#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) =3D=3D -1 ? \ - cpu_all_mask : \ - cpumask_of_node(pcibus_to_node(bus))) - -#endif - #define mc_capable() (1) =20 const struct cpumask *cpu_coregroup_mask(int cpu); diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 039a51291002..5e25c1db4d61 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -227,7 +227,6 @@ void __init __add_active_range(unsigned int nid, unsign= ed long start_pfn, /* * Also make sure that there is a PMB mapping that covers this * range before we attempt to activate it, to avoid reset by MMU. - * We can hit this path with NUMA or memory hot-add. */ pmb_bolt_mapping((unsigned long)__va(start), start, end - start, PAGE_KERNEL); diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c index 2d2a7509b565..906b7b1d5443 100644 --- a/arch/sh/kernel/topology.c +++ b/arch/sh/kernel/topology.c @@ -57,18 +57,6 @@ static int __init topology_init(void) __func__, i, ret); } =20 -#if defined(CONFIG_NUMA) && !defined(CONFIG_SMP) - /* - * In the UP case, make sure the CPU association is still - * registered under each node. Without this, sysfs fails - * to make the connection between nodes other than node0 - * and cpu0. - */ - for_each_online_node(i) - if (i !=3D numa_node_id()) - register_cpu_under_node(raw_smp_processor_id(), i); -#endif - return 0; } subsys_initcall(topology_init); diff --git a/arch/sh/kernel/vmcore_info.c b/arch/sh/kernel/vmcore_info.c index a244a204a1b1..9f029b4a7e63 100644 --- a/arch/sh/kernel/vmcore_info.c +++ b/arch/sh/kernel/vmcore_info.c @@ -5,10 +5,6 @@ =20 void arch_crash_save_vmcoreinfo(void) { -#ifdef CONFIG_NUMA - VMCOREINFO_SYMBOL(node_data); - VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); -#endif #ifdef CONFIG_X2TLB VMCOREINFO_CONFIG(X2TLB); #endif diff --git a/arch/sh/mm/sram.c b/arch/sh/mm/sram.c index 2d8fa718d55e..208080f072df 100644 --- a/arch/sh/mm/sram.c +++ b/arch/sh/mm/sram.c @@ -16,8 +16,7 @@ * This provides a standard SRAM pool for tiny memories that can be * added either by the CPU or the platform code. Typical SRAM sizes * to be inserted in to the pool will generally be less than the page - * size, with anything more reasonably sized handled as a NUMA memory - * node. + * size. */ struct gen_pool *sram_pool; =20 --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF105331200; Mon, 13 Apr 2026 10:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077231; cv=none; b=bX8guXRecYrAJTpKJ4RYZIztOh/ujYOLCvQaqhVDvVfqcbb0AkE9LB6p+GgdosyNNT9WUc/7/y3TKMFcmv4Kz6CH9su2c+opHBMV5TyNIfcA0ybYRbr9YQ24X0De/JxI9SzedjY4EOFzh0m/fI9EwhyUV0jjPqOun2XarGYkCKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077231; c=relaxed/simple; bh=1RIWNqZfuQSQXtyXYZxxAcYIBhO8O9EvGLJSM+pH4vc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CB0y2xtqawFjwlf1PPw8Maez7muA0Pk13oxOsaxsg+CMI6lMQzCQGIj8gqObbkQnxSHam2TCpj5a5MblMoV9j+v8f++2a0xnUURmz84k5qJrqC9YDdlS+kc/VFSTapIsbXi050w4fTRwCbCiV/iV5tA9cNZjp5KJWtRVUIq9koo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=av3a0AwT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="av3a0AwT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 407D2C2BCB5; Mon, 13 Apr 2026 10:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077231; bh=1RIWNqZfuQSQXtyXYZxxAcYIBhO8O9EvGLJSM+pH4vc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=av3a0AwTAc1okI6NtwTkrdgGqCjSuoBbOktZ9AJaCxUTYMwEDlvm9jSNqQUlUT9OU q4dkfuyRkJCul5wkqOGIkpdt/+wGQR5A68XMYLVWUBY40HY0RRgaNFRlPeY0l4/iC3 BzlDDPYQYtEJsaGekSDmuAsOdgDfK29jfitzaGoPmAzjQcfVA7CLBIKPFGMKEQMD8v knmdanNZdsgd1aGw6PtWjWZQN8q9HdhpbFqIFHJNvRWfNa6V0hOJ1kvc1BMsYviKo8 B6hFIbqwxSFIIUPxg6qNfgpam0eot1Vl8NFHYqAw+uu7FfX/zHlWC+1NW2MFuvbT95 bKgfHX9ebdsIg== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 06/10] sh: drop include/asm/mmzone.h Date: Mon, 13 Apr 2026 13:46:44 +0300 Message-ID: <20260413104649.852228-7-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" include/asm/mmzone.h was required for declarations of NUMA related functionality. The only function declared there that's not related to NUMA is __add_active_range(). Move __add_active_range() declaration to include/asm/setup.h and drop include/asm/mmzone.h Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/include/asm/mmzone.h | 42 -------------------------- arch/sh/include/asm/setup.h | 3 ++ arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 1 - arch/sh/kernel/cpu/sh4a/setup-shx3.c | 1 - arch/sh/kernel/setup.c | 2 -- arch/sh/mm/init.c | 1 - 11 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 arch/sh/include/asm/mmzone.h diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h deleted file mode 100644 index 63f88b465e39..000000000000 --- a/arch/sh/include/asm/mmzone.h +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __ASM_SH_MMZONE_H -#define __ASM_SH_MMZONE_H - -#ifdef CONFIG_NUMA -#include - -static inline int pfn_to_nid(unsigned long pfn) -{ - int nid; - - for (nid =3D 0; nid < MAX_NUMNODES; nid++) - if (pfn >=3D node_start_pfn(nid) && pfn <=3D node_end_pfn(nid)) - break; - - return nid; -} - -static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn) -{ - return NODE_DATA(pfn_to_nid(pfn)); -} - -/* arch/sh/mm/numa.c */ -void __init setup_bootmem_node(int nid, unsigned long start, unsigned long= end); -#else -static inline void -setup_bootmem_node(int nid, unsigned long start, unsigned long end) -{ -} -#endif /* CONFIG_NUMA */ - -/* Platform specific mem init */ -void __init plat_mem_setup(void); - -/* arch/sh/kernel/setup.c */ -void __init __add_active_range(unsigned int nid, unsigned long start_pfn, - unsigned long end_pfn); -/* arch/sh/mm/init.c */ -void __init allocate_pgdat(unsigned int nid); - -#endif /* __ASM_SH_MMZONE_H */ diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h index 84bb23a771f3..6bd5b0d87abe 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h @@ -23,4 +23,7 @@ void check_for_initrd(void); void per_cpu_trap_init(void); void sh_fdt_init(phys_addr_t dt_phys); =20 +void __add_active_range(unsigned int nid, unsigned long start_pfn, + unsigned long end_pfn); + #endif /* _SH_SETUP_H */ diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7722.c index 2180819a1455..5e2c24c518b4 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -16,7 +16,6 @@ #include =20 #include -#include #include #include =20 diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7723.c index d64d28c4f059..5c24ff407c89 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -17,7 +17,6 @@ =20 #include #include -#include #include =20 #include diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7724.c index ef4b26a4b3d6..9441e4a0f402 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -24,7 +24,6 @@ #include #include #include -#include #include =20 #include diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7757.c index 1f4396da00e5..3750b598d6bd 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c @@ -21,7 +21,6 @@ #include #include =20 -#include #include =20 static struct plat_sci_port scif2_platform_data =3D { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7785.c index 95c3cc15a443..13f08c44fb02 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include =20 diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh= 4a/setup-sh7786.c index a46d6c3241a9..79484c598b83 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c @@ -22,7 +22,6 @@ #include #include #include -#include #include =20 static struct plat_sci_port scif0_platform_data =3D { diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a= /setup-shx3.c index 3197ec2a65cd..93cdd1ee888d 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c @@ -13,7 +13,6 @@ #include #include #include -#include #include =20 /* diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 5e25c1db4d61..2f2764061003 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index b34ba42d1e18..31a9676efbe3 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 567643BAD94; Mon, 13 Apr 2026 10:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077234; cv=none; b=UP/7deVdnJpv7skBP4SicMMYCWwf2Ax7X0Jc0vKLQF2+DxfLxo+WlZDLxMGjKHWfcVLnapxaN+01b0cSmR6UrEkAl410TtoFywrgZhoX3Da6TFq7d2YpzcOkARyUVpahkB+K04NqHE/Oqd9xuYJ4NKmScrQDOFrWTXMYd8md33A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077234; c=relaxed/simple; bh=w9l+WDeNQIEjr29WOlkvK0OiSqXu58rsWU3JJJ9mskg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TRSMxWgEmzs/avioT7Mj+y3K2yIZ0bUQRptOxiVRgcbbf9BuXaAZvsX5iBWDHWfCDYpdWA37lRXjnd6tQi9rRlRfgZAj7Upks0G/lFy3d9A798ArDQHSVMP2xx3R3SwWMaEmfjrg0mpqCsoxyDRqFsblytlTbZWADpI3pwnjoyo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CFWh6Njy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CFWh6Njy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00A66C2BCAF; Mon, 13 Apr 2026 10:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077234; bh=w9l+WDeNQIEjr29WOlkvK0OiSqXu58rsWU3JJJ9mskg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CFWh6Njy40ZFutVv1Le8/k0/LKKAasphDLxpZJoBJ+HkrOQWeJx8deVpGFN/j7OcA QMIOEZDqPTdUEz0M88LItJyYZ+ZNriSYOH0VEurK7Tl4Lpzmd5jqxNVA5h4KT6hxBc D4ig52tzPvVGzjSmaGD6YV9fHXAwBafV2n0hgSYHAV+0aeBURSd6jXis4H3xykikjQ kxexg88DsDwXGs+Ybdbtk6Kj8nNS1sBkZh3/B8Suhj0toGNAX4mVSzS/tnybsoGDr7 ib7BM+u4Z0Ajvj19yIl82GcHrAoJeVt8t9QLc8TQLKxbXyxdhDf/K44OCo7lZTNY21 ZY18VJszwwCwQ== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 07/10] init/Kconfig: drop ARCH_WANT_NUMA_VARIABLE_LOCALITY Date: Mon, 13 Apr 2026 13:46:45 +0300 Message-ID: <20260413104649.852228-8-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" sh was the only architecture that selected ARCH_WANT_NUMA_VARIABLE_LOCALITY. With NUMA support on sh gone, there is no need in this configuration option. Remove it. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- init/Kconfig | 7 ------- 1 file changed, 7 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 7484cd703bc1..c31fb292729f 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -987,16 +987,9 @@ config CC_STRINGOP_OVERFLOW config ARCH_SUPPORTS_INT128 bool =20 -# For architectures that (ab)use NUMA to represent different memory regions -# all cpu-local but of different latencies, such as SuperH. -# -config ARCH_WANT_NUMA_VARIABLE_LOCALITY - bool - config NUMA_BALANCING bool "Memory placement aware NUMA scheduler" depends on ARCH_SUPPORTS_NUMA_BALANCING - depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY depends on SMP && NUMA && MIGRATION && !PREEMPT_RT help This option adds support for automatic NUMA aware memory/task placement. --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B4223090C6; Mon, 13 Apr 2026 10:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077237; cv=none; b=dzVbd0GwRlvlf0mihf32vUG9fbm0uNPhhA3sNQ31WOpa3tD7d4GzCLeNvhRSHSzsP0egjBDuotEft99n+l1V5AXyjfU52HV2CRevfOSL1uGai6QcARxUv7Q0mT30WF/8SFEADcCS5Y7oMukjVE3WHRlfYscnyiyHZCVJGZ1jE9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077237; c=relaxed/simple; bh=OaaQg0yScLb6753TV7501lpQBgyvDvfMGyHT767MQ7o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q7ALkE55ttR4avIvggQfSeD9KSsA83hiSEtONMeDtNXx7GHxgh9cvvfAMDzkovYSPfJipBQ0taYNbR3A1lhslwgn2tL+A+S9Z+sCb0ZhJb5sR+CO+jInBHAJKcdvMVVSfVs82ENrqUBYzkMGMvtD+4/GPi3dZ/PffFekM1UWyEE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DZ7mybbJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DZ7mybbJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B507DC116C6; Mon, 13 Apr 2026 10:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077237; bh=OaaQg0yScLb6753TV7501lpQBgyvDvfMGyHT767MQ7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DZ7mybbJu3Z0ChneXhfc64irFPezd5EHKPKyHZVyGeTgx76pN9SdlJovI50zftpLs msC0OQwyy6gGjM+xV3XJavTRWII8Wo6A7EoymqRz5rtcHMCIakm+fL0MY6fkOjfFD0 NErgp5rvP0TvSgYglufDK0RuB7817UGmESUZY8NfMWme/A+NWqk7mq5fjo6Ex4YWjT fJrp/jGW0d9BptKA38ST/lrtsDkiUTuxhsV+X2CuxZzlh/YwO4RV6sUgQidYMLK/Yv /WlI4S7IQqLGb28BVkhhk/mZfDjqWId2HNziEGvLE04KJnbOawlbvcdgXJbGAuy4q/ siiIXiO5ks7mg== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 08/10] sh: init: remove call the memblock_set_node() Date: Mon, 13 Apr 2026 13:46:46 +0300 Message-ID: <20260413104649.852228-9-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" Without CONFIG_NUMA, the call to memblock_set_node() is not needed. Remove it. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/kernel/setup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 2f2764061003..43d0f7b62b03 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -228,9 +228,6 @@ void __init __add_active_range(unsigned int nid, unsign= ed long start_pfn, */ pmb_bolt_mapping((unsigned long)__va(start), start, end - start, PAGE_KERNEL); - - memblock_set_node(PFN_PHYS(start_pfn), PFN_PHYS(end_pfn - start_pfn), - &memblock.memory, nid); } =20 void __init __weak plat_early_device_setup(void) --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2441320A0B; Mon, 13 Apr 2026 10:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077239; cv=none; b=VL17I9/kJLwzVfizIMY1ImXIW4iXzl0Ca5yo/laaD5ibPWZJ10zPM8T485RebVEONOB27m6au6fCndPArirQi3V6zUXomhcQIQRAYeH9xKZjl456FdHmxxRwM6p8e2A+wvsp9zMMgBeRVhF55CYawPmtdaCQBDxOtaqWZNcwwTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077239; c=relaxed/simple; bh=tmm+GelxzH5APhqtu7GMS7JKHUp8PnSoAWwiNCsV7mQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=up0wfvC8H00pLX+k5ZUf6zO6tTqdaZayga4TdezsJqAC/GH1DK9ddcYsiDYXX7/21IC8PAt07jMnnJZwGZPDpvfwlVKDQJsW/jCBD4tkRmzvGoqayrqv8alY9PDlj+VKPwFFtldFH+F4ysNrteC+pgnnLTm4TUL93sFmV/u7nAs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ptiEy90A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ptiEy90A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E0CDC116C6; Mon, 13 Apr 2026 10:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077239; bh=tmm+GelxzH5APhqtu7GMS7JKHUp8PnSoAWwiNCsV7mQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ptiEy90AwAOhfOXWuZXo24IhG7Ft01/3nuCQ6IimufgpwPtNUmpV0Qowsw11mrxBS lE0bj/24EtzatXBW6lZaX+yDTh9i8fRCiuRGZ47uesB3ICbCzQRZm4+QCOtk4vO2ft 7PfvdSj7Sdof4fdgeZxmBtt9Yb/DJ9jlv2fWQ2TxvofoJZbqQcOlbkzQZVmmD1Im9h 9oFC/Bx/6OdhOMPHAFy59BtdTVC+wOt9mjqm+lSGy0jeIUSyztC6Fftbu7nqmYX8Bb xqyqOCyvkJfeEQubRxkRrwqmxMptRNuUnK4xc+ltGeSkqpT7ewrIuccl3UTbH4yTeQ KfJAgenzEN/GA== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 09/10] sh: remove SPARSEMEM related entries from Kconfig Date: Mon, 13 Apr 2026 13:46:47 +0300 Message-ID: <20260413104649.852228-10-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" Without NUMA support, SPARSEMEM related configuration options only create unnecessary overhead. Remove them. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/Kconfig | 8 -------- arch/sh/mm/Kconfig | 10 ---------- 2 files changed, 18 deletions(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d5795067befa..29d55f12ad50 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -390,7 +390,6 @@ config CPU_SUBTYPE_SH7723 select CPU_SH4A select CPU_SHX2 select ARCH_SHMOBILE - select ARCH_SPARSEMEM_ENABLE select SYS_SUPPORTS_SH_CMT select PINCTRL help @@ -401,7 +400,6 @@ config CPU_SUBTYPE_SH7724 select CPU_SH4A select CPU_SHX2 select ARCH_SHMOBILE - select ARCH_SPARSEMEM_ENABLE select SYS_SUPPORTS_SH_CMT select PINCTRL help @@ -442,8 +440,6 @@ config CPU_SUBTYPE_SH7785 bool "Support SH7785 processor" select CPU_SH4A select CPU_SHX2 - select ARCH_SPARSEMEM_ENABLE - select SYS_SUPPORTS_NUMA select PINCTRL =20 config CPU_SUBTYPE_SH7786 @@ -477,8 +473,6 @@ config CPU_SUBTYPE_SH7722 select CPU_SH4AL_DSP select CPU_SHX2 select ARCH_SHMOBILE - select ARCH_SPARSEMEM_ENABLE - select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SH_CMT select PINCTRL =20 @@ -487,8 +481,6 @@ config CPU_SUBTYPE_SH7366 select CPU_SH4AL_DSP select CPU_SHX2 select ARCH_SHMOBILE - select ARCH_SPARSEMEM_ENABLE - select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SH_CMT =20 endchoice diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 71fecbbb080e..c7d889a1a9d7 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig @@ -115,16 +115,6 @@ config VSYSCALL config ARCH_FLATMEM_ENABLE def_bool y =20 -config ARCH_SPARSEMEM_ENABLE - def_bool y - select SPARSEMEM_STATIC - -config ARCH_SPARSEMEM_DEFAULT - def_bool y - -config ARCH_SELECT_MEMORY_MODEL - def_bool y - config IOREMAP_FIXED def_bool y depends on X2TLB --=20 2.53.0 From nobody Mon Jun 15 19:02:47 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEC1C320A0B; Mon, 13 Apr 2026 10:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077242; cv=none; b=MsWvq+Pb7cay/L7+aPzv7Q8Bk0vlePeQnq0Pgc+0/aV0XCHpvCvFfga0O0L8i8QlWnVI5ch1gmeOVdXMIrJZSsityovYKwOUnEltlg1iYgIfki/iQXOKZk68vYKmkfvsxQqT3WflqSsnX7c0BYHwvN10jSqEkJrReMTb47cM2XA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776077242; c=relaxed/simple; bh=lvY8/CoxdcUj05A6GOXsGloszNtYBaitN2QjjVRBlcg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gL9XQgHxyyNOyMvfY4xc+2c9I474se/kFNRAFai3fl8Jt1CMcPMW2Y404/7XyAgQJjQNYFZ+KNLIrMkxqApRpzCmZSDCG2eMRCZH1LeiM7qIxH8nL5hW12aW663Wacu/fLd1H4MA/Eq7A5PyNOfMwRKCze3NTqEVvSvW7g6Z68Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iTILtthu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iTILtthu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E2E0C116C6; Mon, 13 Apr 2026 10:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776077242; bh=lvY8/CoxdcUj05A6GOXsGloszNtYBaitN2QjjVRBlcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTILtthupm/4gmTKWZXhsMVLE/4dux9MQkCta1L3VKbjBGwi5rfxjzuidNR8jJmbS t+eNE63HRvaO1KaZtgDsAuZncVcKioArKuGmD8/p75TUb2W2DOlMfUYfYG4VUOc+3d eYIKCKIP+7kBFqIT8JkKHCWVea+/dR+zvY7IhCq/XZxMqHUh+VaMo6hX7rxQdPE/B2 1z3CrDCo9skf16ez+6F3y4a1gJasZAEsk13quWWOr+wytIygw/Nu+JqOHtL2+vJ2Xx 4GKDwPWZq7expq914q/QrGEqxeCIgkfP8TkE2zjaAKZ8PwZLVX4Y549b09ginUYcSa 926oMD0kxLmNw== From: Mike Rapoport To: linux-sh@vger.kernel.org Cc: Andrew Morton , Arnd Bergmann , John Paul Adrian Glaubitz , Mike Rapoport , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 10/10] sh: drop include/asm/sparsemem.h Date: Mon, 13 Apr 2026 13:46:48 +0300 Message-ID: <20260413104649.852228-11-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413104649.852228-1-rppt@kernel.org> References: <20260413104649.852228-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Mike Rapoport (Microsoft)" Move MAX_PHYSMEM_BITS declaration to include/asm/mmu.h and drop now unneeded include/asm/sparsemem.h Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Arnd Bergmann --- arch/sh/include/asm/mmu.h | 2 ++ arch/sh/include/asm/sparsemem.h | 12 ------------ arch/sh/kernel/setup.c | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 arch/sh/include/asm/sparsemem.h diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h index b9c9f91e6616..def7c1edd605 100644 --- a/arch/sh/include/asm/mmu.h +++ b/arch/sh/include/asm/mmu.h @@ -2,6 +2,8 @@ #ifndef __MMU_H #define __MMU_H =20 +#define MAX_PHYSMEM_BITS 32 + /* * Privileged Space Mapping Buffer (PMB) definitions */ diff --git a/arch/sh/include/asm/sparsemem.h b/arch/sh/include/asm/sparseme= m.h deleted file mode 100644 index 4703cbe23844..000000000000 --- a/arch/sh/include/asm/sparsemem.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __ASM_SH_SPARSEMEM_H -#define __ASM_SH_SPARSEMEM_H - -/* - * SECTION_SIZE_BITS 2^N: how big each section will be - * MAX_PHYSMEM_BITS 2^N: how much physical address space we have - */ -#define SECTION_SIZE_BITS 26 -#define MAX_PHYSMEM_BITS 32 - -#endif /* __ASM_SH_SPARSEMEM_H */ diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 43d0f7b62b03..99f52d888aa3 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -41,7 +41,6 @@ #include #include #include -#include #include =20 /* --=20 2.53.0