From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: linux-mm@kvack.org, Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andreas Larsson <andreas@gaisler.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
"David Hildenbrand (Arm)" <david@kernel.org>,
Jason Gunthorpe <jgg@nvidia.com>,
Linus Walleij <linus.walleij@linaro.org>,
Matthew Wilcox <willy@infradead.org>,
Malin Jonsson <malin.jonsson@est.tech>,
Richard Weinberger <richard@nod.at>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
x86@kernel.org
Subject: Re: [PATCH v2 4/6] mm: drop HIGHPTE support altogether
Date: Fri, 13 Nov 2026 18:53:09 +0000 [thread overview]
Message-ID: <avdciuic3FAy6evm@gremlin> (raw)
In-Reply-To: <20261112112528.1116405-5-arnd@kernel.org>
On Thu, Nov 12, 2026 at 12:25:26PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> With both x86 and arm having dropped CONFIG_HIGHPTE support, no
> architecture is left using it, so remove the remnants in common code.
>
> It is likely that further cleanups are possible in the page table
> code but those are not obvious from the config options.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
LGTM assuming Mike's changes :)
Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/hugetlb.h | 5 +----
> include/linux/mm.h | 1 -
> include/linux/pgtable.h | 9 ---------
> 3 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 58f755e70e96..7c6d191fdf50 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -178,7 +178,6 @@ void hugetlb_bootmem_set_nodes(void);
>
> /* arch callbacks */
>
> -#ifndef CONFIG_HIGHPTE
> /*
> * pte_offset_huge() and pte_alloc_huge() are helpers for those architectures
> * which may go down to the lowest PTE level in their huge_pte_offset() and
> @@ -193,7 +192,6 @@ static inline pte_t *pte_alloc_huge(struct mm_struct *mm, pmd_t *pmd,
> {
> return pte_alloc(mm, pmd) ? NULL : pte_offset_huge(pmd, address);
> }
> -#endif
>
> pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
> unsigned long addr, unsigned long sz);
> @@ -1047,9 +1045,8 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
> */
> if (size >= PUD_SIZE)
> return pud_lockptr(mm, (pud_t *) pte);
> - else if (size >= PMD_SIZE || IS_ENABLED(CONFIG_HIGHPTE))
> + else if (size >= PMD_SIZE)
> return pmd_lockptr(mm, (pmd_t *) pte);
> - /* pte_alloc_huge() only applies with !CONFIG_HIGHPTE */
> return ptep_lockptr(mm, pte);
> }
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 6af3b7008f1a..019de55bd796 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -4025,7 +4025,6 @@ static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd)
>
> static inline spinlock_t *ptep_lockptr(struct mm_struct *mm, pte_t *pte)
> {
> - BUILD_BUG_ON(IS_ENABLED(CONFIG_HIGHPTE));
> BUILD_BUG_ON(MAX_PTRS_PER_PTE * sizeof(pte_t) > PAGE_SIZE);
> return ptlock_ptr(virt_to_ptdesc(pte));
> }
> diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
> index 780fe849ff8b..1352b4cee7ae 100644
> --- a/include/linux/pgtable.h
> +++ b/include/linux/pgtable.h
> @@ -100,14 +100,6 @@ static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address)
> #define pte_offset_kernel pte_offset_kernel
> #endif
>
> -#ifdef CONFIG_HIGHPTE
> -#define __pte_map(pmd, address) \
> - ((pte_t *)kmap_local_page(pmd_page(*(pmd))) + pte_index((address)))
> -#define pte_unmap(pte) do { \
> - kunmap_local((pte)); \
> - rcu_read_unlock(); \
> -} while (0)
> -#else
> static inline pte_t *__pte_map(pmd_t *pmd, unsigned long address)
> {
> return pte_offset_kernel(pmd, address);
> @@ -116,7 +108,6 @@ static inline void pte_unmap(pte_t *pte)
> {
> rcu_read_unlock();
> }
> -#endif
>
> void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable);
>
> --
> 2.53.0
>
--
Cheers, Lorenzo
next prev parent reply other threads:[~2026-11-13 18:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 11:25 [PATCH v2 0/6] mm: highmem cleanups Arnd Bergmann
2026-11-12 11:25 ` [PATCH v2 1/6] ARM: remove support for highmem on VIVT Arnd Bergmann
2026-11-12 13:47 ` Arnd Bergmann
2026-11-13 18:28 ` Lorenzo Stoakes (ARM)
2026-11-12 11:25 ` [PATCH v2 2/6] mm: remove ARCH_NEEDS_KMAP_HIGH_GET Arnd Bergmann
2026-11-12 11:48 ` Mike Rapoport
2026-11-13 18:39 ` Lorenzo Stoakes (ARM)
2026-11-12 11:25 ` [PATCH v2 3/6] ARM: drop CONFIG_HIGHPTE support Arnd Bergmann
2026-11-12 11:47 ` Mike Rapoport
2026-11-12 12:22 ` Arnd Bergmann
2026-11-13 18:41 ` Lorenzo Stoakes (ARM)
2026-11-12 11:25 ` [PATCH v2 4/6] mm: drop HIGHPTE support altogether Arnd Bergmann
2026-11-12 11:54 ` Mike Rapoport
2026-11-12 12:33 ` David Hildenbrand (Arm)
2026-11-12 13:26 ` Arnd Bergmann
2026-11-13 10:50 ` David Hildenbrand (Arm)
2026-11-13 18:53 ` Lorenzo Stoakes (ARM) [this message]
2026-11-12 11:25 ` [PATCH v2 5/6] arch/*: increase lowmem size to avoid highmem use Arnd Bergmann
2026-11-12 12:00 ` Mike Rapoport
2026-11-13 18:35 ` H. Peter Anvin
2026-11-13 18:58 ` Lorenzo Stoakes (ARM)
2026-11-12 11:25 ` [PATCH v2 6/6] ARM: add CONFIG_VMSPLIT_2G_OPT option Arnd Bergmann
2026-11-13 19:20 ` Lorenzo Stoakes (ARM)
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=avdciuic3FAy6evm@gremlin \
--to=ljs@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andreas@gaisler.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=chleroy@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=jgg@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malin.jonsson@est.tech \
--cc=richard@nod.at \
--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