From patchwork Fri Sep 13 08:44:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13803148 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 57CCAFA3730 for ; Fri, 13 Sep 2024 08:44:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B603A6B00BF; Fri, 13 Sep 2024 04:44:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B0CF46B00C1; Fri, 13 Sep 2024 04:44:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9AF016B00C2; Fri, 13 Sep 2024 04:44:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7D1D66B00BF for ; Fri, 13 Sep 2024 04:44:47 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 371968200B for ; Fri, 13 Sep 2024 08:44:47 +0000 (UTC) X-FDA: 82559079414.25.F2ED9BD Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf23.hostedemail.com (Postfix) with ESMTP id 3FF0F14000E for ; Fri, 13 Sep 2024 08:44:45 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf23.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726216999; a=rsa-sha256; cv=none; b=aEgnFEzdiDP7ctwTGbedT8F38TlqK4iEbdkvAKYH5nEjqociBOwjvHNgPzmArEIFiZroxa O51Dzrskva5AjHnOZwFZIHS4QZZGpv3fkgpOJilrzi74N2AKjc1gseoYuhju7Z6GIpXn6m BFoP43Y5fcm8rhfdGHyjZmQZk1zK4TE= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf23.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726216999; 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:references; bh=18N/S+ZKANNLFViFzY2Ut3pdWgH6ZrJNTuJtauAGQYo=; b=vYCvg0YIEfz7kX1vM8L7vVZvpWej5RK+2RcGZGbLS4QA47K/orz7W5KKZ3CIOxq5enZQ/d Lxkk1dp1K5FgIpsuEkypq3qSKnqcbmvld43ZKcVLTNErfqytU6Hv7SIZLWj7frj//8dMXs sMr1Bb2Wg6mG9v2AcN60G+QQzy8rB1w= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B45C813D5; Fri, 13 Sep 2024 01:45:13 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.16.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7F3B23F73B; Fri, 13 Sep 2024 01:44:40 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , David Hildenbrand , Ryan Roberts , "Mike Rapoport (IBM)" , Arnd Bergmann , x86@kernel.org, linux-m68k@lists.linux-m68k.org, linux-fsdevel@vger.kernel.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 0/7] mm: Use pxdp_get() for accessing page table entries Date: Fri, 13 Sep 2024 14:14:26 +0530 Message-Id: <20240913084433.1016256-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 3FF0F14000E X-Stat-Signature: 3zkbge8c87tb1zdga5gp8uw5ugkg4rru X-Rspam-User: X-HE-Tag: 1726217085-511188 X-HE-Meta: U2FsdGVkX1/KIIhPt0NizxySAovXKudqtcVfpe6XZ1yOo9p44wQ2DeVJQ8VPCMpQE7V1ZvCfCyKV4Uk3+oihxMUx7kCnZQEqDBPt0PggfmIcZjwKEOTllXp6nulZZFybqJsl9gCL5vSPhSRl8L52lcTNC0+u5UjNZTAfz9Rqz6DodQw/kwpd5O3OVom1YHaap5IlVxnaqlWU32YeLPVvQmrO50yQXYmsaQBClug/AblorWTPab4xoCsX3bIRtO0x+7J0AkrGJv451MK54GhkR3oM3BQODbEHSwM6ncv0azRkBVkgfrITgJrOlY59tzFBdncOimDQI5mm9LPB1jDxVGpDSOt4yjHOnhrC7CNE4nqw0N9lJV14zybgNfolj2c4qKsSfOsl3pcHgWJdcfI44t/ZnhC8JRSLY/Adox0CYzTzGR8mNPGj0aYTUGfFPK0WsOFo276ffptL9OtgmAKZeMSa7EG0iJbrPANI6hvsNfxH5vhoXb9MbIxCegGlbH6UBvJ/TofkrCa0FWLF8bqi3evvOUaWwxGr/vflPrYysinKB9HF/lhO5Obd+iSwiethxeYH5XOFM4tIeib+fsUCvSSCqNi4n86vBas/EPxhXItpHOFUIc/AgyUZTfGznrvUftEXWAfmXSqUxjnG81oPl4Y1/LnTU3198pK5UNOWheyx0ncy7PD2KoLiMjdHcUguMMcmf+hx1iXJ7VUbHUKZwBVKQeibDjq266Rr8KVEgS3iy0XIu8ZxVNdllCTzJGhAlgRdZh2m9GMa3bzP0a9x7zeJRlya68/Esf85KXZiqjpBAFHLsLSXg9cSyYU5kEU1xX93zYA8KRyiOVERy+AzfGpnfx57b5FKkMDZ5DLBazmjT7qUZnFJ8l4ZiCgjSWzSa8VWZkLHhaKz2OpM7Cx+D57sL76WLV7Xgm7srL9zO/xUMRYSmIb7LTI9j93GZNIz/PSs5sGyaQtzcUKB+JF U3t8Fp+7 cveHl+5+mWkuT8GGOUKjpOIxST5YJpqTGO5eDk9tYtF6S1S/zpLa/G2NITOauYYmy9Y4gFxNvWF0uIxfxQ4YqewYXf4fiHwSClP+tbnyWVNrW62ILOOo+7/YE6/QcauBQcWn4ejZOMnhW6fdO90/0D7VKef9IMVlzVR9u51ERSSiaQnlXhtX3lPSS6KUlc/ysnSN5gYunsz2BSLyQ8LT1wzXM1RoSwUCziSMYKiqd2xXuhjxBBV0WDn7p4CFIJu0s08vAguQyFkCO5KQ668FWWU6OtJTtKC9eXEHjnBuwmp2D50dFmBNNlizZDtGkvJWy42hyVVTavmp+yYEYi9E8pBbcHHZ1NxKxCMXp2lq0yXJTbBFKR9F8Jc9Si13Yn0izRfnwjWtWkhvQ+6oWRMmdC4EhYzkIGtvTzmVl8VmxPSs1sHyMPT5PoID0tpanH0zEFf2X+7UMfKASTvPH6h5vDo17/5cNIsL2P6zdniECwAY0U3Y= 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: This series converts all generic page table entries direct derefences via pxdp_get() based helpers extending the changes brought in via the commit c33c794828f2 ("mm: ptep_get() conversion"). First it does some platform specific changes for m68k and x86 architecture. This series has been build tested on multiple architecture such as x86, arm64, powerpc, powerpc64le, riscv, and m68k etc. Cc: Andrew Morton Cc: David Hildenbrand Cc: Ryan Roberts Cc: "Mike Rapoport (IBM)" Cc: Arnd Bergmann Cc: x86@kernel.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mm@kvack.org Cc: linux-fsdevel@vger.kernel.org Cc: kasan-dev@googlegroups.com Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Cc: kasan-dev@googlegroups.com Anshuman Khandual (7): m68k/mm: Change pmd_val() x86/mm: Drop page table entry address output from pxd_ERROR() mm: Use ptep_get() for accessing PTE entries mm: Use pmdp_get() for accessing PMD entries mm: Use pudp_get() for accessing PUD entries mm: Use p4dp_get() for accessing P4D entries mm: Use pgdp_get() for accessing PGD entries arch/m68k/include/asm/page.h | 2 +- arch/x86/include/asm/pgtable-3level.h | 12 ++--- arch/x86/include/asm/pgtable_64.h | 20 +++---- drivers/misc/sgi-gru/grufault.c | 10 ++-- fs/proc/task_mmu.c | 26 ++++----- fs/userfaultfd.c | 6 +-- include/linux/huge_mm.h | 5 +- include/linux/mm.h | 6 +-- include/linux/pgtable.h | 38 +++++++------- kernel/events/core.c | 6 +-- mm/gup.c | 40 +++++++------- mm/hmm.c | 2 +- mm/huge_memory.c | 76 +++++++++++++-------------- mm/hugetlb.c | 10 ++-- mm/hugetlb_vmemmap.c | 4 +- mm/kasan/init.c | 38 +++++++------- mm/kasan/shadow.c | 12 ++--- mm/khugepaged.c | 4 +- mm/madvise.c | 6 +-- mm/mapping_dirty_helpers.c | 2 +- mm/memory-failure.c | 14 ++--- mm/memory.c | 59 +++++++++++---------- mm/mempolicy.c | 4 +- mm/migrate.c | 4 +- mm/migrate_device.c | 10 ++-- mm/mlock.c | 6 +-- mm/mprotect.c | 2 +- mm/mremap.c | 4 +- mm/page_table_check.c | 4 +- mm/page_vma_mapped.c | 6 +-- mm/pagewalk.c | 10 ++-- mm/percpu.c | 8 +-- mm/pgalloc-track.h | 6 +-- mm/pgtable-generic.c | 24 ++++----- mm/ptdump.c | 8 +-- mm/rmap.c | 8 +-- mm/sparse-vmemmap.c | 10 ++-- mm/vmalloc.c | 46 ++++++++-------- mm/vmscan.c | 6 +-- 39 files changed, 283 insertions(+), 281 deletions(-)