]> git.ipfire.org Git - people/arne_f/kernel.git/commit
MIPS: add PMD table accounting into MIPS'pmd_alloc_one
authorHuang Pei <huangpei@loongson.cn>
Fri, 11 Jun 2021 07:09:46 +0000 (15:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 06:53:12 +0000 (08:53 +0200)
commit002d8b395fa1c0679fc3c3e68873de6c1cc300a2
tree414e9e8b2ca40a8bb7d561cfdf90f503cb543bcc
parente15cff87dff2852c894b7d8c09c157e8c2b867dc
MIPS: add PMD table accounting into MIPS'pmd_alloc_one

[ Upstream commit ed914d48b6a1040d1039d371b56273d422c0081e ]

This fixes Page Table accounting bug.

MIPS is the ONLY arch just defining __HAVE_ARCH_PMD_ALLOC_ONE alone.
Since commit b2b29d6d011944 (mm: account PMD tables like PTE tables),
"pmd_free" in asm-generic with PMD table accounting and "pmd_alloc_one"
in MIPS without PMD table accounting causes PageTable accounting number
negative, which read by global_zone_page_state(), always returns 0.

Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/include/asm/pgalloc.h