linux/arch/sh
Mike Rapoport (Microsoft) 3515863d9f arch, mm: pull out allocation of NODE_DATA to generic code
Architectures that support NUMA duplicate the code that allocates
NODE_DATA on the node-local memory with slight variations in reporting of
the addresses where the memory was allocated.

Use x86 version as the basis for the generic alloc_node_data() function
and call this function in architecture specific numa initialization.

Round up node data size to SMP_CACHE_BYTES rather than to PAGE_SIZE like
x86 used to do since the bootmem era when allocation granularity was
PAGE_SIZE anyway.

Link: https://lkml.kernel.org/r/20240807064110.1003856-10-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>
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: Davidlohr Bueso <dave@stgolabs.net>
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>
2024-09-03 21:15:28 -07:00
..
boards mfd: tmio: Move header to platform_data 2024-07-09 10:40:29 +01:00
boot Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
cchips sh: hd64461: Make setup_hd64461() static 2024-03-21 12:17:35 +01:00
configs sh: config: Drop CONFIG_MEMORY_{HOTPLUG,HOTREMOVE} 2024-07-14 10:59:39 +02:00
drivers sh: push-switch: Add missing MODULE_DESCRIPTION() macro 2024-07-16 17:52:36 +02:00
include arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
kernel mm: remove legacy install_special_mapping() code 2024-09-01 20:26:13 -07:00
lib Revert "sh: Handle calling csum_partial with misaligned data" 2024-05-02 12:02:38 +02:00
math-emu sh: math-emu: Add missing #include <asm/fpu.h> 2024-05-02 12:01:24 +02:00
mm arch, mm: pull out allocation of NODE_DATA to generic code 2024-09-03 21:15:28 -07:00
tools
Kbuild sh: Move build rule for cchips/hd6446x/ to arch/sh/Kbuild 2023-07-05 18:55:18 +02:00
Kconfig sh: Drop support for memory hotplug and memory hotremove 2024-07-14 10:52:19 +02:00
Kconfig.cpu docs: move superh documentation under Documentation/arch/ 2023-03-30 13:00:35 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-10-25 16:50:30 +02:00
Makefile sh: Remove compiler flag duplication 2023-07-05 18:55:25 +02:00