2020-03-10 07:52:51

by 王文虎

[permalink] [raw]
Subject: [PATCH] mm: clarify a confusing comment of remap_pfn_range

It really made me scratching my head. Replace the comment
with an accurate and consistent description.

The parameter pfn actually referes to the page frame number
which is right-shifted by PAGE_SHIFT from the physical address.

Signed-off-by: WANG Wenhu <[email protected]>
---
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index e8bfdf0d9d1d..583f84519870 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1939,7 +1939,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
*
--
2.17.1