@@ -186,6 +186,14 @@ config ARM64_3_LEVELS
endchoice
+config ARM64_VA_BITS
+ int "Virtual address space size"
+ range 39 39 if ARM64_4K_PAGES && ARM64_3_LEVELS
+ range 42 42 if ARM64_64K_PAGES && ARM64_2_LEVELS
+ help
+ This feature is determined by a combination of page size and
+ level of translation tables.
+
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
help
@@ -41,11 +41,7 @@
* The module space lives between the addresses given by TASK_SIZE
* and PAGE_OFFSET - it must be within 128MB of the kernel text.
*/
-#ifdef CONFIG_ARM64_64K_PAGES
-#define VA_BITS (42)
-#else
-#define VA_BITS (39)
-#endif
+#define VA_BITS (CONFIG_ARM64_VA_BITS)
#define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1))
#define MODULES_END (PAGE_OFFSET)
#define MODULES_VADDR (MODULES_END - SZ_64M)