xref: /openbmc/linux/arch/riscv/include/asm/sparsemem.h (revision 7b7fd0ac7dc1ffcaf24d9bca0f051b0168e43cd4)
1d95f1a54SLogan Gunthorpe /* SPDX-License-Identifier: GPL-2.0 */
2d95f1a54SLogan Gunthorpe 
36b57ba8eSZong Li #ifndef _ASM_RISCV_SPARSEMEM_H
46b57ba8eSZong Li #define _ASM_RISCV_SPARSEMEM_H
5d95f1a54SLogan Gunthorpe 
6d95f1a54SLogan Gunthorpe #ifdef CONFIG_SPARSEMEM
73270bfdbSAlexandre Ghiti #ifdef CONFIG_64BIT
83270bfdbSAlexandre Ghiti #define MAX_PHYSMEM_BITS	56
93270bfdbSAlexandre Ghiti #else
10*30884833SPalmer Dabbelt #define MAX_PHYSMEM_BITS	32
113270bfdbSAlexandre Ghiti #endif /* CONFIG_64BIT */
12d95f1a54SLogan Gunthorpe #define SECTION_SIZE_BITS	27
13d95f1a54SLogan Gunthorpe #endif /* CONFIG_SPARSEMEM */
14d95f1a54SLogan Gunthorpe 
156b57ba8eSZong Li #endif /* _ASM_RISCV_SPARSEMEM_H */
16