Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: fix PMD pages allocation by restoring pmd_alloc_one()

Commit 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one()
and pmd_free_one()") converted parisc to use generic version of
pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
PMD.

Restore the original version of pmd_alloc_one() for parisc, just use
GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
memset.

Fixes: 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mike Rapoport and committed by
Linus Torvalds
6f6aea7e 4b6c093e

+6
+6
arch/parisc/include/asm/pgalloc.h
··· 10 10 11 11 #include <asm/cache.h> 12 12 13 + #define __HAVE_ARCH_PMD_ALLOC_ONE 13 14 #define __HAVE_ARCH_PMD_FREE 14 15 #define __HAVE_ARCH_PGD_FREE 15 16 #include <asm-generic/pgalloc.h> ··· 66 65 { 67 66 set_pud(pud, __pud((PxD_FLAG_PRESENT | PxD_FLAG_VALID) + 68 67 (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT))); 68 + } 69 + 70 + static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) 71 + { 72 + return (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER); 69 73 } 70 74 71 75 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)