From nobody Tue Apr 7 17:14:29 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B67133F8C8 for ; Fri, 27 Feb 2026 04:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772164993; cv=none; b=SnPGiwqp33CpbCcpJlnrCNz8u49A/mwpcsDnzZQSNX/x33eCOyAtoRHDTRLqGWnj5bg/XLSTkFnNI01kvCX5Fm3Iw/mmElqi3AqpX3wt2OUr3q4xgwUhtygmU2PqHwbefTeiUVE/HVQ0m/V9a3mdNF/b/riaE3OXN1yYUm1MoiY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772164993; c=relaxed/simple; bh=06Dumpoaz67nqFlnZ5TjdYd1YCGCqEQ7Jg8Qv6fIldo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nalOOkc9xwskDU3xhzOPeD67eqUvRpDC0aFx2ZQ7boLn3nIRIvwjY11IKYWUecayPhBvBU/WH7jakpV13uT8Axi/fHdjhD3Rv5v3VEQxyr87GPOHwLvpzyWug/b08k9w5ob1PNaonYIbapSh9OhHpDh1lsCLILr2Ov8lEU1nGUk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 2AA0514BF; Thu, 26 Feb 2026 20:03:04 -0800 (PST) Received: from ergosum.cambridge.arm.com (ergosum.cambridge.arm.com [10.1.196.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2DCD73F62B; Thu, 26 Feb 2026 20:03:09 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Mike Rapoport , linux-kernel@vger.kernel.org Subject: [PATCH] mm: Replace READ_ONCE() in pud_trans_unstable() Date: Fri, 27 Feb 2026 04:03:00 +0000 Message-Id: <20260227040300.2091901-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace READ_ONCE() with the existing standard page table accessor for PUD aka pudp_get() in pud_trans_unstable(). This does not create any functional change for platforms that do not override pudp_get(), which still defaults to READ_ONCE(). Cc: Andrew Morton Cc: David Hildenbrand Cc: Lorenzo Stoakes Cc: Mike Rapoport Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand (Arm) Acked-by: SeongJae Park Reviewed-by: Lorenzo Stoakes --- This patch applies both on v7.0-rc1 and mm-unstable. Part of the D128 series but independent. Hence could be considered on its o= wn. https://lore.kernel.org/all/20260224051153.3150613-4-anshuman.khandual@arm.= com/ include/linux/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index a50df42a893f..d4826447bc93 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -1989,7 +1989,7 @@ static inline int pud_trans_unstable(pud_t *pud) { #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && \ defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) - pud_t pudval =3D READ_ONCE(*pud); + pud_t pudval =3D pudp_get(pud); =20 if (pud_none(pudval) || pud_trans_huge(pudval)) return 1; --=20 2.30.2