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

Configure Feed

Select the types of activity you want to include in your feed.

x86/mm: Drop support for CONFIG_HIGHPTE

With the maximum amount of RAM now 4GB, there is very little point
to still have PTE pages in highmem. Drop this for simplification.

The only other architecture supporting HIGHPTE is 32-bit arm, and
once that feature is removed as well, the highpte logic can be
dropped from common code as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250226213714.4040853-8-arnd@kernel.org

authored by

Arnd Bergmann and committed by
Ingo Molnar
0081fdec a8331594

+1 -47
-7
Documentation/admin-guide/kernel-parameters.txt
··· 7668 7668 16 - SIGBUS faults 7669 7669 Example: user_debug=31 7670 7670 7671 - userpte= 7672 - [X86,EARLY] Flags controlling user PTE allocations. 7673 - 7674 - nohigh = do not allocate PTE pages in 7675 - HIGHMEM regardless of setting 7676 - of CONFIG_HIGHPTE. 7677 - 7678 7671 vdso= [X86,SH,SPARC] 7679 7672 On X86_32, this is an alias for vdso32=. Otherwise: 7680 7673
-9
arch/x86/Kconfig
··· 1628 1628 1629 1629 Say Y if unsure. 1630 1630 1631 - config HIGHPTE 1632 - bool "Allocate 3rd-level pagetables from highmem" 1633 - depends on HIGHMEM 1634 - help 1635 - The VM uses one page table entry for each page of physical memory. 1636 - For systems with a lot of RAM, this can be wasteful of precious 1637 - low memory. Setting this option will put user-space page table 1638 - entries in high memory. 1639 - 1640 1631 config X86_CHECK_BIOS_CORRUPTION 1641 1632 bool "Check for low memory corruption" 1642 1633 help
-5
arch/x86/include/asm/pgalloc.h
··· 29 29 static inline void paravirt_release_p4d(unsigned long pfn) {} 30 30 #endif 31 31 32 - /* 33 - * Flags to use when allocating a user page table page. 34 - */ 35 - extern gfp_t __userpte_alloc_gfp; 36 - 37 32 #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION 38 33 /* 39 34 * Instead of one PGD, we acquire two PGDs. Being order-1, it is
+1 -26
arch/x86/mm/pgtable.c
··· 12 12 EXPORT_SYMBOL(physical_mask); 13 13 #endif 14 14 15 - #ifdef CONFIG_HIGHPTE 16 - #define PGTABLE_HIGHMEM __GFP_HIGHMEM 17 - #else 18 - #define PGTABLE_HIGHMEM 0 19 - #endif 20 - 21 - gfp_t __userpte_alloc_gfp = GFP_PGTABLE_USER | PGTABLE_HIGHMEM; 22 - 23 15 pgtable_t pte_alloc_one(struct mm_struct *mm) 24 16 { 25 - return __pte_alloc_one(mm, __userpte_alloc_gfp); 17 + return __pte_alloc_one(mm, GFP_PGTABLE_USER); 26 18 } 27 - 28 - static int __init setup_userpte(char *arg) 29 - { 30 - if (!arg) 31 - return -EINVAL; 32 - 33 - /* 34 - * "userpte=nohigh" disables allocation of user pagetables in 35 - * high memory. 36 - */ 37 - if (strcmp(arg, "nohigh") == 0) 38 - __userpte_alloc_gfp &= ~__GFP_HIGHMEM; 39 - else 40 - return -EINVAL; 41 - return 0; 42 - } 43 - early_param("userpte", setup_userpte); 44 19 45 20 void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte) 46 21 {