diff mbox series

[v3,04/26] MIPS: sgi-ip27: drop HAVE_ARCH_NODEDATA_EXTENSION

Message ID 20240801060826.559858-5-rppt@kernel.org (mailing list archive)
State New
Headers show
Series mm: introduce numa_memblks | expand

Commit Message

Mike Rapoport Aug. 1, 2024, 6:08 a.m. UTC
From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>

Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to sgi-ip27 to silence a
compilation error that happened because sgi-ip27 didn't define array of
pg_data_t as node_data like most other architectures did.

After addition of node_data array that matches other architectures and
after ensuring that offline nodes do not appear on node_possible_map, it
is safe to drop arch_alloc_nodedata() and HAVE_ARCH_NODEDATA_EXTENSION
from sgi-ip27.

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
 arch/mips/Kconfig                |  1 -
 arch/mips/sgi-ip27/ip27-memory.c | 10 ----------
 2 files changed, 11 deletions(-)

Comments

Jonathan Cameron Aug. 1, 2024, 5:45 p.m. UTC | #1
On Thu,  1 Aug 2024 09:08:04 +0300
Mike Rapoport <rppt@kernel.org> wrote:

> From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> 
> Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
> sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to sgi-ip27 to silence a
> compilation error that happened because sgi-ip27 didn't define array of
> pg_data_t as node_data like most other architectures did.
> 
> After addition of node_data array that matches other architectures and
> after ensuring that offline nodes do not appear on node_possible_map, it
> is safe to drop arch_alloc_nodedata() and HAVE_ARCH_NODEDATA_EXTENSION
> from sgi-ip27.
> 
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  arch/mips/Kconfig                |  1 -
>  arch/mips/sgi-ip27/ip27-memory.c | 10 ----------
>  2 files changed, 11 deletions(-)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 60077e576935..ea5f3c3c31f6 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -735,7 +735,6 @@ config SGI_IP27
>  	select WAR_R10000_LLSC
>  	select MIPS_L1_CACHE_SHIFT_7
>  	select NUMA
> -	select HAVE_ARCH_NODEDATA_EXTENSION
>  	help
>  	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
>  	  workstations.  To compile a Linux kernel that runs on these, say Y
> diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
> index c30ef6958b97..eb6d2fa41a8a 100644
> --- a/arch/mips/sgi-ip27/ip27-memory.c
> +++ b/arch/mips/sgi-ip27/ip27-memory.c
> @@ -426,13 +426,3 @@ void __init mem_init(void)
>  	memblock_free_all();
>  	setup_zero_pages();	/* This comes from node 0 */
>  }
> -
> -pg_data_t * __init arch_alloc_nodedata(int nid)
> -{
> -	return memblock_alloc(sizeof(pg_data_t), SMP_CACHE_BYTES);
> -}
> -
> -void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
> -{
> -	__node_data[nid] = (struct node_data *)pgdat;
> -}
David Hildenbrand Aug. 6, 2024, 1:06 p.m. UTC | #2
On 01.08.24 08:08, Mike Rapoport wrote:
> From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> 
> Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
> sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to sgi-ip27 to silence a
> compilation error that happened because sgi-ip27 didn't define array of
> pg_data_t as node_data like most other architectures did.
> 
> After addition of node_data array that matches other architectures and
> after ensuring that offline nodes do not appear on node_possible_map, it
> is safe to drop arch_alloc_nodedata() and HAVE_ARCH_NODEDATA_EXTENSION
> from sgi-ip27.
> 
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---

Acked-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 60077e576935..ea5f3c3c31f6 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -735,7 +735,6 @@  config SGI_IP27
 	select WAR_R10000_LLSC
 	select MIPS_L1_CACHE_SHIFT_7
 	select NUMA
-	select HAVE_ARCH_NODEDATA_EXTENSION
 	help
 	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
 	  workstations.  To compile a Linux kernel that runs on these, say Y
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index c30ef6958b97..eb6d2fa41a8a 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -426,13 +426,3 @@  void __init mem_init(void)
 	memblock_free_all();
 	setup_zero_pages();	/* This comes from node 0 */
 }
-
-pg_data_t * __init arch_alloc_nodedata(int nid)
-{
-	return memblock_alloc(sizeof(pg_data_t), SMP_CACHE_BYTES);
-}
-
-void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
-{
-	__node_data[nid] = (struct node_data *)pgdat;
-}