xref: /openbmc/linux/arch/powerpc/include/asm/mmzone.h (revision 87832e937c808a7ebc41254b408362e3255c87c9)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2b8b572e1SStephen Rothwell /*
3b8b572e1SStephen Rothwell  * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
4b8b572e1SStephen Rothwell  *
5b8b572e1SStephen Rothwell  * PowerPC64 port:
6b8b572e1SStephen Rothwell  * Copyright (C) 2002 Anton Blanchard, IBM Corp.
7b8b572e1SStephen Rothwell  */
8b8b572e1SStephen Rothwell #ifndef _ASM_MMZONE_H_
9b8b572e1SStephen Rothwell #define _ASM_MMZONE_H_
10b8b572e1SStephen Rothwell #ifdef __KERNEL__
11b8b572e1SStephen Rothwell 
1217ad6ea6SStephen Rothwell #include <linux/cpumask.h>
13b8b572e1SStephen Rothwell 
14b8b572e1SStephen Rothwell /*
15b8b572e1SStephen Rothwell  * generic non-linear memory support:
16b8b572e1SStephen Rothwell  *
17b8b572e1SStephen Rothwell  * 1) we will not split memory into more chunks than will fit into the
18b8b572e1SStephen Rothwell  *    flags field of the struct page
19b8b572e1SStephen Rothwell  */
20b8b572e1SStephen Rothwell 
21*a9ee6cf5SMike Rapoport #ifdef CONFIG_NUMA
22b8b572e1SStephen Rothwell 
23b8b572e1SStephen Rothwell extern struct pglist_data *node_data[];
24b8b572e1SStephen Rothwell /*
25b8b572e1SStephen Rothwell  * Return a pointer to the node data for node n.
26b8b572e1SStephen Rothwell  */
27b8b572e1SStephen Rothwell #define NODE_DATA(nid)		(node_data[nid])
28b8b572e1SStephen Rothwell 
29b8b572e1SStephen Rothwell /*
30b8b572e1SStephen Rothwell  * Following are specific to this numa platform.
31b8b572e1SStephen Rothwell  */
32b8b572e1SStephen Rothwell 
33b8b572e1SStephen Rothwell extern int numa_cpu_lookup_table[];
3425863de0SAnton Blanchard extern cpumask_var_t node_to_cpumask_map[];
35b8b572e1SStephen Rothwell #ifdef CONFIG_MEMORY_HOTPLUG
36b8b572e1SStephen Rothwell extern unsigned long max_pfn;
37cd34206eSNishanth Aravamudan u64 memory_hotplug_max(void);
38cd34206eSNishanth Aravamudan #else
39cd34206eSNishanth Aravamudan #define memory_hotplug_max() memblock_end_of_DRAM()
40b8b572e1SStephen Rothwell #endif
41b8b572e1SStephen Rothwell 
42cd34206eSNishanth Aravamudan #else
43cd34206eSNishanth Aravamudan #define memory_hotplug_max() memblock_end_of_DRAM()
44*a9ee6cf5SMike Rapoport #endif /* CONFIG_NUMA */
45b8b572e1SStephen Rothwell 
46b8b572e1SStephen Rothwell #endif /* __KERNEL__ */
47b8b572e1SStephen Rothwell #endif /* _ASM_MMZONE_H_ */
48