summaryrefslogtreecommitdiff
path: root/arch/mips/include
diff options
context:
space:
mode:
authorHuang Pei <huangpei@loongson.cn>2021-07-26 10:26:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-28 12:13:49 +0300
commit2e207001ef2446dc282a14f4fabc10dd135fc1d6 (patch)
treeb2efbd25a27dfa2704ee78f4a2ed5f5f60a55187 /arch/mips/include
parent66bcd449e04c2530d9859ff628d2596658bcf825 (diff)
downloadlinux-2e207001ef2446dc282a14f4fabc10dd135fc1d6.tar.xz
Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
This reverts commit 68046cc531577b8f0ebe67ccf18b9c70106d7937 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 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/include')
-rw-r--r--arch/mips/include/asm/pgalloc.h10
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;
}