1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_MMZONE_H
3 #define __ASM_SH_MMZONE_H
6 #include <linux/numa.h>
8 static inline int pfn_to_nid(unsigned long pfn
)
12 for (nid
= 0; nid
< MAX_NUMNODES
; nid
++)
13 if (pfn
>= node_start_pfn(nid
) && pfn
<= node_end_pfn(nid
))
19 static inline struct pglist_data
*pfn_to_pgdat(unsigned long pfn
)
21 return NODE_DATA(pfn_to_nid(pfn
));
24 /* arch/sh/mm/numa.c */
25 void __init
setup_bootmem_node(int nid
, unsigned long start
, unsigned long end
);
28 setup_bootmem_node(int nid
, unsigned long start
, unsigned long end
)
31 #endif /* CONFIG_NUMA */
33 /* Platform specific mem init */
34 void __init
plat_mem_setup(void);
36 /* arch/sh/kernel/setup.c */
37 void __init
__add_active_range(unsigned int nid
, unsigned long start_pfn
,
38 unsigned long end_pfn
);
39 /* arch/sh/mm/init.c */
40 void __init
allocate_pgdat(unsigned int nid
);
42 #endif /* __ASM_SH_MMZONE_H */