summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/sparsemem.h
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2012-05-04 11:09:35 -0700
committerRalf Baechle <ralf@linux-mips.org>2012-05-15 17:47:02 +0200
commit85f993b807f9e7c843934493559fab430f8d989e (patch)
tree7960c6cae07fbece64ff1edccd74b4bf3e2c6fc4 /arch/mips/include/asm/sparsemem.h
parentdaf76dbbb09f3937e71e9ef6d8fa68b306281d84 (diff)
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: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3745/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/sparsemem.h')
-rw-r--r--arch/mips/include/asm/sparsemem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/include/asm/sparsemem.h b/arch/mips/include/asm/sparsemem.h
index 7165333ad04..4461198361c 100644
--- a/arch/mips/include/asm/sparsemem.h
+++ b/arch/mips/include/asm/sparsemem.h
@@ -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 */