* [PATCH RESEND] MIPS: Fix PKMAP with 32-bit MIPS huge page support
@ 2021-06-29 14:14 Wei Li
2021-06-30 12:42 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Wei Li @ 2021-06-29 14:14 UTC (permalink / raw)
To: Thomas Bogendoerfer, Thomas Gleixner, Andrew Morton,
Paul Cercueil, Daniel Silsby, Paul Burton
Cc: linux-mips, linux-kernel, huawei.libin
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>
---
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..92a380210017 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
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] MIPS: Fix PKMAP with 32-bit MIPS huge page support
2021-06-29 14:14 [PATCH RESEND] MIPS: Fix PKMAP with 32-bit MIPS huge page support Wei Li
@ 2021-06-30 12:42 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-06-30 12:42 UTC (permalink / raw)
To: Wei Li
Cc: Thomas Gleixner, Andrew Morton, Paul Cercueil, Daniel Silsby,
Paul Burton, linux-mips, linux-kernel, huawei.libin
On Tue, Jun 29, 2021 at 10:14:20PM +0800, Wei Li wrote:
> 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>
> ---
> arch/mips/include/asm/highmem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-30 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 14:14 [PATCH RESEND] MIPS: Fix PKMAP with 32-bit MIPS huge page support Wei Li
2021-06-30 12:42 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®