imperfectism / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
e293be
diff -up ./arch/x86/include/asm/pgtable.h.pud ./arch/x86/include/asm/pgtable.h
e293be
--- ./arch/x86/include/asm/pgtable.h.pud	2018-04-15 20:52:06.000000000 +0900
e293be
+++ ./arch/x86/include/asm/pgtable.h	2018-04-15 20:59:16.000000000 +0900
e293be
@@ -216,6 +216,7 @@ static inline int pud_trans_splitting(pu
e293be
 	return pud_val(pud) & _PAGE_SPLITTING;
e293be
 }
e293be
 
e293be
+#define __HAVE_ARCH_PUD_TRANS_HUGE
e293be
 static inline int pud_trans_huge(pud_t pud)
e293be
 {
e293be
 	return (pud_val(pud) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE;
e293be
@@ -234,6 +235,7 @@ static inline int pmd_devmap(pmd_t pmd)
e293be
 }
e293be
 #endif
e293be
 
e293be
+#define __HAVE_ARCH_PUD_DEVMAP
e293be
 #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
e293be
 static inline int pud_devmap(pud_t pud)
e293be
 {
e293be
@@ -1033,6 +1035,7 @@ static inline int pmd_write(pmd_t pmd)
e293be
 #if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \
e293be
 	(defined(CONFIG_TRANSPARENT_HUGEPAGE) && \
e293be
 	 !defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD))
e293be
+#define __HAVE_ARCH_PUD_TRANS_HUGE
e293be
 static inline int pud_trans_huge(pud_t pud)
e293be
 {
e293be
 	return 0;
e293be
diff -up ./include/asm-generic/pgtable.h.pud ./include/asm-generic/pgtable.h
e293be
--- ./include/asm-generic/pgtable.h.pud	2018-03-22 06:40:12.000000000 +0900
e293be
+++ ./include/asm-generic/pgtable.h	2018-04-15 20:53:45.000000000 +0900
e293be
@@ -629,10 +629,12 @@ static inline int pmd_trans_splitting(pm
e293be
 {
e293be
 	return 0;
e293be
 }
e293be
+# ifndef __HAVE_ARCH_PUD_TRANS_HUGE
e293be
 static inline int pud_trans_huge(pud_t pud)
e293be
 {
e293be
 	return 0;
e293be
 }
e293be
+# endif
e293be
 static inline int pud_trans_splitting(pud_t pud)
e293be
 {
e293be
 	return 0;
e293be
@@ -656,10 +658,12 @@ static inline int pud_write(pud_t pud)
e293be
 #if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \
e293be
 	(defined(CONFIG_TRANSPARENT_HUGEPAGE) && \
e293be
 	 !defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD))
e293be
+# ifndef __HAVE_ARCH_PUD_TRANS_HUGE
e293be
 static inline int pud_trans_huge(pud_t pud)
e293be
 {
e293be
 	return 0;
e293be
 }
e293be
+# endif
e293be
 #endif
e293be
 
e293be
 #ifndef pmd_read_atomic
e293be
diff -up ./include/linux/mm.h.pud ./include/linux/mm.h
e293be
--- ./include/linux/mm.h.pud	2018-04-15 21:00:18.000000000 +0900
e293be
+++ ./include/linux/mm.h	2018-04-15 20:59:43.000000000 +0900
e293be
@@ -380,10 +380,12 @@ static inline int pmd_devmap(pmd_t pmd)
e293be
 {
e293be
 	return 0;
e293be
 }
e293be
+# ifndef __HAVE_ARCH_PUD_DEVMAP
e293be
 static inline int pud_devmap(pud_t pud)
e293be
 {
e293be
 	return 0;
e293be
 }
e293be
+# endif
e293be
 #endif
e293be
 
e293be
 /*