xref: /openbmc/linux/arch/ia64/include/asm/sparsemem.h (revision de3a9980)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_IA64_SPARSEMEM_H
3 #define _ASM_IA64_SPARSEMEM_H
4 
5 #ifdef CONFIG_SPARSEMEM
6 #include <asm/page.h>
7 /*
8  * SECTION_SIZE_BITS            2^N: how big each section will be
9  * MAX_PHYSMEM_BITS             2^N: how much memory we can have in that space
10  */
11 
12 #define SECTION_SIZE_BITS	(30)
13 #define MAX_PHYSMEM_BITS	(50)
14 #ifdef CONFIG_FORCE_MAX_ZONEORDER
15 #if ((CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS)
16 #undef SECTION_SIZE_BITS
17 #define SECTION_SIZE_BITS (CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT)
18 #endif
19 #endif
20 
21 #endif /* CONFIG_SPARSEMEM */
22 
23 #ifdef CONFIG_MEMORY_HOTPLUG
24 int memory_add_physaddr_to_nid(u64 addr);
25 #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
26 #endif
27 
28 #endif /* _ASM_IA64_SPARSEMEM_H */
29