1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2b8b572e1SStephen Rothwell #ifndef _ASM_POWERPC_SPARSEMEM_H 3b8b572e1SStephen Rothwell #define _ASM_POWERPC_SPARSEMEM_H 1 4b8b572e1SStephen Rothwell #ifdef __KERNEL__ 5b8b572e1SStephen Rothwell 6b8b572e1SStephen Rothwell #ifdef CONFIG_SPARSEMEM 7b8b572e1SStephen Rothwell /* 8b8b572e1SStephen Rothwell * SECTION_SIZE_BITS 2^N: how big each section will be 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 #endif /* CONFIG_SPARSEMEM */ 14b8b572e1SStephen Rothwell 15b8b572e1SStephen Rothwell #ifdef CONFIG_MEMORY_HOTPLUG 16b8b572e1SStephen Rothwell extern int remove_section_mapping(unsigned long start, unsigned long end); 17*a927bd6bSDan Williams extern int memory_add_physaddr_to_nid(u64 start); 18*a927bd6bSDan Williams #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid 1936b390fdSMichael Ellerman 20b8b572e1SStephen Rothwell #ifdef CONFIG_NUMA 21b8b572e1SStephen Rothwell extern int hot_add_scn_to_nid(unsigned long scn_addr); 22b8b572e1SStephen Rothwell #else hot_add_scn_to_nid(unsigned long scn_addr)23b8b572e1SStephen Rothwellstatic inline int hot_add_scn_to_nid(unsigned long scn_addr) 24b8b572e1SStephen Rothwell { 25b8b572e1SStephen Rothwell return 0; 26b8b572e1SStephen Rothwell } 27b8b572e1SStephen Rothwell #endif /* CONFIG_NUMA */ 28b8b572e1SStephen Rothwell #endif /* CONFIG_MEMORY_HOTPLUG */ 29b8b572e1SStephen Rothwell #endif /* __KERNEL__ */ 30b8b572e1SStephen Rothwell #endif /* _ASM_POWERPC_SPARSEMEM_H */ 31