aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Li <liwei391@huawei.com>2021-06-29 22:14:20 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-14 16:56:32 +0200
commitd8c1504cf1a0cd71b0619aaf3176c6f81ca3af60 (patch)
tree09800dba992df4896a746c66338a0783883a7722
parenta23ba98e91ffda5a1dc84bd904fe698002f96474 (diff)
downloadkernel_replicant_linux-d8c1504cf1a0cd71b0619aaf3176c6f81ca3af60.tar.gz
kernel_replicant_linux-d8c1504cf1a0cd71b0619aaf3176c6f81ca3af60.tar.bz2
kernel_replicant_linux-d8c1504cf1a0cd71b0619aaf3176c6f81ca3af60.zip
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>
-rw-r--r--arch/mips/include/asm/highmem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/highmem.h b/arch/mips/include/asm/highmem.h
index f1f788b57166..9f021cf51aa7 100644
--- a/arch/mips/include/asm/highmem.h
+++ b/arch/mips/include/asm/highmem.h
@@ -36,7 +36,7 @@ extern pte_t *pkmap_page_table;
* easily, subsequent pte tables have to be allocated in one physical
* chunk of RAM.
*/
-#ifdef CONFIG_PHYS_ADDR_T_64BIT
+#if defined(CONFIG_PHYS_ADDR_T_64BIT) || defined(CONFIG_MIPS_HUGE_TLB_SUPPORT)
#define LAST_PKMAP 512
#else
#define LAST_PKMAP 1024