| diff -up ./arch/x86/include/asm/pgtable.h.pud ./arch/x86/include/asm/pgtable.h |
| |
| |
| @@ -216,6 +216,7 @@ static inline int pud_trans_splitting(pu |
| return pud_val(pud) & _PAGE_SPLITTING; |
| } |
| |
| +#define __HAVE_ARCH_PUD_TRANS_HUGE |
| static inline int pud_trans_huge(pud_t pud) |
| { |
| return (pud_val(pud) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE; |
| @@ -234,6 +235,7 @@ static inline int pmd_devmap(pmd_t pmd) |
| } |
| #endif |
| |
| +#define __HAVE_ARCH_PUD_DEVMAP |
| #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD |
| static inline int pud_devmap(pud_t pud) |
| { |
| @@ -1033,6 +1035,7 @@ static inline int pmd_write(pmd_t pmd) |
| #if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \ |
| (defined(CONFIG_TRANSPARENT_HUGEPAGE) && \ |
| !defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD)) |
| +#define __HAVE_ARCH_PUD_TRANS_HUGE |
| static inline int pud_trans_huge(pud_t pud) |
| { |
| return 0; |
| diff -up ./include/asm-generic/pgtable.h.pud ./include/asm-generic/pgtable.h |
| |
| |
| @@ -629,10 +629,12 @@ static inline int pmd_trans_splitting(pm |
| { |
| return 0; |
| } |
| +# ifndef __HAVE_ARCH_PUD_TRANS_HUGE |
| static inline int pud_trans_huge(pud_t pud) |
| { |
| return 0; |
| } |
| +# endif |
| static inline int pud_trans_splitting(pud_t pud) |
| { |
| return 0; |
| @@ -656,10 +658,12 @@ static inline int pud_write(pud_t pud) |
| #if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \ |
| (defined(CONFIG_TRANSPARENT_HUGEPAGE) && \ |
| !defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD)) |
| +# ifndef __HAVE_ARCH_PUD_TRANS_HUGE |
| static inline int pud_trans_huge(pud_t pud) |
| { |
| return 0; |
| } |
| +# endif |
| #endif |
| |
| #ifndef pmd_read_atomic |
| diff -up ./include/linux/mm.h.pud ./include/linux/mm.h |
| |
| |
| @@ -380,10 +380,12 @@ static inline int pmd_devmap(pmd_t pmd) |
| { |
| return 0; |
| } |
| +# ifndef __HAVE_ARCH_PUD_DEVMAP |
| static inline int pud_devmap(pud_t pud) |
| { |
| return 0; |
| } |
| +# endif |
| #endif |
| |
| /* |