[PATCH 2/2] arm64/mm: Use CONT_SHIFT to define CONT_PTE_SHIFT
Gavin Shan
gshan at redhat.com
Tue Sep 8 03:19:31 EDT 2020
The macro CONT_PTE_SHIFT actually depends on CONT_SHIFT, which has
been defined in page-def.h, based on CONFIG_ARM64_CONT_SHIFT. Lets
reflect the dependency.
Signed-off-by: Gavin Shan <gshan at redhat.com>
---
arch/arm64/include/asm/pgtable-hwdef.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
index 8a399e666837..0bd9469f4323 100644
--- a/arch/arm64/include/asm/pgtable-hwdef.h
+++ b/arch/arm64/include/asm/pgtable-hwdef.h
@@ -81,14 +81,12 @@
/*
* Contiguous page definitions.
*/
+#define CONT_PTE_SHIFT (CONT_SHIFT + PAGE_SHIFT)
#ifdef CONFIG_ARM64_64K_PAGES
-#define CONT_PTE_SHIFT (5 + PAGE_SHIFT)
#define CONT_PMD_SHIFT (5 + PMD_SHIFT)
#elif defined(CONFIG_ARM64_16K_PAGES)
-#define CONT_PTE_SHIFT (7 + PAGE_SHIFT)
#define CONT_PMD_SHIFT (5 + PMD_SHIFT)
#else
-#define CONT_PTE_SHIFT (4 + PAGE_SHIFT)
#define CONT_PMD_SHIFT (4 + PMD_SHIFT)
#endif
--
2.23.0
More information about the linux-arm-kernel
mailing list