Skip to contentSkip to conversation

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

PATCH New David Daney 1 participant 1 message May 4, 2012 MIPS

lore
Share & tools
lore
#0 lore raw

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

From: David Daney <[email protected]>

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

---
 arch/mips/Kconfig                 |   10 ++++++----
 arch/mips/include/asm/sparsemem.h |    6 +++++-
 2 files changed, 11 insertions(+), 5 deletions(-)
arch/mips/Kconfig +6 -4
index 3134457..e588610 100644
@@ -1789,10 +1789,12 @@ endchoice
 
 config FORCE_MAX_ZONEORDER
 	int "Maximum zone order"
-	range 13 64 if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_32KB
-	default "13" if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_32KB
-	range 12 64 if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_16KB
-	default "12" if SYS_SUPPORTS_HUGETLBFS && PAGE_SIZE_16KB
+	range 14 64 if HUGETLB_PAGE && PAGE_SIZE_64KB
+	default "14" if HUGETLB_PAGE && PAGE_SIZE_64KB
+	range 13 64 if HUGETLB_PAGE && PAGE_SIZE_32KB
+	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
 	default "11"
 	help
arch/mips/include/asm/sparsemem.h +5 -1
index 7165333..4461198 100644
@@ -6,7 +6,11 @@
  * 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
  */
-#define SECTION_SIZE_BITS       28
+#if defined(CONFIG_HUGETLB_PAGE) && defined(CONFIG_PAGE_SIZE_64KB)
+# define SECTION_SIZE_BITS	29
+#else
+# define SECTION_SIZE_BITS	28
+#endif
 #define MAX_PHYSMEM_BITS        35
 
 #endif /* CONFIG_SPARSEMEM */
Signature · 1 line
1.7.2.3