xref: /openbmc/linux/arch/arm/include/asm/sparsemem.h (revision a9ff6961)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
24baa9922SRussell King #ifndef ASMARM_SPARSEMEM_H
34baa9922SRussell King #define ASMARM_SPARSEMEM_H
44baa9922SRussell King 
5*a9ff6961SLinus Walleij #include <asm/page.h>
64baa9922SRussell King 
707f841b7SRussell King /*
807f841b7SRussell King  * Two definitions are required for sparsemem:
907f841b7SRussell King  *
1007f841b7SRussell King  * MAX_PHYSMEM_BITS: The number of physical address bits required
1107f841b7SRussell King  *   to address the last byte of memory.
1207f841b7SRussell King  *
1307f841b7SRussell King  * SECTION_SIZE_BITS: The number of physical address bits to cover
1407f841b7SRussell King  *   the maximum amount of memory in a section.
1507f841b7SRussell King  *
1607f841b7SRussell King  * Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000,
1707f841b7SRussell King  * then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26.
1807f841b7SRussell King  *
19db57f88eSKevin Cernekee  * These can be overridden in your mach/memory.h.
2007f841b7SRussell King  */
21db57f88eSKevin Cernekee #if !defined(MAX_PHYSMEM_BITS) || !defined(SECTION_SIZE_BITS)
22db57f88eSKevin Cernekee #define MAX_PHYSMEM_BITS	36
23db57f88eSKevin Cernekee #define SECTION_SIZE_BITS	28
2407f841b7SRussell King #endif
254baa9922SRussell King 
264baa9922SRussell King #endif
27