arm64: Fix building error with 16KB pages and 36-bit VA
[cascardo/linux.git] / arch / arm64 / include / asm / pgtable.h
index a440f5a..16438dd 100644 (file)
@@ -395,7 +395,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
 #define pmd_sect(pmd)          ((pmd_val(pmd) & PMD_TYPE_MASK) == \
                                 PMD_TYPE_SECT)
 
-#ifdef CONFIG_ARM64_64K_PAGES
+#if defined(CONFIG_ARM64_64K_PAGES) || CONFIG_PGTABLE_LEVELS < 3
 #define pud_sect(pud)          (0)
 #define pud_table(pud)         (1)
 #else