From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-67.mta0.migadu.com [91.218.175.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E598459AE1 for ; Mon, 14 Sep 2026 12:30:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789389047; cv=none; b=n8pGUQZnLMq6TFyzMsquWPzh1aTBmm0lQLCpzu2s1/dHvTUufWguZWthr1TJYmgiDtopVce0yVJLZf764svwiIMJ7YkHo7o6SqrkjxTyKWG0SyjhQ0zhImzKlJIbK9LuPmn6Y1TBEfZ43sgh5Zl8Ikm371Bi/CdIV5vyUv8XP7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789389047; c=relaxed/simple; bh=tuISWPJ3M4ynpVPzFp7v67YsNxfpcndtSeOMAgkqq08=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O2MbyaSF8BiLr5zwCaouLb+TR2vZuQqvO6zj0uUa/7GZu/wJZ7oB2m87hSoK8104LUgjw6W54Shz1SdYyAwBjudEEjXUV6RnckDE2PDw8BLjFay6tA140n0pq73UYb8ZtJrw4Bjrh2n7tje8/8/1uaZE5coeBePNW/F85Y7TcoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=UHTip5QV; arc=none smtp.client-ip=91.218.175.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="UHTip5QV" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=tuISWPJ3M4ynpVPzFp7v67YsNxfpcndtSeOMAgkqq08=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1789389039; v=1; x=1789993839; b=UHTip5QVLb49ioch3GdXPfvpGZwkxa52B/FRIS5AswMbM8y6lJHM+qweWecLL+u2FNjDT5Oo 9Us0srk9Fb/bnHvSZL2zh5RlSrM0WC3WotX1muaA5466AIRrAzeec7NsriNFqWaCay96OzsVJs7 eFlWbN+t/gYJ7KftzJ8+0BRI= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta10.migadu.com with ESMTPS id a11a52cd755f1f77; Mon, 14 Sep 2026 12:30:11 +0000 X-Mizu-Trace-ID: a11a52cd755f1f77 X-Migadu-Flow: FLOW_OUT From: Usama Arif To: Andrew Morton , david@kernel.org, chrisl@kernel.org, kasong@tencent.com, ljs@kernel.org, ziy@nvidia.com, linux-mm@kvack.org Cc: ying.huang@linux.alibaba.com, Baoquan He , willy@infradead.org, youngjun.park@lge.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, alex@ghiti.fr, kas@kernel.org, baohua@kernel.org, dev.jain@arm.com, baolin.wang@linux.alibaba.com, Nico Pache , Liam R. Howlett , ryan.roberts@arm.com, Vlastimil Babka , lance.yang@linux.dev, linux-kernel@vger.kernel.org, nphamcs@gmail.com, shikemeng@huaweicloud.com, yosry@kernel.org, qi.zheng@linux.dev, luizcap@redhat.com, kernel-team@meta.com, Usama Arif Subject: [RESEND v7 01/29] mm: rename pmd_to_softleaf_folio() to pmd_softleaf_to_folio() Date: Mon, 14 Sep 2026 05:27:51 -0700 Message-ID: <20260914122950.3283997-2-usama.arif@linux.dev> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260914122950.3283997-1-usama.arif@linux.dev> References: <20260914122950.3283997-1-usama.arif@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit pmd_to_softleaf_folio() reads as if it converted a PMD into a folio. What it does is decode the softleaf entry stored in the PMD and return the folio that entry references - the direction softleaf_to_folio() already spells out. No functional change intended. Suggested-by: Dev Jain Signed-off-by: Usama Arif Acked-by: David Hildenbrand (Arm) Reviewed-by: Lorenzo Stoakes (ARM) Reviewed-by: Zi Yan Acked-by: Kiryl Shutsemau (Meta) --- include/linux/leafops.h | 4 ++-- mm/huge_memory.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/leafops.h b/include/linux/leafops.h index 4c1476ae32343..7c13c58a5e218 100644 --- a/include/linux/leafops.h +++ b/include/linux/leafops.h @@ -657,7 +657,7 @@ static inline bool pmd_is_valid_softleaf(pmd_t pmd) } /** - * pmd_to_softleaf_folio() - Convert the PMD entry to a folio. + * pmd_softleaf_to_folio() - Convert the PMD softleaf entry to a folio. * @pmd: PMD entry. * * The PMD entry is expected to be a valid PMD softleaf entry. @@ -665,7 +665,7 @@ static inline bool pmd_is_valid_softleaf(pmd_t pmd) * Returns: the folio the softleaf entry references if this is a valid softleaf * entry, otherwise NULL. */ -static inline struct folio *pmd_to_softleaf_folio(pmd_t pmd) +static inline struct folio *pmd_softleaf_to_folio(pmd_t pmd) { const softleaf_t entry = softleaf_from_pmd(pmd); diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 7140a1031fb2e..ee8d46827ffdc 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2518,7 +2518,7 @@ static struct folio *normal_or_softleaf_folio_pmd(struct vm_area_struct *vma, if (!thp_migration_supported()) WARN_ONCE(1, "Non present huge pmd without pmd migration enabled!"); - return pmd_to_softleaf_folio(pmdval); + return pmd_softleaf_to_folio(pmdval); } static bool has_deposited_pgtable(struct vm_area_struct *vma, pmd_t pmdval, -- 2.53.0-Meta