From nobody Sat Jun 13 04:46:06 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 361E73932DC; Sun, 10 May 2026 13:55:56 +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=1778421356; cv=none; b=uSiLq4EJFpY3LOD0XQtHtMtvEhFANYyQ76z6/4HB+swPOS5/1GC69e9cT5sg6hR9M5cO5wnxT92a43L6xEbRXPc7CH+KO1ZtEhuqCi13xGW44/OqQ/YvUtP/N6LjM+3GR0IbJATl7MNXQk+q/ZGPM8oZRiQbDqlDaD4iBFcKvms= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421356; c=relaxed/simple; bh=9k0g05iUuWxp09AJbka1ulHptTpb/ZxjRQLmafQLgSA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hWnDTeQu2P2Kc96tznFeK8XpskI/8sExDd7XfdBRlD+eeJ7Eja44ADogu7JP5/COEkytZnGnSQbCQ0IoZYyXelnu9bBqzVlQah1CLd/ym2JU2V+QvOtm00Fq6SEGKUjJlWsrrCHY2IwAPPvOJ37Gudk5/mBtfX6JtPmOeeW0IL8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tEhGLxDb; 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="tEhGLxDb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93C4CC2BCB8; Sun, 10 May 2026 13:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421355; bh=9k0g05iUuWxp09AJbka1ulHptTpb/ZxjRQLmafQLgSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tEhGLxDbpMUhgEQtSGsOP0KkM0cVqjCKmNJSCSeGWbBUeblNhiOl6zkfH9EqQ47jd MayNaFHLc5OVSYunPiyqa6aG+yHAQOB+/CdeaRkUSOFXy7BMEzIn4Mqbeyj+4UWShK qnJUpf4uVVHcSbAqARd6Tx9XNqFBtxneaFkUmE0G0GZeaC8Fg05tKHWip74ZlIn3yE rsn+q543FTY9H1iwiOsK5mdlNU5DyiwBWm/qkfyWuF72ruuMEECOipfutU3ZjLNmgC YtyJEWeGohId2G3aedgkauGvAFZR3GcBrgMVcglbDQmBM+PWubqBJxiUwIfuJMUPjY Sxi7jv+UPkL7Q== 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 v2 01/10] sh: remove CONFIG_NUMA and realted configuration options Date: Sun, 10 May 2026 16:55:37 +0300 Message-ID: <20260510135546.13554-2-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- arch/sh/Kconfig | 6 ------ 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 ------------------- 7 files changed, 30 deletions(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d5795067befa..d0ba91eba71a 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -106,9 +106,6 @@ config SYS_SUPPORTS_APM_EMULATION config SYS_SUPPORTS_SMP bool =20 -config SYS_SUPPORTS_NUMA - bool - config STACKTRACE_SUPPORT def_bool y =20 @@ -197,7 +194,6 @@ config CPU_SHX3 bool select DMA_COHERENT select SYS_SUPPORTS_SMP - select SYS_SUPPORTS_NUMA =20 config ARCH_SHMOBILE bool @@ -443,7 +439,6 @@ config CPU_SUBTYPE_SH7785 select CPU_SH4A select CPU_SHX2 select ARCH_SPARSEMEM_ENABLE - select SYS_SUPPORTS_NUMA select PINCTRL =20 config CPU_SUBTYPE_SH7786 @@ -478,7 +473,6 @@ config CPU_SUBTYPE_SH7722 select CPU_SHX2 select ARCH_SHMOBILE select ARCH_SPARSEMEM_ENABLE - select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SH_CMT select PINCTRL =20 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 00a37944b043..1740a6465280 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 Sat Jun 13 04:46:06 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 565AF393DD3; Sun, 10 May 2026 13:55:58 +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=1778421359; cv=none; b=OYDRd8OOwz+DD1DOT/N5Lm7Qy43F6FbdT/mAAdhZ2tyfwpcz4UCpz0AZrM6ewrcWXWfS1gLw/zEF2Rfw2GzRmwXPAEnZ1HANj5JM9YTMeomK6ULdRjxcEgCY+T1yxu6G2XOXYJGPII4LlFkD590kDBZsLhCfXtYjTq2MYP/eKM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421359; c=relaxed/simple; bh=rmDupBOctIJ9BKC2nX3b3eQmWjMWgjh9aoXPYqNNTOc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lAiX4TlsuFnpBXpJfi/SjMie7AFBkW3TcWqzHxnCduLjZGh1Kt4AJ10LXZwAHjQibKtA9BftPrKUC8LXrltFlstVMM6xqoPf4hn61S4SOPfshRBDn27LOsjiVtph2ppnFms3QgD6SX9D9dsR2xNCo/B0OmY8CqddRAFAUWH6Cpo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SvTRL/9E; 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="SvTRL/9E" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6ACF4C2BCB8; Sun, 10 May 2026 13:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421358; bh=rmDupBOctIJ9BKC2nX3b3eQmWjMWgjh9aoXPYqNNTOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SvTRL/9E2WMo2CU4KU1DpiM+fNYf06eQFb4Bk/0BeN/63va5BvvKmVMgw+j19bdMs jtxMqXqDzc9gWaNW5PkIFHqX0z0HIXMTAJ90tikpfsvAnINK4ayvmaVjV9n7kwmHeW lIjfWBkCiqHfp9EbY6D4nwKUHXW4yV/P37jlHH8X6EYVSQdqz7gLvr/rKkh8AxMykB +av2+0VgzgY0nhe/veyCAUno/Uzn5/4xaQpCzNfLhQyI8D1LgBhpbt3v5uzSMEpIxv kF3VIb5224P2fx4WgndwSVy+SU131GuBVXRZMNtkuJRnUwlW4XifgEx9Ywdq+looct ThVlg6BCxMZTQ== 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 v2 02/10] sh: mm: remove numa.c Date: Sun, 10 May 2026 16:55:38 +0300 Message-ID: <20260510135546.13554-3-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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 Sat Jun 13 04:46:06 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 0CAFE393DD3; Sun, 10 May 2026 13:56:01 +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=1778421362; cv=none; b=PciXrFd6DEx4rF00+vbDwbvSOxZqUr0Rk3WU8xWAf1Abwm9tcwRYpTjLZamSgHyWNle2RlOe1ImOjKYcQ59jkADcmXUC8T/9Tkm1bDC+89lATdAB90JA+7dGf6duEHmsu5V1YDiQpKX8Jdf9YJQBqKGGsc7+34yginVuTrftxQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421362; c=relaxed/simple; bh=WNlS5KGrIJ+SWL3ygZxbK8TC+u2LpU5BV2wDLG+l528=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cTjVsSM00cWVEFeZIINP81+ZRwq0rQEaIP1GLByjUyHY2RI1tepHVliQRYjUX11bafx82mGEWaMYWvLI6zCMtw3LKPrPIbrCsFGjRI/TIr/bfUVNTfeBA48kPvbSCpQ/T5UiS36oP0q5ouGMBI0TWo4PTumU2Q/ZTrvzzERIHJo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hSTcgZez; 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="hSTcgZez" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40020C2BCF6; Sun, 10 May 2026 13:55:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421361; bh=WNlS5KGrIJ+SWL3ygZxbK8TC+u2LpU5BV2wDLG+l528=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hSTcgZez3XaeIhho7n2WGZSw5ABZYpJb3CKZ/rAqnXrtO0MIpNrAxyuhKqWOD5Kfv +VgBo46B0FClBf5tp4aMp06e20vNNhdW9oMvJsug9CXmZRVQSQhDwhABqwJfrQfuiV znV3YflG3hryHFJA6hphn5XsLailKa12XTgfUV1c/hzHReDzjiZ8c/xDRAvmhbTWoF TpdOTYkJ9kZoihSll0cZPECdaBxNsB1CzSeBLzzsPJe6jEm0B1CApA7JWpl7i/fRkT MWzgM+qVbSDg0941TFQ4FumG/Ss6VLzWhWy2OhaODhm4wDwpvlOF/CqEd8AMTerhpk +P/4yh9Wyf/Gw== 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 v2 03/10] sh: mm: drop allocate_pgdat() Date: Sun, 10 May 2026 16:55:39 +0300 Message-ID: <20260510135546.13554-4-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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 4e40d5e96be9..d73179116184 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 Sat Jun 13 04:46:06 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 E997E393DE9; Sun, 10 May 2026 13:56:04 +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=1778421365; cv=none; b=QhFvBDiVDsQr5abw/Gz1BpGtBTDht/sfPN4LPAFTC/K8o9neWQYfPa7KjLFNp1H8jv6b89ifTuOqwGrwJHWjEtNVic7pn0Cpo4fD5Cxnvjs53lrvhPXNtMhDtno+ld/QSMBrcfUCUieRN/6xdj8/EreHjiob0yFOgs9kWbAnlAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421365; c=relaxed/simple; bh=t+0t9hvA3tabF5jUso2oxhF2AbVitxrNZunjEKj5M/A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nPSC2iiEOtBmzoS4+zp1cSWzoqWTegjzsQsO9kcxVioYhIX9ng5MNP7SuzOl3xEbUTCCk85ibkRQoQddIfzLYKu44Tp9ydTPc6U3PmoQ67AJnZdO9LjcXuXumQ0k+xM8ZL/Dp5OKLTDbMy7w2VPCX4nRPlGST+IHGDHM0/zYxR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gQT2Wxjs; 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="gQT2Wxjs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26E1DC2BCC9; Sun, 10 May 2026 13:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421364; bh=t+0t9hvA3tabF5jUso2oxhF2AbVitxrNZunjEKj5M/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQT2Wxjs4v+g/nPjbC7YXF9SenInlURoMPi3uzxYo7W5Le0rVdc9n3EIL1+/cQZUr 561KxpXO5Y26QutNzT5arFgo6r6ReQOx2gamBfrrRcn5VnEHddYpCpMZ1LGs8K3UKT cWsNOpCJ8xbFeu8apFhOlUuU9btobZmlBjFnDqG/lUaVAwUxMAZitvKNOBHtzJvi+m nikzGApHg82ZELNIa5YmnCZW/u6AeADKG1ZKulXcnRN7/Pl9X69AigP0Uhsx7KkbJv 2bzwkflILNYftHh4qooLcKI02gkezN6m87CY1R4I9wRCvgnCB9Jbf36OYGK44utkAt TJedGoYX6b+OA== 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 v2 04/10] sh: remove setup_bootmem_node() and plat_mem_setup() Date: Sun, 10 May 2026 16:55:40 +0300 Message-ID: <20260510135546.13554-5-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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 d73179116184..84dff240b113 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 Sat Jun 13 04:46:06 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 A860F393DE9; Sun, 10 May 2026 13:56:07 +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=1778421367; cv=none; b=l8IYjH/Rh/ERBh7v/1WxC8ZCzuRbhI5OjeAqE0Kgtfjr+OJQd8WY0yXx3LCVXhEvU8UgEPiJhzNto1XZvocw9dCJwTLtfkdV4L3qZIEhRLTJtTXlM+qBpjRAXY/R6e2j+TV1pZrdcPTUROMU5DRpdCi3ySRBc5IhBDO0ZckwwVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421367; c=relaxed/simple; bh=dCoYxGOmCvzNhzjVc8kfAvk/FtIfCDilY+5h2I/R/so=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gNNqX2v3ICqQ+D+xqbMP4U2QHzWMX5ZslUOs5qVIG565oHE2Yjiqa/P5HqvldgyXeBtJjEZXvlVDn7Z4Nol8yLbmtPqb9rriw0bkNZ3CS6qRcewTGLTuV8kDgygHL1j8EHlhjjerm8KOlUhzfhwc8ZImBuGoB+3fKwsxXV3UqNQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LJiJvlCO; 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="LJiJvlCO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1742C2BCB8; Sun, 10 May 2026 13:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421367; bh=dCoYxGOmCvzNhzjVc8kfAvk/FtIfCDilY+5h2I/R/so=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LJiJvlCO8M1yDT6WaVcgoIJeHuqMRPpPOUmfiaZrdRiTsYe+YX2GCCv4d1fpVG8GY kjiiB0csgEuGBHXDVfwnizB5RZdeUb+8gXF34ze5wqBpvOZBojAKWJea/7UdakW05V iJ5PTNxuJ2apxYWH+tPz2kYr3xcgufwqPnuYV3N7Zuf2QrPSpTqEhApom3cKSlFUi4 IMRgeOOjjhOiU1TMigmEaDREIRrciAuxNDVIzL/cf+/mgjFL+F4gmG6ZSlZtVN0v3I QeKxKII98zvcZsikSgqaZFIVJZBiUWh8bNUyDbLUQB1BsNJujk8unyWBNnJSk3cX0y tLfpWxvPZnzvA== 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 v2 05/10] sh: drop dead code guarded by #ifdef CONFIG_NUMA Date: Sun, 10 May 2026 16:55:41 +0300 Message-ID: <20260510135546.13554-6-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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 Sat Jun 13 04:46:06 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 7DBA2393DE9; Sun, 10 May 2026 13:56:10 +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=1778421370; cv=none; b=QujqOCWdjTR9MSMEOAjCpBe317BqwuGJDlruNFMclXroW4YZ1FqdskNYl7OgiU7k6egaZXEIQvXvVvr3LomLAd0TdBlKuKMCOlkCHq8K1jXAL0wO/D63p1ilFA5Gseq9G0XxHxYfJgn2u9lhhG7JH+QEbjtAryYut9zKAeukr64= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421370; c=relaxed/simple; bh=ORqM0QrkLzkJER/HT4hgO46YxIS+mifkv/+oCy4Jx5o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hNXXPl9GXktLSswAcfQRxj6qN/YjepB6j8Sc8nCl9isi9mUKJIVFehoB2CGBxDAKx+rJlJPsIIU/24IAmF1NXIvED0M1AhvBg7Cex7H/G6Kv+9IwLpN3+TOl+jZOPNzeWYmua5qR016rE9m79KJWsc8y+Vhn3a+Do/oZHvFmu8w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lkjhb+Kz; 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="lkjhb+Kz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7128C2BCB8; Sun, 10 May 2026 13:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421370; bh=ORqM0QrkLzkJER/HT4hgO46YxIS+mifkv/+oCy4Jx5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lkjhb+KzBsRVhs6ypLJdhI0vd1VIapxsl0KqeH5qNGBl1Wlzy5tAeaPJJl8IqIRXo xdQgfGEBeR6d+hx3Ch87FdBKxD92GW6wFq5wbHhUp0bEkY7ry97K7odnffqcCjcFWD wq/iWrJrnbPQknsRvo7JvxVknki3AKYehUJuKIWMRxQamDP/188t48SvnAvrMNYZZl 0j6AeuA9KnwHwk0Pi/pFVPyV8sIL9yC6JPuw+u1w5dbkBrT93rwR+kuV9ogvw3bzRm KN2KgP9LvBZWKGAMmiRSR2HvpwRqv6f/icPQp5PhkAFl4F+Opip9bXJtOlE0INj21J XJsj81xrrA1pQ== 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 v2 06/10] sh: drop include/asm/mmzone.h Date: Sun, 10 May 2026 16:55:42 +0300 Message-ID: <20260510135546.13554-7-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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 Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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 63c9efc06348..ad9470359d61 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h @@ -24,4 +24,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 84dff240b113..cb4b26485f4b 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 Sat Jun 13 04:46:06 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 409013988E1; Sun, 10 May 2026 13:56:13 +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=1778421373; cv=none; b=V4jGp96DxiB7bCUJvFkDstEFXDxxbucAZKie+fxKsZ1JDqy/iOBPoMU4TnytqNm38K5Qbahk3JQkuhPSYQBafsag5F2YeDrGYhQXa7gH83DZFoMWhmavonXYLrJJf6ESvCq8Fq5y1htyk4d3wWWSJ3vZmWRcI98QTiep9YUfvqQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421373; c=relaxed/simple; bh=tkwfagRVJukzEnsyKj09sXQJAa9mnqv0b5T/g9FZs3U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Djce75XsmLUVvFHvH0ldFQrqzj8QhnUPs6/Wskz3zRrmDi7wQSuK17MC2ZVZKlxBq2Yfag/HojovTHexqBwdgQSEGVMODjtn8EM4qNDyMDvF7zn8v4J78fz+yxzW5bJyHiU+HSHo1nHMcRfHuIWkHleOodjcNdiVjPKxZiCYTe8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KD0dsLZQ; 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="KD0dsLZQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C20DC2BCC9; Sun, 10 May 2026 13:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421372; bh=tkwfagRVJukzEnsyKj09sXQJAa9mnqv0b5T/g9FZs3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KD0dsLZQY4aolmkr1gau+yr6NpTDiaJQ4wLWAigE+m0YYMN8BL86IHL7HAz9P3MAq zTKtMaLddQ0wGCkvdp4K36xZLTLHNgd1OnYz5mEeakDh6geUhW/6h9JwnR01/2uWtk w9e869Jc7W+ew7iLIiXkHfqfJmwZczH7IQUnoINX0pzfosswBCWg6PtMhY4GKSkeRL QXbd67mSE5PIuP8u2Kcq+PryQmE+t72JP6eaL8PUO63xYQJKbXvNL60rNIuB4IFe7l 66BMMFIQCLb/eydQhhPfZUNT3ylau2HS6ctxUMwYvRjOCzrd/lThU/8zLgOQEzXIkT hlrk2CL1XoWuA== 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 v2 07/10] init/Kconfig: drop ARCH_WANT_NUMA_VARIABLE_LOCALITY Date: Sun, 10 May 2026 16:55:43 +0300 Message-ID: <20260510135546.13554-8-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- init/Kconfig | 7 ------- 1 file changed, 7 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 2937c4d308ae..33337fde1197 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1001,16 +1001,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 Sat Jun 13 04:46:06 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 20A32396587; Sun, 10 May 2026 13:56:15 +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=1778421376; cv=none; b=toEffk3iKGYLlQzXx9gzncMLU4Ipq040H4LVFcKvh8vCIcQzxOuqJaAT1rzb4fyLGBoTphrXF3epUczh2nTAUUGOlRyzuQp8ZzRGFq9bM6AFQyifGaKHfMJVTqkK3Dd/a+fH3hvKp10v9zCuuTMJyLjHo/Qj8ss5tKWzTM5qiLA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421376; c=relaxed/simple; bh=IdEPlXw4dkMVbwrrWqpYiCW1jHNUxW961O1EvYNalsE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SzIkhKzVmiwzUhUCNcvxCOwUzqUP62r4wDhyYEqfyXSCDVEXv87fF39cmUozAaIwl4Pa7eQmtoOcBxUeh3rulkch4fzOHx1avihQATPRmfU/JgKE1YUrmeqAPmthb88dvWQ0ibnI3CjIQVlhlmTOSpxTrrncHx3D8rUEi4jvSJg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qTx6zCQ5; 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="qTx6zCQ5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 712DAC2BCC9; Sun, 10 May 2026 13:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421375; bh=IdEPlXw4dkMVbwrrWqpYiCW1jHNUxW961O1EvYNalsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qTx6zCQ5dh4qEwZhqFS99kQ5etYMSIjj7tuTxSW9d8G0j3zKW3JMWXRROevWzF2+o WVEzflU7g2gZvElHmKuzMOT1DuJUWKMpAGPLOYagNzJf5+bM3r1BYbns7L08gj4z3m zbzuff/MucIrEeU2n0sqfJfsTPivTlYUOHxedwJRwUKXn8YLH/7gLLN/F8Vg3YSGBX 9iVA1KwQhEtECeQVIjj3uzhSAOtpgEBmOENTVcEuiUGSXe/L55ozKCofEEfZgG4IOk wqJVrRPOmoITukBYPBVQhgz/jaKAye+sx1R/wL8qHMQ2cSeQRfa2XQfRxv6p6zFhSA bmRFv31RUcjIA== 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 v2 08/10] sh: init: remove call the memblock_set_node() Date: Sun, 10 May 2026 16:55:44 +0300 Message-ID: <20260510135546.13554-9-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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 Sat Jun 13 04:46:06 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 F09BC396587; Sun, 10 May 2026 13:56:18 +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=1778421379; cv=none; b=Vyyuw21fR3S+KWrBoToZV3kJ9tkXscHX76/KRLQkwkRcEoxYGV65WnuOG9Ik6cpu3WvIXOCRVAbUGWjxUKtz315XkglNbDLOtuDepDwL4UK4SxrVokboKl+c2ZeF9Ew9w62z/K5dhnw+hCppHiYHec8IeVch10Q6RokSqNerccg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421379; c=relaxed/simple; bh=AJnDtX1NJ4+f7zL2d6aAAQhuSPiHbmuimqf/ugSMF3Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IhGFWGabYsKt9r4C9IWkYxKa4uGVCnqYYMK7urk1yMvYxPof2s4mVfgw5o6bq6/ebFQsVq5gnLVSBcYKk4nmZnIz9RNtz4lUBBE7OBvMrOs4ena3Hv1ly1JRFHUnYHF0oqWJnLfodL1tTdqAl+MxhjjL+0JgVliVa8kAPIoCugE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QtlkZWfV; 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="QtlkZWfV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46639C2BCB8; Sun, 10 May 2026 13:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421378; bh=AJnDtX1NJ4+f7zL2d6aAAQhuSPiHbmuimqf/ugSMF3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QtlkZWfV2M2zpY3Roc5bD1Ovu5EmRn5/cjlJxaY1+jEMkio4OOZ5MD1BI6bqiUUyJ umf3xT2Cznkv6XmDamvYgZ3kAqftzhfiEOkozxhDkF5bBSt2vISedirn4gA6vaHrdj DfNvXHmadpqFZMDOtqyh23mXxhJx39ymj4ugcy7YMbMSb4S5AQkHjUS2WbnHa8xIuZ 9vtgcVIPE2eah4akGVOU/WF7P0nL5IIlnRZbxt4muptfKZf7ZmDTGjEO3d0hDZHokk Am/dYEuKMgsGbau39DH5vG46GuVBNIDAl+BcO/+7fBPWGKjASRtBYFxGOW/AFOdL7e hX6xBUHSVVYkA== 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 v2 09/10] sh: remove SPARSEMEM related entries from Kconfig Date: Sun, 10 May 2026 16:55:45 +0300 Message-ID: <20260510135546.13554-10-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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. Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- arch/sh/Kconfig | 6 ------ arch/sh/mm/Kconfig | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d0ba91eba71a..ec50072a6f22 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -386,7 +386,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 @@ -397,7 +396,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 @@ -438,7 +436,6 @@ config CPU_SUBTYPE_SH7785 bool "Support SH7785 processor" select CPU_SH4A select CPU_SHX2 - select ARCH_SPARSEMEM_ENABLE select PINCTRL =20 config CPU_SUBTYPE_SH7786 @@ -472,7 +469,6 @@ config CPU_SUBTYPE_SH7722 select CPU_SH4AL_DSP select CPU_SHX2 select ARCH_SHMOBILE - select ARCH_SPARSEMEM_ENABLE select SYS_SUPPORTS_SH_CMT select PINCTRL =20 @@ -481,8 +477,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 Sat Jun 13 04:46:06 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 81FBE396B68; Sun, 10 May 2026 13:56:21 +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=1778421381; cv=none; b=puBWysRDNcki3rwtljG6QrsM8aj5Dq0EBKoXrh8CKNZZ3mazVB03JuXH/auCTiP6ae1EFmFJ1loJWyjyIjfJAGIG1t1dTUAcWlEg6WI9Y2pRnGgs9i0NkBNZsEAD5K2km2yJLiBU9jktlpVYVj+1Vpbe42KhWLpH5tDvLcbnNuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778421381; c=relaxed/simple; bh=FmPjppYqmtQ/uCHJ2PqO1Z7RqOhpoVQASPz+LWTt2U4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qEKPANrDKIfQJtgsIuucuyJGQbp7mKQETotam6CxQIv1e8O+cFYPlfiM0hrkRUtxTrbKw3/3NrZkoGP925dGGzJPnWfNw7GPoceTsaKxK4j81oZ1gpjOpu/lptym5KI5pQmpdnJCZQh24c4JDBOdwYecxv+kqyIlO5BMjl5LfVw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y9CIBPRs; 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="Y9CIBPRs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BC5EC2BCB8; Sun, 10 May 2026 13:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778421381; bh=FmPjppYqmtQ/uCHJ2PqO1Z7RqOhpoVQASPz+LWTt2U4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y9CIBPRsZwQvXiffEJfhuKEtVBvOPUiu+xxmZSpQoK2RCxhlOdidlPjYaH2ztd7u5 KyX78ObrKB+rGxIqadOoTOVCkVEN/1PmRcQ4vWb8SHzANQKzON+YmsBOZQIpGVbMDt w79lF9elbmc2lpNeM9axwfznH2tej84bXIflsCl46luttE5qr4Ul22mGHi8miKHIV2 eoluVt5KARwhPmLaJaAXB6tnQbWswiOkJNYLte4V5mBwd4+dAw7Ekd0uwip5XSj0bN NcBxOb1iKa2n8j0f+FYBkaH+UpYBoNUPp1NrJC1Z4UdY8GhWCN3paZ5B8dA1icDTTc seOWZKHxZa7dQ== 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 v2 10/10] sh: drop include/asm/sparsemem.h Date: Sun, 10 May 2026 16:55:46 +0300 Message-ID: <20260510135546.13554-11-rppt@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260510135546.13554-1-rppt@kernel.org> References: <20260510135546.13554-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 Reviewed-by: Arnd Bergmann Signed-off-by: Mike Rapoport (Microsoft) --- 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