On 16.07.24 13:13, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)" <r...@kernel.org>
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.
Signed-off-by: Mike Rapoport (Microsoft) <r...@kernel.org>
---
arch/arm64/include/asm/Kbuild | 1 +
arch/arm64/include/asm/mmzone.h | 13 -------------
arch/arm64/include/asm/topology.h | 1 +
arch/loongarch/include/asm/Kbuild | 1 +
arch/loongarch/include/asm/mmzone.h | 16 ----------------
arch/loongarch/include/asm/topology.h | 1 +
arch/loongarch/kernel/numa.c | 3 ---
arch/mips/include/asm/mach-ip27/mmzone.h | 4 ----
arch/mips/include/asm/mach-loongson64/mmzone.h | 4 ----
arch/mips/loongson64/numa.c | 2 --
arch/mips/sgi-ip27/ip27-memory.c | 3 ---
arch/powerpc/include/asm/mmzone.h | 6 ------
arch/powerpc/mm/numa.c | 2 --
arch/riscv/include/asm/Kbuild | 1 +
arch/riscv/include/asm/mmzone.h | 13 -------------
arch/riscv/include/asm/topology.h | 4 ++++
arch/s390/include/asm/Kbuild | 1 +
arch/s390/include/asm/mmzone.h | 17 -----------------
arch/s390/kernel/numa.c | 3 ---
arch/sh/include/asm/mmzone.h | 3 ---
arch/sh/mm/numa.c | 3 ---
arch/sparc/include/asm/mmzone.h | 4 ----
arch/sparc/mm/init_64.c | 2 --
arch/x86/include/asm/Kbuild | 1 +
arch/x86/include/asm/mmzone.h | 6 ------
arch/x86/include/asm/mmzone_32.h | 17 -----------------
arch/x86/include/asm/mmzone_64.h | 18 ------------------
arch/x86/mm/numa.c | 3 ---
drivers/base/arch_numa.c | 2 --
include/asm-generic/mmzone.h | 5 +++++
include/linux/numa.h | 3 +++
mm/numa.c | 3 +++
32 files changed, 22 insertions(+), 144 deletions(-)
delete mode 100644 arch/arm64/include/asm/mmzone.h
delete mode 100644 arch/loongarch/include/asm/mmzone.h
delete mode 100644 arch/riscv/include/asm/mmzone.h
delete mode 100644 arch/s390/include/asm/mmzone.h
delete mode 100644 arch/x86/include/asm/mmzone.h
delete mode 100644 arch/x86/include/asm/mmzone_32.h
delete mode 100644 arch/x86/include/asm/mmzone_64.h
create mode 100644 include/asm-generic/mmzone.h
Nice!
Acked-by: David Hildenbrand <da...@redhat.com>
--
Cheers,
David / dhildenb