MIPS: Fix PKMAP with 32-bit MIPS huge page support
authorWei Li <liwei391@huawei.com>
Tue, 29 Jun 2021 14:14:20 +0000 (22:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:32 +0000 (16:56 +0200)
commitd8c1504cf1a0cd71b0619aaf3176c6f81ca3af60
tree09800dba992df4896a746c66338a0783883a7722
parenta23ba98e91ffda5a1dc84bd904fe698002f96474
MIPS: Fix PKMAP with 32-bit MIPS huge page support

[ Upstream commit cf02ce742f09188272bcc8b0e62d789eb671fc4c ]

When 32-bit MIPS huge page support is enabled, we halve the number of
pointers a PTE page holds, making its last half go to waste.
Correspondingly, we should halve the number of kmap entries, as we just
initialized only a single pte table for that in pagetable_init().

Fixes: 35476311e529 ("MIPS: Add partial 32-bit huge page support")
Signed-off-by: Wei Li <liwei391@huawei.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/include/asm/highmem.h