Skip to contentSkip to conversation

x86/mm: Fix copy&paste error in comments

PATCH In review Cao jin 1 participant 2 messages Apr 20, 2021 – Apr 22, 2021

Subsystems (2)
lore
Share & tools
lore

Cao jin

author
#0 lore raw

PATCH 1/1 x86/mm: Fix copy&paste error in comments

Direct page mapping in bottom-up way will allocate memory from low address for page structures in a range, which is the *bottom*, not the *end*.

---
 arch/x86/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/init.c +1 -1
index e26f5c5c6565..bc2f871c75f1 100644
@@ -663,7 +663,7 @@ static void __init memory_map_bottom_up(unsigned long map_start,
 	/*
 	 * We start from the bottom (@map_start) and go to the top (@map_end).
 	 * The memblock_find_in_range() gets us a block of RAM from the
-	 * end of RAM in [min_pfn_mapped, max_pfn_mapped) used as new pages
+	 * bottom of RAM in [min_pfn_mapped, max_pfn_mapped) used as new pages
 	 * for page table.
 	 */
 	while (start < map_end) {
Signature · 1 line
2.30.1
author
#1 lore raw
Quoted 14 lines · Cao jin

Direct page mapping in bottom-up way will allocate memory from low address for page structures in a range, which is the *bottom*, not the *end*.

---
  arch/x86/mm/init.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/init.c +0 -0
index e26f5c5c6565..bc2f871c75f1 100644

arch/x86/mm/init.c static void __init memory_map_bottom_up(unsigned long map_start, · line 668

Quoted 7 lines
arch/x86/mm/init.c +1 -1
@@ -663,7 +663,7 @@ static void __init memory_map_bottom_up(unsigned long map_start,
  	/*
  	 * We start from the bottom (@map_start) and go to the top (@map_end).
  	 * The memblock_find_in_range() gets us a block of RAM from the
-	 * end of RAM in [min_pfn_mapped, max_pfn_mapped) used as new pages
+	 * bottom of RAM in [min_pfn_mapped, max_pfn_mapped) used as new pages
  	 * for page table.
  	 */

FYI: There is exactly the same sentence in memory_map_top_down(), looks like a copy & paste error to me.

--
Cao jin