The patch titled Subject: arm64-mm-implement-pte_devmap-support-fix has been added to the -mm tree. Its filename is arm64-mm-implement-pte_devmap-support-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/arm64-mm-implement-pte_devmap-support-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/arm64-mm-implement-pte_devmap-support-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Robin Murphy <robin.murphy@xxxxxxx> Subject: arm64-mm-implement-pte_devmap-support-fix fix to build correctly under all combinations of CONFIG_PGTABLE_LEVELS and CONFIG_TRANSPARENT_HUGEPAGE Link: http://lkml.kernel.org/r/13026c4e64abc17133bbfa07d7731ec6691c0bcd.1559050949.git.robin.murphy@xxxxxxx Signed-off-by: Robin Murphy <robin.murphy@xxxxxxx> Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Ira Weiny <ira.weiny@xxxxxxxxx> Cc: Jerome Glisse <jglisse@xxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Oliver O'Halloran <oohall@xxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arm64/include/asm/pgtable.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) --- a/arch/arm64/include/asm/pgtable.h~arm64-mm-implement-pte_devmap-support-fix +++ a/arch/arm64/include/asm/pgtable.h @@ -387,7 +387,9 @@ static inline int pmd_protnone(pmd_t pmd #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) +#ifdef CONFIG_TRANSPARENT_HUGEPAGE #define pmd_devmap(pmd) pte_devmap(pmd_pte(pmd)) +#endif #define pmd_mkdevmap(pmd) pte_pmd(pte_mkdevmap(pmd_pte(pmd))) #define __pmd_to_phys(pmd) __pte_to_phys(pmd_pte(pmd)) @@ -546,11 +548,6 @@ static inline phys_addr_t pud_page_paddr return __pud_to_phys(pud); } -static inline int pud_devmap(pud_t pud) -{ - return 0; -} - /* Find an entry in the second-level page table. */ #define pmd_index(addr) (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) @@ -638,11 +635,6 @@ static inline phys_addr_t pgd_page_paddr #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) -static inline int pgd_devmap(pgd_t pgd) -{ - return 0; -} - /* to find an entry in a page-table-directory */ #define pgd_index(addr) (((addr) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) @@ -685,6 +677,16 @@ static inline int pmdp_set_access_flags( { return ptep_set_access_flags(vma, address, (pte_t *)pmdp, pmd_pte(entry), dirty); } + +static inline int pud_devmap(pud_t pud) +{ + return 0; +} + +static inline int pgd_devmap(pgd_t pgd) +{ + return 0; +} #endif /* _ Patches currently in -mm which might be from robin.murphy@xxxxxxx are mm-memremap-rename-and-consolidate-section_size.patch mm-clean-up-is_device__page-definitions.patch mm-introduce-arch_has_pte_devmap.patch arm64-mm-implement-pte_devmap-support.patch arm64-mm-implement-pte_devmap-support-fix.patch