arm64: Convert bool ARM64_x_LEVELS to int ARM64_PGTABLE_LEVELS
[cascardo/linux.git] / arch / arm64 / include / asm / pgtable-hwdef.h
index 955e8c5..d453e8b 100644 (file)
 #ifndef __ASM_PGTABLE_HWDEF_H
 #define __ASM_PGTABLE_HWDEF_H
 
-#ifdef CONFIG_ARM64_64K_PAGES
+#if CONFIG_ARM64_PGTABLE_LEVELS == 2
 #include <asm/pgtable-2level-hwdef.h>
-#else
+#elif CONFIG_ARM64_PGTABLE_LEVELS == 3
 #include <asm/pgtable-3level-hwdef.h>
+#else
+#include <asm/pgtable-4level-hwdef.h>
 #endif
 
 /*
@@ -27,7 +29,7 @@
  *
  * Level 1 descriptor (PUD).
  */
-
+#define PUD_TYPE_TABLE         (_AT(pudval_t, 3) << 0)
 #define PUD_TABLE_BIT          (_AT(pgdval_t, 1) << 1)
 #define PUD_TYPE_MASK          (_AT(pgdval_t, 3) << 0)
 #define PUD_TYPE_SECT          (_AT(pgdval_t, 1) << 0)