Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@huawei.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Wei Li and committed by
Thomas Bogendoerfer
cf02ce74 34c522a0

+1 -1
+1 -1
arch/mips/include/asm/highmem.h
··· 36 36 * easily, subsequent pte tables have to be allocated in one physical 37 37 * chunk of RAM. 38 38 */ 39 - #ifdef CONFIG_PHYS_ADDR_T_64BIT 39 + #if defined(CONFIG_PHYS_ADDR_T_64BIT) || defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) 40 40 #define LAST_PKMAP 512 41 41 #else 42 42 #define LAST_PKMAP 1024