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

Configure Feed

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

at v6.14-rc2 42 lines 970 B view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __ASM_SH_MMZONE_H 3#define __ASM_SH_MMZONE_H 4 5#ifdef CONFIG_NUMA 6#include <linux/numa.h> 7 8static inline int pfn_to_nid(unsigned long pfn) 9{ 10 int nid; 11 12 for (nid = 0; nid < MAX_NUMNODES; nid++) 13 if (pfn >= node_start_pfn(nid) && pfn <= node_end_pfn(nid)) 14 break; 15 16 return nid; 17} 18 19static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn) 20{ 21 return NODE_DATA(pfn_to_nid(pfn)); 22} 23 24/* arch/sh/mm/numa.c */ 25void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end); 26#else 27static inline void 28setup_bootmem_node(int nid, unsigned long start, unsigned long end) 29{ 30} 31#endif /* CONFIG_NUMA */ 32 33/* Platform specific mem init */ 34void __init plat_mem_setup(void); 35 36/* arch/sh/kernel/setup.c */ 37void __init __add_active_range(unsigned int nid, unsigned long start_pfn, 38 unsigned long end_pfn); 39/* arch/sh/mm/init.c */ 40void __init allocate_pgdat(unsigned int nid); 41 42#endif /* __ASM_SH_MMZONE_H */