diff mbox series

[v2,1/3] mm: Move PMD_ORDER to pgtable.h

Message ID 20230818202335.2739663-2-willy@infradead.org (mailing list archive)
State New
Headers show
Series Change calling convention for ->huge_fault | expand

Commit Message

Matthew Wilcox Aug. 18, 2023, 8:23 p.m. UTC
Allow this to be used in generic code.  Also add PUD_ORDER.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/dax.c                | 3 ---
 include/linux/pgtable.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/dax.c b/fs/dax.c
index 906ecbd541a3..88bb13643117 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -49,9 +49,6 @@  static inline unsigned int pe_order(enum page_entry_size pe_size)
 #define PG_PMD_COLOUR	((PMD_SIZE >> PAGE_SHIFT) - 1)
 #define PG_PMD_NR	(PMD_SIZE >> PAGE_SHIFT)
 
-/* The order of a PMD entry */
-#define PMD_ORDER	(PMD_SHIFT - PAGE_SHIFT)
-
 static wait_queue_head_t wait_table[DAX_WAIT_TABLE_ENTRIES];
 
 static int __init init_dax_wait_table(void)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index db4fe642b3e2..cb5c1fad1078 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -5,6 +5,9 @@ 
 #include <linux/pfn.h>
 #include <asm/pgtable.h>
 
+#define PMD_ORDER	(PMD_SHIFT - PAGE_SHIFT)
+#define PUD_ORDER	(PUD_SHIFT - PAGE_SHIFT)
+
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_MMU