From patchwork Thu Nov 14 15:34:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshvardhan Jha X-Patchwork-Id: 13875274 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 292BED68B34 for ; Thu, 14 Nov 2024 15:34:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E217B6B00B7; Thu, 14 Nov 2024 10:34:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D83056B00B8; Thu, 14 Nov 2024 10:34:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BAE056B00B9; Thu, 14 Nov 2024 10:34:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 98ACF6B00B7 for ; Thu, 14 Nov 2024 10:34:51 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4D17F16085F for ; Thu, 14 Nov 2024 15:34:51 +0000 (UTC) X-FDA: 82785097038.26.61A4203 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf20.hostedemail.com (Postfix) with ESMTP id E3D5E1C0012 for ; Thu, 14 Nov 2024 15:33:53 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=gYRIMHFX; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf20.hostedemail.com: domain of harshvardhan.j.jha@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=harshvardhan.j.jha@oracle.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731598358; a=rsa-sha256; cv=none; b=trqtb9gXd9GLlReBz64v9x9GVKdH2rRpMF4EpIxS9/0k6JPEcyzAlRZUFwfITnaOyDjRxn k5FlZtOJYwbidLZHaSO5o3W0gdHT75AK0cmB+NiHg+KwC7LdXbXcvvxF/SGWvuFama8U7C cvIUIbkMsoNd3H8v2xzXzpXFKRjbb6M= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=gYRIMHFX; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf20.hostedemail.com: domain of harshvardhan.j.jha@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=harshvardhan.j.jha@oracle.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731598358; 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=Py5Du1aXatp3XRVKVEvGvm+Mt7BokMwnFHIyVFGYuXY=; b=Bq/DjvhS3YROFm9KPXM4v2Pl8NhoV7yD7wMPHB/JE8/75/vqGB270Yu+AePhsqv139MqbD emx9dKBEFEJxSlSYUfKRO3i1AmyJDjwdUNHO4llF1v4RmP13zfPthCbonQ8hPcnyRfU1yb BOcsehK6kZWcaOhXSX/MhhrJC+JzfiE= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AED0DwB001331; Thu, 14 Nov 2024 15:34:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2023-11-20; bh=Py5Du 1aXatp3XRVKVEvGvm+Mt7BokMwnFHIyVFGYuXY=; b=gYRIMHFXfNL3vt+wZD0yq /kxkYRO6vtJkQmjEZ5zugaJNBNKHNBR/3GVQkV65u/qPx93GRSjstQ8AYpEcqMmC yuii4TCwheXxXCAxS7Uu5Q5fn55kJUjOFyt4kzxJ9VcG/lBusdpEqve+uk8LCiyK hkyCqPQXTUsoj+nuw5EaBXI2Ma1dTcJF4D3tC0A7E2cY2G4Sj8WLXHc1pFQ/0i4e MtTfejD5NYI042soMQoUqAyYeN66F7Eu5ZE6hwQ6g4JjHxhUMQYPnKIkvI6R0pLh 8TIbfzkxAeObNC1EBxPq79f3A3FPWklEoPAFUtHH0QFbMJjqGer2GsB92IXnZVrX Q== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42vsp4k6j2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Nov 2024 15:34:47 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4AEF89c8001233; Thu, 14 Nov 2024 15:34:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42sx6bayyj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Nov 2024 15:34:45 +0000 Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4AEFXvhv031217; Thu, 14 Nov 2024 15:34:45 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 42sx6baywk-2; Thu, 14 Nov 2024 15:34:45 +0000 From: Harshvardhan Jha To: akpm@linux-foundation.org Cc: harshvardhan.j.jha@oracle.com, linux-mm@kvack.org, stable@vger.kernel.org Subject: [PATCH 5.4.y 1/4] mm: clarify a confusing comment for remap_pfn_range() Date: Thu, 14 Nov 2024 07:34:40 -0800 Message-ID: <20241114153443.505015-2-harshvardhan.j.jha@oracle.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241114153443.505015-1-harshvardhan.j.jha@oracle.com> References: <20241114153443.505015-1-harshvardhan.j.jha@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-14_05,2024-11-13_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411140121 X-Proofpoint-ORIG-GUID: 3xyXFew6ROvjmSaAEire7-rfnv5U6nba X-Proofpoint-GUID: 3xyXFew6ROvjmSaAEire7-rfnv5U6nba X-Rspamd-Queue-Id: E3D5E1C0012 X-Stat-Signature: up7brihc3db696w761uh4fkqci5wshdm X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731598433-292702 X-HE-Meta: U2FsdGVkX18EZyVatuJpq/nSJxQANbVYfF6UQuywDjNbkGPGfTtazItJd4e2m0yn+Es8DljNfMMdHgL42KM5icIEwR7ctgzguQ4NiH1sokLi/Lk/QiBSiK1Em/Wenbb0cF+p/FudM4vZ/+z+qFIYUSz/flacauc+XfEbcNWqzhcddTTCnTPQo48XdCrZb2PEkVlRxv6JA6g4iHli5FwmGQh4yWxY8Xmd/wUAURJ/vL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iI0ndyxE888gVC2ERDTcwUiT4MnI0zP82f2YcM/iGaE9gLCdTy1Laxx54c3tnUeCVATnnb9crWQgo1KSNs= 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: WANG Wenhu commit 86a76331d94c4cfa72fe1831dbe4b492f66fdb81 upstream It really made me scratch my head. Replace the comment with an accurate and consistent description. The parameter pfn actually refers to the page frame number which is right-shifted by PAGE_SHIFT from the physical address. Signed-off-by: WANG Wenhu Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200310073955.43415-1-wenhu.wang@vivo.com Signed-off-by: Linus Torvalds (cherry picked from commit 86a76331d94c4cfa72fe1831dbe4b492f66fdb81) Signed-off-by: Harshvardhan Jha --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index f8d76c66311df..238064ef73ae8 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1921,7 +1921,7 @@ static inline int remap_p4d_range(struct mm_struct *mm, pgd_t *pgd, * remap_pfn_range - remap kernel memory to userspace * @vma: user vma to map to * @addr: target user address to start at - * @pfn: physical address of kernel memory + * @pfn: page frame number of kernel physical memory address * @size: size of map area * @prot: page protection flags for this mapping *