arch, mm: move definition of node_data to generic code
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Wed, 7 Aug 2024 06:40:51 +0000 (09:40 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Sep 2024 04:15:28 +0000 (21:15 -0700)
commit46bcce503197d1019ee5c49ccde978e31298e35f
tree5908848e8922362990dc09780ad0f713c41c3827
parent3ac9999c5d6f73f17e55ea360934def7f59b2890
arch, mm: move definition of node_data to generic code

Every architecture that supports NUMA defines node_data in the same way:

struct pglist_data *node_data[MAX_NUMNODES];

No reason to keep multiple copies of this definition and its forward
declarations, especially when such forward declaration is the only thing
in include/asm/mmzone.h for many architectures.

Add definition and declaration of node_data to generic code and drop
architecture-specific versions.

Link: https://lkml.kernel.org/r/20240807064110.1003856-8-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Tested-by: Zi Yan <ziy@nvidia.com> # for x86_64 and arm64
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> [arm64 + CXL via QEMU]
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Rob Herring (Arm) <robh@kernel.org>
Cc: Samuel Holland <samuel.holland@sifive.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
32 files changed:
arch/arm64/include/asm/Kbuild
arch/arm64/include/asm/mmzone.h [deleted file]
arch/arm64/include/asm/topology.h
arch/loongarch/include/asm/Kbuild
arch/loongarch/include/asm/mmzone.h [deleted file]
arch/loongarch/include/asm/topology.h
arch/loongarch/kernel/numa.c
arch/mips/include/asm/mach-ip27/mmzone.h
arch/mips/include/asm/mach-loongson64/mmzone.h
arch/mips/loongson64/numa.c
arch/mips/sgi-ip27/ip27-memory.c
arch/powerpc/include/asm/mmzone.h
arch/powerpc/mm/numa.c
arch/riscv/include/asm/Kbuild
arch/riscv/include/asm/mmzone.h [deleted file]
arch/riscv/include/asm/topology.h
arch/s390/include/asm/Kbuild
arch/s390/include/asm/mmzone.h [deleted file]
arch/s390/kernel/numa.c
arch/sh/include/asm/mmzone.h
arch/sh/mm/numa.c
arch/sparc/include/asm/mmzone.h
arch/sparc/mm/init_64.c
arch/x86/include/asm/Kbuild
arch/x86/include/asm/mmzone.h [deleted file]
arch/x86/include/asm/mmzone_32.h [deleted file]
arch/x86/include/asm/mmzone_64.h [deleted file]
arch/x86/mm/numa.c
drivers/base/arch_numa.c
include/asm-generic/mmzone.h [new file with mode: 0644]
include/linux/numa.h
mm/numa.c