xref: /OK3568_Linux_fs/kernel/arch/powerpc/include/asm/sparsemem.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef _ASM_POWERPC_SPARSEMEM_H
3*4882a593Smuzhiyun #define _ASM_POWERPC_SPARSEMEM_H 1
4*4882a593Smuzhiyun #ifdef __KERNEL__
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #ifdef CONFIG_SPARSEMEM
7*4882a593Smuzhiyun /*
8*4882a593Smuzhiyun  * SECTION_SIZE_BITS		2^N: how big each section will be
9*4882a593Smuzhiyun  * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
10*4882a593Smuzhiyun  */
11*4882a593Smuzhiyun #define SECTION_SIZE_BITS       24
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #endif /* CONFIG_SPARSEMEM */
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #ifdef CONFIG_MEMORY_HOTPLUG
16*4882a593Smuzhiyun extern int remove_section_mapping(unsigned long start, unsigned long end);
17*4882a593Smuzhiyun extern int memory_add_physaddr_to_nid(u64 start);
18*4882a593Smuzhiyun #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #ifdef CONFIG_NUMA
21*4882a593Smuzhiyun extern int hot_add_scn_to_nid(unsigned long scn_addr);
22*4882a593Smuzhiyun #else
hot_add_scn_to_nid(unsigned long scn_addr)23*4882a593Smuzhiyun static inline int hot_add_scn_to_nid(unsigned long scn_addr)
24*4882a593Smuzhiyun {
25*4882a593Smuzhiyun 	return 0;
26*4882a593Smuzhiyun }
27*4882a593Smuzhiyun #endif /* CONFIG_NUMA */
28*4882a593Smuzhiyun #endif /* CONFIG_MEMORY_HOTPLUG */
29*4882a593Smuzhiyun #endif /* __KERNEL__ */
30*4882a593Smuzhiyun #endif /* _ASM_POWERPC_SPARSEMEM_H */
31