Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

MIPS: sgi-ip27: make NODE_DATA() the same as on all other architectures

sgi-ip27 is the only system that defines NODE_DATA() differently than the
rest of NUMA machines.

Add node_data array of struct pglist pointers that will point to
__node_data[node]->pglist and redefine NODE_DATA() to use node_data array.

This will allow pulling declaration of node_data to the generic mm code in
the next commit.

Link: https://lkml.kernel.org/r/20240807064110.1003856-3-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> [arm64 + CXL via QEMU]
Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: David Hildenbrand <david@redhat.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>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Mike Rapoport (Microsoft) and committed by
Andrew Morton
bc5c8ad3 0e8b6798

+8 -2
+4 -1
arch/mips/include/asm/mach-ip27/mmzone.h
··· 22 22 23 23 extern struct node_data *__node_data[]; 24 24 25 - #define NODE_DATA(n) (&__node_data[(n)]->pglist) 26 25 #define hub_data(n) (&__node_data[(n)]->hub) 26 + 27 + extern struct pglist_data *node_data[]; 28 + 29 + #define NODE_DATA(nid) (node_data[nid]) 27 30 28 31 #endif /* _ASM_MACH_MMZONE_H */
+4 -1
arch/mips/sgi-ip27/ip27-memory.c
··· 34 34 #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) 35 35 #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) 36 36 37 - struct node_data *__node_data[MAX_NUMNODES]; 37 + struct pglist_data *node_data[MAX_NUMNODES]; 38 + EXPORT_SYMBOL(node_data); 38 39 40 + struct node_data *__node_data[MAX_NUMNODES]; 39 41 EXPORT_SYMBOL(__node_data); 40 42 41 43 static u64 gen_region_mask(void) ··· 363 361 */ 364 362 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); 365 363 memset(__node_data[node], 0, PAGE_SIZE); 364 + node_data[node] = &__node_data[node]->pglist; 366 365 367 366 NODE_DATA(node)->node_start_pfn = start_pfn; 368 367 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;