From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B088606A8B9 for ; Thu, 12 Nov 2026 11:26:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WQ4M66Ff Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4jQJ3w0DJ0z308Q; Thu, 12 Nov 2026 22:26:04 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1794482763; cv=none; b=kSQjwh0pz78iojSnazBbirp+z/6YB5FziJvsMaiR3yFjyoLuQzipJZmCGD3zkM85F/36rZYYM3l3maGQxQgtpyXNrobUCF+LtQzqiqW/FDswM4SrL0qicRDWCsbTVPV1Vm1UG8qLWbY0Qg3E1JLQyj1V+07zOkqcQKiEqLjfcut+pbQFOzbTz3QdmYEsChh+8Nbkm/Apc95c2zrURm6d/BeEf2+lIb/6uBYwb8dJKEWWOLVHcSDbBsAk44eI8ke3l75MSuHvYxbGIXKF/ls12Dx605saVHsIrLRk/zef7TlLzG8hJDAXdQfnv/zFkG/RgE+JwpqXQY/mYdRiS2w8gA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1794482763; c=relaxed/relaxed; bh=1ahb900BtN45H4B5q25OIDwOBOyq++YAh9gkOLMihQg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Eds/zTz1f6wFjb6dGxoG51gUR1RKJ20vdYsRh1Q8/kQboGcFzVGhCQfPHgWYKtAnErKZQagMaDbk7dqoA2PQTFPhaaJfhVLiGXTZADlVtrjSAgpcgHwVAO3Ski5lfAw6/4mWpBs/JwGhFCrvXZKDhz/W6ZilCm8zjEjxi6HkLtykQg6mY29WSLwshDJOLzQ9BiKjgS4JvytZvvm7oGEcVD+ELDtIGDFaGyy/YkKsg0AjROTR9dYVX88UtRRcba7suSMO/ImnFapVru+4C0qBYhGkDYyj2n+WgIrlj4BBCiF5UHo/smLJ/dlaNmavKAwhfTWO7eiZljCCLGyjoMDWuQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WQ4M66Ff; dkim-atps=neutral; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=arnd@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WQ4M66Ff; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=arnd@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4jQJ3v1TXgz2xJT for ; Thu, 12 Nov 2026 22:26:03 +1100 (AEDT) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 5742561D19; Thu, 12 Nov 2026 11:26:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71EEE1F00A07; Thu, 12 Nov 2026 11:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794482761; bh=1ahb900BtN45H4B5q25OIDwOBOyq++YAh9gkOLMihQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WQ4M66FfhknQRiwDgcQNx9UTF6dw9I471yvpzzFpUSuIaGtUEIDttLJmvxsZHmCLQ hJX0F1qlMlGDXUOYxTWf7SdVpL7CvzelD5QV/7wcBolWvM85ghWaA+9JhhRWKEqC3r WniKL7pGR1/h0wZfwpTPxeY9yrq0JtLKm6qJS9CAq4M5AQAbwbQPtcvfMNTke5zy86 CxstBYAp1AKAptvpHqOlsDaeMJlRSIBRt4KAg8Z1cmGVPcjrm8Oq8RHrUiuj0GsC7p YMtbiBe7/bYpGf43nhfrv078hWGpRSWJwn/m5859ygg8Z1pOoCtVRFawuoaJgLIDPa xmpvfL3jz+yuQ== From: Arnd Bergmann To: linux-mm@kvack.org Cc: Arnd Bergmann , Andrew Morton , Andreas Larsson , "Christophe Leroy (CS GROUP)" , Dave Hansen , "David Hildenbrand (Arm)" , Jason Gunthorpe , Linus Walleij , "Lorenzo Stoakes (ARM)" , Matthew Wilcox , Malin Jonsson , Richard Weinberger , Russell King , linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: [PATCH v2 4/6] mm: drop HIGHPTE support altogether Date: Thu, 12 Nov 2026 12:25:26 +0100 Message-ID: <20261112112528.1116405-5-arnd@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261112112528.1116405-1-arnd@kernel.org> References: <20261112112528.1116405-1-arnd@kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , Precedence: list X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Arnd Bergmann 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 --- 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