From mboxrd@z Thu Jan 1 00:00:00 1970 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-sh@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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) --- 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 = 0; nid < MAX_NUMNODES; nid++) - if (pfn >= node_start_pfn(nid) && pfn <= 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); +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/sh4a/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 #include -#include #include #include diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/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 @@ #include #include -#include #include #include diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/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 #include diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/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 -#include #include static struct plat_sci_port scif2_platform_data = { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/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 diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/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 static struct plat_sci_port scif0_platform_data = { 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 /* 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 -- 2.53.0