]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
authorHuang Pei <huangpei@loongson.cn>
Mon, 26 Jul 2021 07:26:42 +0000 (15:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 11:30:58 +0000 (13:30 +0200)
This reverts commit c07fc7ec831f12ad1573a21e1f470f4871c17ee1 which is
commit ed914d48b6a1040d1039d371b56273d422c0081e upstream.

Commit b2b29d6d011944 (mm: account PMD tables like PTE tables) is
introduced between v5.9 and v5.10, so this fix (commit c07fc7ec831f)
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>
arch/mips/include/asm/pgalloc.h

index dd10854321cac60a6416a38e7f5ce3fe9373256e..166842337eb2c1155f479f0157553a440c21a701 100644 (file)
@@ -62,15 +62,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;
 }