From 27ba3185f8092bae668e14ea85a5ad6162e07250 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 26 Jul 2021 09:48:16 +0200 Subject: [PATCH] 4.14-stable patches added patches: revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch --- ...e-accounting-into-mips-pmd_alloc_one.patch | 44 +++++++++++++++++++ queue-4.14/series | 1 + 2 files changed, 45 insertions(+) create mode 100644 queue-4.14/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch diff --git a/queue-4.14/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch b/queue-4.14/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch new file mode 100644 index 00000000000..b0a49229363 --- /dev/null +++ b/queue-4.14/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch @@ -0,0 +1,44 @@ +From huangpei@loongson.cn Mon Jul 26 09:44:23 2021 +From: Huang Pei +Date: Mon, 26 Jul 2021 15:26:42 +0800 +Subject: [PATCH] Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one" +To: Thomas Bogendoerfer , ambrosehua@gmail.com +Cc: Bibo Mao , stable@vger.kernel.org, Greg Kroah-Hartman , Jiaxun Yang , Li Xuefeng , Yang Tiezhu , Gao Juxin , Huacai Chen , Jinyang He +Message-ID: <20210726072642.551510-2-huangpei@loongson.cn> + +From: Huang Pei + +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 +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/include/asm/pgalloc.h | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +--- 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; + } + diff --git a/queue-4.14/series b/queue-4.14/series index 6a31c685fb6..1f88b1a8066 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -56,3 +56,4 @@ scsi-target-fix-protect-handling-in-write-same-32.patch spi-cadence-correct-initialisation-of-runtime-pm-aga.patch revert-usb-quirks-ignore-remote-wake-up-on-fibocom-l.patch proc-avoid-mixing-integer-types-in-mem_rw.patch +revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch -- 2.47.3