[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210629090405.1228030-1-liwei391@huawei.com>
Date: Tue, 29 Jun 2021 17:04:05 +0800
From: Wei Li <liwei391@...wei.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Paul Cercueil <paul@...pouillou.net>,
Daniel Silsby <dansilsby@...il.com>,
Paul Burton <paulburton@...nel.org>
CC: <linux-mips@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<huawei.libin@...wei.com>
Subject: [PATCH] MIPS: Fix PKMAP with 32-bit MIPS huge page support
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@...wei.com>
---
arch/mips/include/asm/highmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/highmem.h b/arch/mips/include/asm/highmem.h
index 292d0425717f..bf82e67869fa 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
+#ifdef CONFIG_PHYS_ADDR_T_64BIT || CONFIG_MIPS_HUGE_TLB_SUPPORT
#define LAST_PKMAP 512
#else
#define LAST_PKMAP 1024
--
2.25.1
Powered by blists - more mailing lists