xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/sparsemem.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef _MIPS_SPARSEMEM_H
3*4882a593Smuzhiyun #define _MIPS_SPARSEMEM_H
4*4882a593Smuzhiyun #ifdef CONFIG_SPARSEMEM
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun /*
7*4882a593Smuzhiyun  * SECTION_SIZE_BITS		2^N: how big each section will be
8*4882a593Smuzhiyun  * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun #if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB)
11*4882a593Smuzhiyun # define SECTION_SIZE_BITS	29
12*4882a593Smuzhiyun #else
13*4882a593Smuzhiyun # define SECTION_SIZE_BITS	28
14*4882a593Smuzhiyun #endif
15*4882a593Smuzhiyun #define MAX_PHYSMEM_BITS	48
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #endif /* CONFIG_SPARSEMEM */
18*4882a593Smuzhiyun #endif /* _MIPS_SPARSEMEM_H */
19