From: Arnd Bergmann <arnd@kernel.org>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andy Shevchenko <andy@kernel.org>,
Matthew Wilcox <willy@infradead.org>
Subject: [PATCH v3 07/10] x86: drop support for CONFIG_HIGHPTE
Date: Wed, 26 Feb 2025 22:37:11 +0100 [thread overview]
Message-ID: <20250226213714.4040853-8-arnd@kernel.org> (raw)
In-Reply-To: <20250226213714.4040853-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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>
---
.../admin-guide/kernel-parameters.txt | 7 -----
arch/x86/Kconfig | 9 -------
arch/x86/include/asm/pgalloc.h | 5 ----
arch/x86/mm/pgtable.c | 27 +------------------
4 files changed, 1 insertion(+), 47 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 8f923770a566..93177630cefb 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -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:
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2810482dc183..aba32f88870d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1627,15 +1627,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
diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
index dd4841231bb9..a33147520044 100644
--- a/arch/x86/include/asm/pgalloc.h
+++ b/arch/x86/include/asm/pgalloc.h
@@ -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
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 1fef5ad32d5a..94b5601f2cd8 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -12,12 +12,6 @@ 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
-
#ifndef CONFIG_PARAVIRT
#ifndef CONFIG_PT_RECLAIM
static inline
@@ -37,29 +31,10 @@ void paravirt_tlb_remove_table(struct mmu_gather *tlb, void *table)
#endif /* !CONFIG_PT_RECLAIM */
#endif /* !CONFIG_PARAVIRT */
-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);
-}
-
-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;
+ return __pte_alloc_one(mm, GFP_PGTABLE_USER);
}
-early_param("userpte", setup_userpte);
void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
{
--
2.39.5
next prev parent reply other threads:[~2025-02-26 21:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 21:37 [PATCH v3 00/10] x86: 32-bit cleanups Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 01/10] x86/Kconfig: Geode CPU has cmpxchg8b Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/Kconfig: Add cmpxchg8b support back to Geode CPUs tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 02/10] x86: drop 32-bit "bigsmp" machine support Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/smp: Drop " tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 03/10] x86: rework CONFIG_GENERIC_CPU compiler flags Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/build: Rework " tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 04/10] x86: drop configuration options for early 64-bit CPUs Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/cpu: Drop " tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 05/10] x86: remove HIGHMEM64G support Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/mm: Remove CONFIG_HIGHMEM64G support tip-bot2 for Arnd Bergmann
2025-02-27 15:41 ` [PATCH v3 05/10] x86: remove HIGHMEM64G support H. Peter Anvin
2025-02-27 16:51 ` Linus Torvalds
2025-02-28 1:48 ` H. Peter Anvin
2025-02-28 10:09 ` Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 06/10] x86: drop SWIOTLB for PAE Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/mm: Drop CONFIG_SWIOTLB " tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` Arnd Bergmann [this message]
2025-02-27 10:42 ` [tip: x86/cpu] x86/mm: Drop support for CONFIG_HIGHPTE tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 08/10] x86: document X86_INTEL_MID as 64-bit-only Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/cpu: Document CONFIG_X86_INTEL_MID " tip-bot2 for Arnd Bergmann
2025-02-28 16:20 ` [PATCH v3 08/10] x86: document X86_INTEL_MID " Ferry Toth
2025-02-28 18:40 ` Andy Shevchenko
2025-02-26 21:37 ` [PATCH v3 09/10] x86: remove old STA2x11 support Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/pci: Remove " tip-bot2 for Arnd Bergmann
2025-02-26 21:37 ` [PATCH v3 10/10] x86: only allow EISA for 32-bit Arnd Bergmann
2025-02-27 10:42 ` [tip: x86/cpu] x86/platform: Only allow CONFIG_EISA " tip-bot2 for Arnd Bergmann
2025-02-27 10:34 ` [PATCH v3 00/10] x86: 32-bit cleanups Ingo Molnar
2025-02-27 14:08 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250226213714.4040853-8-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox