summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-03-12 14:18:03 (GMT)
committerVineet Gupta <vgupta@synopsys.com>2015-10-17 12:18:18 (GMT)
commit6ce187985f31c441f7fc10a4d265182d05bc7ad3 (patch)
treeb37614fc2ada22c7d9df19e923e299e1bcc6c940
parentfe6c1b8611aa3a79a937a5e3b85a16576b6ad159 (diff)
downloadlinux-6ce187985f31c441f7fc10a4d265182d05bc7ad3.tar.xz
ARCv2: mm: THP: boot validation/reporting
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/mm/tlb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c
index eb1bdc4..91905b1 100644
--- a/arch/arc/mm/tlb.c
+++ b/arch/arc/mm/tlb.c
@@ -736,7 +736,8 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
if (p_mmu->s_pg_sz_m)
scnprintf(super_pg, 64, "%dM Super Page%s, ",
- p_mmu->s_pg_sz_m, " (not used)");
+ p_mmu->s_pg_sz_m,
+ IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) ? "" : " (not used)");
n += scnprintf(buf + n, len - n,
"MMU [v%x]\t: %dk PAGE, %sJTLB %d (%dx%d), uDTLB %d, uITLB %d %s\n",
@@ -771,6 +772,11 @@ void arc_mmu_init(void)
if (mmu->pg_sz_k != TO_KB(PAGE_SIZE))
panic("MMU pg size != PAGE_SIZE (%luk)\n", TO_KB(PAGE_SIZE));
+ if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&
+ mmu->s_pg_sz_m != TO_MB(HPAGE_PMD_SIZE))
+ panic("MMU Super pg size != Linux HPAGE_PMD_SIZE (%luM)\n",
+ (unsigned long)TO_MB(HPAGE_PMD_SIZE));
+
/* Enable the MMU */
write_aux_reg(ARC_REG_PID, MMU_ENABLE);