Skip to contentSkip to conversation

x86: fix a wrong argument of reserve_bootmem()

PATCH In review Amerigo Wang 2 participants 4 messages Aug 21, 2009 – Aug 24, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix a wrong argument of reserve_bootmem()

This line looks suspicious, because if this is true, then the 'flags' parameter of function reserve_bootmem_generic() will be unused when !CONFIG_NUMA. I don't think this is what we want.

Cc Ingo Molnar <[email protected]>
Cc Yinghai Lu <[email protected]>

---

arch/x86/mm/init_64.c +1 -1
index 6176fe8..ea56b8c 100644
@@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 		return ret;
 
 #else
-	reserve_bootmem(phys, len, BOOTMEM_DEFAULT);
+	reserve_bootmem(phys, len, flags);
 #endif
 
 	if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {
#1 lore raw
Quoted 14 lines · Amerigo Wang

This line looks suspicious, because if this is true, then the 'flags' parameter of function reserve_bootmem_generic() will be unused when !CONFIG_NUMA. I don't think this is what we want.

Cc Ingo Molnar <[email protected]>
Cc Yinghai Lu <[email protected]>

---

arch/x86/mm/init_64.c +0 -0
index 6176fe8..ea56b8c 100644

arch/x86/mm/init_64.c int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, · line 799

Quoted 5 lines
arch/x86/mm/init_64.c +1 -1
@@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 		return ret;
 
 #else
-	reserve_bootmem(phys, len, BOOTMEM_DEFAULT);
+	reserve_bootmem(phys, len, flags);

Yes, this looks like an oversight. Since it only affected 32-bit NUMA materially, which is quite rare, it probably didnt matter that much but should be fixed ...

Ingo

#2 lore raw

[tip:x86/urgent] x86: Fix an incorrect argument of reserve_bootmem()

In reply to Amerigo Wang
Commit-ID:  3e0e1e9c5a327d4dba8490d83ef55c0564e6e8a7
Gitweb:     http://git.kernel.org/tip/3e0e1e9c5a327d4dba8490d83ef55c0564e6e8a7
Author:     Amerigo Wang <[email protected]>
AuthorDate: Fri, 21 Aug 2009 04:34:45 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 21 Aug 2009 16:40:31 +0200

x86: Fix an incorrect argument of reserve_bootmem()

This line looks suspicious, because if this is true, then the 'flags' parameter of function reserve_bootmem_generic() will be unused when !CONFIG_NUMA. I don't think this is what we want.

LKML-Reference: <[email protected]>

---
 arch/x86/mm/init_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init_64.c +1 -1
index 6176fe8..ea56b8c 100644
@@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 		return ret;
 
 #else
-	reserve_bootmem(phys, len, BOOTMEM_DEFAULT);
+	reserve_bootmem(phys, len, flags);
 #endif
 
 	if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {
#3 lore raw

[tip:x86/urgent] x86: Fix an incorrect argument of reserve_bootmem()

In reply to Amerigo Wang
Commit-ID:  a6a06f7b577f89d0b916c5ccaff67ca5ed444a78
Gitweb:     http://git.kernel.org/tip/a6a06f7b577f89d0b916c5ccaff67ca5ed444a78
Author:     Amerigo Wang <[email protected]>
AuthorDate: Fri, 21 Aug 2009 04:34:45 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 24 Aug 2009 20:22:55 +0200

x86: Fix an incorrect argument of reserve_bootmem()

This line looks suspicious, because if this is true, then the 'flags' parameter of function reserve_bootmem_generic() will be unused when !CONFIG_NUMA. I don't think this is what we want.

LKML-Reference: <[email protected]>

---
 arch/x86/mm/init_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init_64.c +1 -1
index 6176fe8..ea56b8c 100644
@@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 		return ret;
 
 #else
-	reserve_bootmem(phys, len, BOOTMEM_DEFAULT);
+	reserve_bootmem(phys, len, flags);
 #endif
 
 	if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {