Skip to contentSkip to conversation

x86: Use memblock_set_current_limit() to set limit for memblock.

PATCH In review Tang Chen 3 participants 3 messages Aug 14, 2013 x86

lore
Share & tools
lore

Tang Chen

author
#0 lore raw

PATCH 1/1 x86: Use memblock_set_current_limit() to set limit for memblock.

In setup_arch() of x86, it set memblock.current_limit directly. We should use memblock_set_current_limit(). If the implementation is changed, it is easy to maintain.

---
 arch/x86/kernel/setup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/setup.c +2 -2
index f8ec578..de33798 100644
@@ -1070,7 +1070,7 @@ void __init setup_arch(char **cmdline_p)
 
 	cleanup_highmap();
 
-	memblock.current_limit = ISA_END_ADDRESS;
+	memblock_set_current_limit(ISA_END_ADDRESS);
 	memblock_x86_fill();
 
 	/*
@@ -1103,7 +1103,7 @@ void __init setup_arch(char **cmdline_p)
 
 	setup_real_mode();
 
-	memblock.current_limit = get_max_mapped();
+	memblock_set_current_limit(get_max_mapped());
 	dma_contiguous_reserve(0);
 
 	/*
Signature · 1 line
1.7.1
#1 lore raw
x86: Use memblock_set_current_limit() to set limit for memblock.
Commit-ID:  2449f343e4adc778de1c3d45b5aa14fe788663f5
Gitweb:     http://git.kernel.org/tip/2449f343e4adc778de1c3d45b5aa14fe788663f5
Author:     Tang Chen <[email protected]>
AuthorDate: Wed, 14 Aug 2013 11:44:04 +0800
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Tue, 13 Aug 2013 21:27:02 -0700

x86: Use memblock_set_current_limit() to set limit for memblock.

In setup_arch() of x86, it set memblock.current_limit directly. We should use memblock_set_current_limit(). If the implementation is changed, it is easy to maintain.

---
 arch/x86/kernel/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/setup.c +2 -2
index f8ec578..de33798 100644
@@ -1070,7 +1070,7 @@ void __init setup_arch(char **cmdline_p)
 
 	cleanup_highmap();
 
-	memblock.current_limit = ISA_END_ADDRESS;
+	memblock_set_current_limit(ISA_END_ADDRESS);
 	memblock_x86_fill();
 
 	/*
@@ -1103,7 +1103,7 @@ void __init setup_arch(char **cmdline_p)
 
 	setup_real_mode();
 
-	memblock.current_limit = get_max_mapped();
+	memblock_set_current_limit(get_max_mapped());
 	dma_contiguous_reserve(0);
 
 	/*