diff options
author | Huang Pei <huangpei@loongson.cn> | 2021-07-26 15:26:42 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-28 11:12:18 +0200 |
commit | 70f73eea5a4f1847c3aa72fe07cd0ea5836ecabe (patch) | |
tree | a7a2ac6ba87eb42e6f49a1ce3b0f0a957fe44e34 /arch/mips | |
parent | 75d02bceb2ee714185fcf69b28b3394d6c62c8ee (diff) | |
download | linux-stable-70f73eea5a4f1847c3aa72fe07cd0ea5836ecabe.tar.gz linux-stable-70f73eea5a4f1847c3aa72fe07cd0ea5836ecabe.tar.bz2 linux-stable-70f73eea5a4f1847c3aa72fe07cd0ea5836ecabe.zip |
Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
This reverts commit 920a42d8b854b1f112aef97a21f0549918889442 which is
commit commit ed914d48b6a1040d1039d371b56273d422c0081e upstream.
Commit b2b29d6d011944 (mm: account PMD tables like PTE tables) is
introduced between v5.9 and v5.10, so this fix (commit 002d8b395fa1)
should NOT apply to any pre-5.10 branch.
Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/pgalloc.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h index f800872f867b..39b9f311c4ef 100644 --- a/arch/mips/include/asm/pgalloc.h +++ b/arch/mips/include/asm/pgalloc.h @@ -93,15 +93,11 @@ do { \ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { - pmd_t *pmd = NULL; - struct page *pg; + pmd_t *pmd; - pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER); - if (pg) { - pgtable_pmd_page_ctor(pg); - pmd = (pmd_t *)page_address(pg); + pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER); + if (pmd) pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); - } return pmd; } |