mirror of https://github.com/torvalds/linux.git
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
This commit is contained in:
parent
a833159403
commit
0081fdeccb
|
|
@ -7668,13 +7668,6 @@
|
|||
16 - SIGBUS faults
|
||||
Example: user_debug=31
|
||||
|
||||
userpte=
|
||||
[X86,EARLY] Flags controlling user PTE allocations.
|
||||
|
||||
nohigh = do not allocate PTE pages in
|
||||
HIGHMEM regardless of setting
|
||||
of CONFIG_HIGHPTE.
|
||||
|
||||
vdso= [X86,SH,SPARC]
|
||||
On X86_32, this is an alias for vdso32=. Otherwise:
|
||||
|
||||
|
|
|
|||
|
|
@ -1628,15 +1628,6 @@ config X86_PMEM_LEGACY
|
|||
|
||||
Say Y if unsure.
|
||||
|
||||
config HIGHPTE
|
||||
bool "Allocate 3rd-level pagetables from highmem"
|
||||
depends on HIGHMEM
|
||||
help
|
||||
The VM uses one page table entry for each page of physical memory.
|
||||
For systems with a lot of RAM, this can be wasteful of precious
|
||||
low memory. Setting this option will put user-space page table
|
||||
entries in high memory.
|
||||
|
||||
config X86_CHECK_BIOS_CORRUPTION
|
||||
bool "Check for low memory corruption"
|
||||
help
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@ static inline void paravirt_release_pud(unsigned long pfn) {}
|
|||
static inline void paravirt_release_p4d(unsigned long pfn) {}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Flags to use when allocating a user page table page.
|
||||
*/
|
||||
extern gfp_t __userpte_alloc_gfp;
|
||||
|
||||
#ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
|
||||
/*
|
||||
* Instead of one PGD, we acquire two PGDs. Being order-1, it is
|
||||
|
|
|
|||
|
|
@ -12,36 +12,11 @@ phys_addr_t physical_mask __ro_after_init = (1ULL << __PHYSICAL_MASK_SHIFT) - 1;
|
|||
EXPORT_SYMBOL(physical_mask);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HIGHPTE
|
||||
#define PGTABLE_HIGHMEM __GFP_HIGHMEM
|
||||
#else
|
||||
#define PGTABLE_HIGHMEM 0
|
||||
#endif
|
||||
|
||||
gfp_t __userpte_alloc_gfp = GFP_PGTABLE_USER | PGTABLE_HIGHMEM;
|
||||
|
||||
pgtable_t pte_alloc_one(struct mm_struct *mm)
|
||||
{
|
||||
return __pte_alloc_one(mm, __userpte_alloc_gfp);
|
||||
return __pte_alloc_one(mm, GFP_PGTABLE_USER);
|
||||
}
|
||||
|
||||
static int __init setup_userpte(char *arg)
|
||||
{
|
||||
if (!arg)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* "userpte=nohigh" disables allocation of user pagetables in
|
||||
* high memory.
|
||||
*/
|
||||
if (strcmp(arg, "nohigh") == 0)
|
||||
__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
|
||||
else
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
early_param("userpte", setup_userpte);
|
||||
|
||||
void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
|
||||
{
|
||||
paravirt_release_pte(page_to_pfn(pte));
|
||||
|
|
|
|||
Loading…
Reference in New Issue