Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85f993b8 authored by David Daney's avatar David Daney Committed by Ralf Baechle
Browse files

MIPS: Handle huge pages with 64KB base page size.



When using sparsemem, we need to adjust some constants as the resulting
huge pages are 512MB in size.

Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3745/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent daf76dbb
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -1786,10 +1786,12 @@ endchoice


config FORCE_MAX_ZONEORDER
config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	int "Maximum zone order"
	range 13 64 if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_32KB
	range 14 64 if HUGETLB_PAGE && PAGE_SIZE_64KB
	default "13" if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_32KB
	default "14" if HUGETLB_PAGE && PAGE_SIZE_64KB
	range 12 64 if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_16KB
	range 13 64 if HUGETLB_PAGE && PAGE_SIZE_32KB
	default "12" if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_16KB
	default "13" if HUGETLB_PAGE && PAGE_SIZE_32KB
	range 12 64 if HUGETLB_PAGE && PAGE_SIZE_16KB
	default "12" if HUGETLB_PAGE && PAGE_SIZE_16KB
	range 11 64
	range 11 64
	default "11"
	default "11"
	help
	help
+5 −1
Original line number Original line Diff line number Diff line
@@ -6,7 +6,11 @@
 * SECTION_SIZE_BITS		2^N: how big each section will be
 * SECTION_SIZE_BITS		2^N: how big each section will be
 * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
 * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
 */
 */
#if defined(CONFIG_HUGETLB_PAGE) && defined(CONFIG_PAGE_SIZE_64KB)
# define SECTION_SIZE_BITS	29
#else
# define SECTION_SIZE_BITS	28
# define SECTION_SIZE_BITS	28
#endif
#define MAX_PHYSMEM_BITS        35
#define MAX_PHYSMEM_BITS        35


#endif /* CONFIG_SPARSEMEM */
#endif /* CONFIG_SPARSEMEM */