The patch titled Subject: microblaze: switch to generic version of pte allocation has been added to the -mm tree. Its filename is microblaze-switch-to-generic-version-of-pte-allocation.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/microblaze-switch-to-generic-version-of-pte-allocation.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/microblaze-switch-to-generic-version-of-pte-allocation.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: Mike Rapoport <rppt@xxxxxxxxxxxxx> Subject: microblaze: switch to generic version of pte allocation The microblaze implementation of pte_alloc_one() has a provision to allocated PTEs from high memory, but neither CONFIG_HIGHPTE nor pte_map*() versions for suitable for HIGHPTE are defined. Except that, microblaze version of pte_alloc_one() is identical to the generic one as well as the implementations of pte_free() and pte_free_kernel(). Switch microblaze to use the generic versions of these functions. Also remove pte_free_slow() that is not referenced anywhere in the code. Link: http://lkml.kernel.org/r/1565690952-32158-1-git-send-email-rppt@xxxxxxxxxxxxx Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx> Acked-by: Mark Rutland <mark.rutland@xxxxxxx> Cc: Michal Simek <monstr@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/microblaze/include/asm/pgalloc.h | 39 +----------------------- 1 file changed, 3 insertions(+), 36 deletions(-) --- a/arch/microblaze/include/asm/pgalloc.h~microblaze-switch-to-generic-version-of-pte-allocation +++ a/arch/microblaze/include/asm/pgalloc.h @@ -21,6 +21,9 @@ #include <asm/cache.h> #include <asm/pgtable.h> +#define __HAVE_ARCH_PTE_ALLOC_ONE_KERNEL +#include <asm-generic/pgalloc.h> + extern void __bad_pte(pmd_t *pmd); static inline pgd_t *get_pgd(void) @@ -47,42 +50,6 @@ static inline void free_pgd(pgd_t *pgd) extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm); -static inline struct page *pte_alloc_one(struct mm_struct *mm) -{ - struct page *ptepage; - -#ifdef CONFIG_HIGHPTE - int flags = GFP_KERNEL | __GFP_ZERO | __GFP_HIGHMEM; -#else - int flags = GFP_KERNEL | __GFP_ZERO; -#endif - - ptepage = alloc_pages(flags, 0); - if (!ptepage) - return NULL; - if (!pgtable_page_ctor(ptepage)) { - __free_page(ptepage); - return NULL; - } - return ptepage; -} - -static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) -{ - free_page((unsigned long)pte); -} - -static inline void pte_free_slow(struct page *ptepage) -{ - __free_page(ptepage); -} - -static inline void pte_free(struct mm_struct *mm, struct page *ptepage) -{ - pgtable_page_dtor(ptepage); - __free_page(ptepage); -} - #define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte)) #define pmd_populate(mm, pmd, pte) \ _ Patches currently in -mm which might be from rppt@xxxxxxxxxxxxx are ia64-switch-to-generic-version-of-pte-allocation.patch sh-switch-to-generic-version-of-pte-allocation.patch microblaze-switch-to-generic-version-of-pte-allocation.patch mm-use-cpu_bits_none-to-initialize-init_mmcpu_bitmask.patch mm-madvise-reduce-code-duplication-in-error-handling-paths.patch