From patchwork Tue Dec 10 16:05:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13901632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD698E77180 for ; Tue, 10 Dec 2024 16:06:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B06A6B0213; Tue, 10 Dec 2024 11:06:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 310DD6B0248; Tue, 10 Dec 2024 11:06:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D9746B0249; Tue, 10 Dec 2024 11:06:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id F3EFE6B0213 for ; Tue, 10 Dec 2024 11:06:56 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 7C7391A0C2D for ; Tue, 10 Dec 2024 16:06:56 +0000 (UTC) X-FDA: 82879527318.21.AA61865 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf07.hostedemail.com (Postfix) with ESMTP id 565FA40021 for ; Tue, 10 Dec 2024 16:06:32 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DEjxcxD8; spf=pass (imf07.hostedemail.com: domain of arnd@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733846798; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TEaLWxrsLvUBImDPPCjQjM6hrDnQv/U2XSRBkJAcOi4=; b=GFaUPUS0WCOwGK1DvF0JnsnAJD47r0QboPBIAkEpfUUct/bD+VZ/GFXfbznIhsrKzeYAin cpOuoESJ2ASogp5+//d7oyl9ExRcaftpB8sstgZmwry4wYdztsyMzTqdYh9Ad2xq9oZPMi mjrUZbhG/f9E1550SexpqZnl43qHMXQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DEjxcxD8; spf=pass (imf07.hostedemail.com: domain of arnd@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733846798; a=rsa-sha256; cv=none; b=sR3/K+mh6fiNErrl/AyzX1KoTeZvPxBbs6V2wXmUFn/t/M76LGxQCqF9QPC85akX+RHVgP Y+s5xHwU94ryiNtNMKA8JoKYAe/zUfb7ubqC3V4WsuTt0aS5MXD+dwt3KDeoG6CjcPMUbB j58ZGtql4qBcigfdnmpHHojxaLmWEvw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E0442A419BD; Tue, 10 Dec 2024 16:05:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 931B6C4CEE5; Tue, 10 Dec 2024 16:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733846814; bh=au+G63Alb5GCF/A9SMKFt0ffiADn8Kv5aULRnynJplQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DEjxcxD8oTx/TOiQj0A2f+JJWdp/WTkV38+nqMqbKqE7+bF6LG9S+6FdFjp6oYQtq rW1mfkcfhys/Emrwns6joq2JUc53T52CS463Zf/K5eFYzyYk7YjDEIVC4mkWw39m9j S6Z6Oqr/P1VJwWZx+FKYRsDQ6xsQzrgLqFnD+wTb1DLUo4Rj1JRdck87rev7uW6xSX mfsaWuEGPNNqdlX046i345AyLRdM8upKoU4Y31jGz7ADYX6irfh+RsIJEiaUdtPhbV 0Lh1SwNgDuIqEQjYvdRqYWOg3GV79ubzX6l4VsAKF47MKqP0JVWTeXepIEOL0Y7J6Q sQebOtMZyj6vg== From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , linux-mm@kvack.org, linux-rt-devel@lists.linux.dev, Ard Biesheuvel , Clark Williams , Jason Baron , Josh Poimboeuf , Linus Walleij , Mark Rutland , Matthew Wilcox , Peter Zijlstra , Russell King , Sebastian Andrzej Siewior , Steven Rostedt Subject: [PATCH 4/4] mm: drop HIGHPTE support altogether Date: Tue, 10 Dec 2024 17:05:56 +0100 Message-Id: <20241210160556.2341497-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241210160556.2341497-1-arnd@kernel.org> References: <20241210160556.2341497-1-arnd@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 565FA40021 X-Rspamd-Server: rspam12 X-Stat-Signature: oca6tdo33zijyw8m3fo94a1q91zeni1d X-Rspam-User: X-HE-Tag: 1733846792-934648 X-HE-Meta: U2FsdGVkX1/mQhiTfGo5l4eMtmPFIujndG6AbLmaHzlaG7/a+hTGibOFrMEG2/XOQefG/NjsiDOQH4XAr14ijLpqHQIvmRliWyLPBsdDuEG3i9enhLXkBsQNvb/tEtRRel2oOpyoZzThwVctqIbhpyEbFw+r5mgH3KbZ48oDSNAVF5Zv7951JCdhFULYf5FVFBtcLvpKRNvLGps0BX54wSH8/0qzZ29iBfxSIabY7XZxyUpJa2vgdYj81pGL6iIAdkVWlnWONN9+UcC4HVEy1OtW8DfmEWRfOeRG/w7RRpthxlUtZPH+kb+P1vdPEO1KTAybRSR9rQnUKbwFVj2KXfMP3B+gZlTWH2PNgb8HiFRyiLqTw4SjOBAzei//O25y/xINPWrQ/19VG/Yn2sk6SwuYrO3dVOtZrF0f8aG+staaT7/I2ISNAg7Hodu1on+q3GJxntVG1lmxKMuE7REUKiC5pUBxQ7ipd5Vf4ikuZqA2RdML3GM6CZm+YLUVe0GuMijJS9YUeKV7NPhtXyYcHPQu5rRWQ183qn+w8i2RW60cICW9BviQj8v5ax907tCKHl522lQ8Plc9x6c3+SzEzsDZdNPt77dSWc+xH0WgcOjLNonk2QBi4ZvV9LqAL6Y0ZRSnGjEdKyhNxGClHG/NFT3k0+KRgS3+iutAZoL6RqtnjZocgDCol0DtCSQiZYSO9GyUHQU+nv9gU5sK8QA54/Ze4Bv4IA0UfpfJ9t30fMH80UwcR6cRZR6POOUeoJ22P94InjyzWsJ8bIgTAXrTPy5o342QQqqa6gUhWusQoCkN7LmwJLmoazZJuuFY6C2WKMfIfY0yvc3YkiyO8ZFJpYe6q0F9QkMQyZQFION2tMOKMzVUwW65YijD/iSCGACu+ilBI2d6hSkaw+p1uJAPPRXq0eD9l7Fesn//o2RgI+NVbppLcuNNJJX0u5lUPY3Iqf59rMeKzV57Yz2N8cf zKeOZ4n3 1dJNe6BPPuNky9BOcPtqowpl5D5F8nitO7xMwQbk2lJw8eRibFyVhxyGltaj6WKZr3VTnb6qYsoCvCGwpHHOEwxQu3mvGU/jqgNKSBsfCwYdh56orUd0jhmR8Advro6uICHIAJ7Lw6Kgy0UJyUAxo0uYv5+P20rfvnimO7/4nvXH44eJ2MDQuWCE1H7AECIOVX2cKUYzbEaSrYDW+jDxk6IpN9g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 Acked-by: Linus Walleij Acked-by: Sebastian Andrzej Siewior --- 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 ae4fe8615bb6..5369a269dd39 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -176,7 +176,6 @@ extern struct list_head huge_boot_pages[MAX_NUMNODES]; /* 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 @@ -191,7 +190,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); @@ -966,9 +964,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 f56f81d5e244..6353fd939702 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2954,7 +2954,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 adef9d6e9b1b..23be8776bd5e 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -119,14 +119,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); @@ -135,7 +127,6 @@ static inline void pte_unmap(pte_t *pte) { rcu_read_unlock(); } -#endif void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable);