1b8b572e1SStephen Rothwell #ifndef _ASM_POWERPC_SPARSEMEM_H
2b8b572e1SStephen Rothwell #define _ASM_POWERPC_SPARSEMEM_H 1
3b8b572e1SStephen Rothwell #ifdef __KERNEL__
4b8b572e1SStephen Rothwell 
5b8b572e1SStephen Rothwell #ifdef CONFIG_SPARSEMEM
6b8b572e1SStephen Rothwell /*
7b8b572e1SStephen Rothwell  * SECTION_SIZE_BITS		2^N: how big each section will be
8b8b572e1SStephen Rothwell  * MAX_PHYSADDR_BITS		2^N: how much physical address space we have
9b8b572e1SStephen Rothwell  * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
10b8b572e1SStephen Rothwell  */
11b8b572e1SStephen Rothwell #define SECTION_SIZE_BITS       24
12b8b572e1SStephen Rothwell 
13b8b572e1SStephen Rothwell #define MAX_PHYSADDR_BITS       44
14b8b572e1SStephen Rothwell #define MAX_PHYSMEM_BITS        44
15b8b572e1SStephen Rothwell 
16b8b572e1SStephen Rothwell #endif /* CONFIG_SPARSEMEM */
17b8b572e1SStephen Rothwell 
18b8b572e1SStephen Rothwell #ifdef CONFIG_MEMORY_HOTPLUG
19b8b572e1SStephen Rothwell extern void create_section_mapping(unsigned long start, unsigned long end);
20b8b572e1SStephen Rothwell extern int remove_section_mapping(unsigned long start, unsigned long end);
21b8b572e1SStephen Rothwell #ifdef CONFIG_NUMA
22b8b572e1SStephen Rothwell extern int hot_add_scn_to_nid(unsigned long scn_addr);
23b8b572e1SStephen Rothwell #else
24b8b572e1SStephen Rothwell static inline int hot_add_scn_to_nid(unsigned long scn_addr)
25b8b572e1SStephen Rothwell {
26b8b572e1SStephen Rothwell 	return 0;
27b8b572e1SStephen Rothwell }
28b8b572e1SStephen Rothwell #endif /* CONFIG_NUMA */
29b8b572e1SStephen Rothwell #endif /* CONFIG_MEMORY_HOTPLUG */
30b8b572e1SStephen Rothwell 
31b8b572e1SStephen Rothwell #endif /* __KERNEL__ */
32b8b572e1SStephen Rothwell #endif /* _ASM_POWERPC_SPARSEMEM_H */
33