162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _ASM_POWERPC_SPARSEMEM_H
362306a36Sopenharmony_ci#define _ASM_POWERPC_SPARSEMEM_H 1
462306a36Sopenharmony_ci#ifdef __KERNEL__
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#ifdef CONFIG_SPARSEMEM
762306a36Sopenharmony_ci/*
862306a36Sopenharmony_ci * SECTION_SIZE_BITS		2^N: how big each section will be
962306a36Sopenharmony_ci * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
1062306a36Sopenharmony_ci */
1162306a36Sopenharmony_ci#define SECTION_SIZE_BITS       24
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#endif /* CONFIG_SPARSEMEM */
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#ifdef CONFIG_MEMORY_HOTPLUG
1662306a36Sopenharmony_ciextern int remove_section_mapping(unsigned long start, unsigned long end);
1762306a36Sopenharmony_ciextern int memory_add_physaddr_to_nid(u64 start);
1862306a36Sopenharmony_ci#define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#ifdef CONFIG_NUMA
2162306a36Sopenharmony_ciextern int hot_add_scn_to_nid(unsigned long scn_addr);
2262306a36Sopenharmony_ci#else
2362306a36Sopenharmony_cistatic inline int hot_add_scn_to_nid(unsigned long scn_addr)
2462306a36Sopenharmony_ci{
2562306a36Sopenharmony_ci	return 0;
2662306a36Sopenharmony_ci}
2762306a36Sopenharmony_ci#endif /* CONFIG_NUMA */
2862306a36Sopenharmony_ci#endif /* CONFIG_MEMORY_HOTPLUG */
2962306a36Sopenharmony_ci#endif /* __KERNEL__ */
3062306a36Sopenharmony_ci#endif /* _ASM_POWERPC_SPARSEMEM_H */
31