From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45FF33BED43 for ; Tue, 12 May 2026 15:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778600780; cv=none; b=NXH7k+NXP/00uj+CNWfXiMSKvfp4wYoow/IxCK0ZDUbnDHwmspTiol52TstRDMP+wUoqxrOeIxuQuUDWGNS810FOnJqcjt9eclCUY5hqBAGwluvuQsAYv06Lkog5mzEdTvkBMmuGWTY3fRrqobAUEogoGf9niCJPP8AR1HJby/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778600780; c=relaxed/simple; bh=W32sOgDSkfkFndIpYZ/iTaOl8RCJh+fj5EEJpUKDOnU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Tu5MoSLaiVY27ffavlnDX1+/QWgKeudHJNfmeKFhFJ4WYWMUfOBwtLUZgs0kL7c4QbqZIsUINUIqq2Ku58Rj2GAgLi2CPQaWVbRP9pWOb5dSx718QbGIHDuDX98Y4nXN/To/xE1lroisSCnUqaozn36q8vxUYVBfLT9E+GLDkz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I/TpK4bl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I/TpK4bl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53D7BC2BCB0; Tue, 12 May 2026 15:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778600779; bh=W32sOgDSkfkFndIpYZ/iTaOl8RCJh+fj5EEJpUKDOnU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I/TpK4bl98aV/sTC1haCa4Cuuak2SE+h1ZI1AB4DfIJfpaF8O8dA2+dHUGYJ9HC+R S2sendxfqPps6CZQDi12lE3ER1ez+BSXCqZWvDJjKM4P2e3dQbDYF8BU1bj1LGON6O 99JffUSLFzaYX4pZV5Sl60+GbL2D1+TFKWcYu/2nAx01TN58NA7mVrXcXby4n3NNwR iPJN64ZmkW8Jae5bYGXdouEfnhIYJWxZ8KQRXK+A0afpQ0QAILJ1WYY+qzlVy4wEaj N4644hTWHCqS/F2bLPu6CvDW8c5A0YSznOaRGm0dhKKENzI2njlBQ2KitJyQDUrsD4 CVd5dBamh0fLg== Date: Tue, 12 May 2026 16:46:14 +0100 From: Lorenzo Stoakes To: Minu Jin Cc: akpm@linux-foundation.org, david@kernel.org, liam@infradead.org, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: fix misleading comment for remap_pfn_range() Message-ID: References: <20260512143543.258399-1-s9430939@naver.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260512143543.258399-1-s9430939@naver.com> On Tue, May 12, 2026 at 11:35:43PM +0900, Minu Jin wrote: > The function summary describes this as remapping "kernel memory", > but remap_pfn_range() operates on arbitrary PFNs, including > device MMIO regions that are not kernel memory at all. > > Replace with "physical address range". > It describes accurately what the function maps. > > Signed-off-by: Minu Jin Hm, arguably those are 'kernel' memory in some sense. And 'physical address range' is a little confusing vs. PFN's as PFN's != physical addresses. Also remap_pfn_range() is, in effect, a deprecated function as we move drivers to using mmap_prepare equivalents (implemented in remap_pfn_range_prepare()) so I'm not sure it's really worth updating? > --- > mm/memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory.c b/mm/memory.c > index ea6568571131..4e07e03a76a4 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -3172,7 +3172,7 @@ static int remap_pfn_range_prepare_vma(struct vm_area_struct *vma, > } > > /** > - * remap_pfn_range - remap kernel memory to userspace > + * remap_pfn_range - remap physical address range to user space > * @vma: user vma to map to > * @addr: target page aligned user address to start at > * @pfn: page frame number of kernel physical memory address > -- > 2.43.0 > Cheers, Lorenzo