diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-12 00:36:09 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-14 03:14:00 -0400 |
commit | 95f72d1ed41a66f1c1c29c24d479de81a0bea36f (patch) | |
tree | bd92b3804ff0bea083d69af0ede52f99ab34c0af /arch/sh/kernel/machine_kexec.c | |
parent | 1c5474a65bf15a4cb162dfff86d6d0b5a08a740c (diff) |
lmb: rename to memblock
via following scripts
FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
sed -i \
-e 's/lmb/memblock/g' \
-e 's/LMB/MEMBLOCK/g' \
$FILES
for N in $(find . -name lmb.[ch]); do
M=$(echo $N | sed 's/lmb/memblock/g')
mv $N $M
done
and remove some wrong change like lmbench and dlmb etc.
also move memblock.c from lib/ to mm/
Suggested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/sh/kernel/machine_kexec.c')
-rw-r--r-- | arch/sh/kernel/machine_kexec.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index 5a559e666eb3..e2a3af31ff99 100644 --- a/arch/sh/kernel/machine_kexec.c +++ b/arch/sh/kernel/machine_kexec.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/numa.h> | 15 | #include <linux/numa.h> |
16 | #include <linux/ftrace.h> | 16 | #include <linux/ftrace.h> |
17 | #include <linux/suspend.h> | 17 | #include <linux/suspend.h> |
18 | #include <linux/lmb.h> | 18 | #include <linux/memblock.h> |
19 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
20 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
21 | #include <asm/mmu_context.h> | 21 | #include <asm/mmu_context.h> |
@@ -157,10 +157,10 @@ void __init reserve_crashkernel(void) | |||
157 | unsigned long long crash_size, crash_base; | 157 | unsigned long long crash_size, crash_base; |
158 | int ret; | 158 | int ret; |
159 | 159 | ||
160 | /* this is necessary because of lmb_phys_mem_size() */ | 160 | /* this is necessary because of memblock_phys_mem_size() */ |
161 | lmb_analyze(); | 161 | memblock_analyze(); |
162 | 162 | ||
163 | ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(), | 163 | ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(), |
164 | &crash_size, &crash_base); | 164 | &crash_size, &crash_base); |
165 | if (ret == 0 && crash_size > 0) { | 165 | if (ret == 0 && crash_size > 0) { |
166 | crashk_res.start = crash_base; | 166 | crashk_res.start = crash_base; |
@@ -172,14 +172,14 @@ void __init reserve_crashkernel(void) | |||
172 | 172 | ||
173 | crash_size = PAGE_ALIGN(crashk_res.end - crashk_res.start + 1); | 173 | crash_size = PAGE_ALIGN(crashk_res.end - crashk_res.start + 1); |
174 | if (!crashk_res.start) { | 174 | if (!crashk_res.start) { |
175 | unsigned long max = lmb_end_of_DRAM() - memory_limit; | 175 | unsigned long max = memblock_end_of_DRAM() - memory_limit; |
176 | crashk_res.start = __lmb_alloc_base(crash_size, PAGE_SIZE, max); | 176 | crashk_res.start = __memblock_alloc_base(crash_size, PAGE_SIZE, max); |
177 | if (!crashk_res.start) { | 177 | if (!crashk_res.start) { |
178 | pr_err("crashkernel allocation failed\n"); | 178 | pr_err("crashkernel allocation failed\n"); |
179 | goto disable; | 179 | goto disable; |
180 | } | 180 | } |
181 | } else { | 181 | } else { |
182 | ret = lmb_reserve(crashk_res.start, crash_size); | 182 | ret = memblock_reserve(crashk_res.start, crash_size); |
183 | if (unlikely(ret < 0)) { | 183 | if (unlikely(ret < 0)) { |
184 | pr_err("crashkernel reservation failed - " | 184 | pr_err("crashkernel reservation failed - " |
185 | "memory is in use\n"); | 185 | "memory is in use\n"); |
@@ -192,7 +192,7 @@ void __init reserve_crashkernel(void) | |||
192 | /* | 192 | /* |
193 | * Crash kernel trumps memory limit | 193 | * Crash kernel trumps memory limit |
194 | */ | 194 | */ |
195 | if ((lmb_end_of_DRAM() - memory_limit) <= crashk_res.end) { | 195 | if ((memblock_end_of_DRAM() - memory_limit) <= crashk_res.end) { |
196 | memory_limit = 0; | 196 | memory_limit = 0; |
197 | pr_info("Disabled memory limit for crashkernel\n"); | 197 | pr_info("Disabled memory limit for crashkernel\n"); |
198 | } | 198 | } |
@@ -201,7 +201,7 @@ void __init reserve_crashkernel(void) | |||
201 | "for crashkernel (System RAM: %ldMB)\n", | 201 | "for crashkernel (System RAM: %ldMB)\n", |
202 | (unsigned long)(crash_size >> 20), | 202 | (unsigned long)(crash_size >> 20), |
203 | (unsigned long)(crashk_res.start), | 203 | (unsigned long)(crashk_res.start), |
204 | (unsigned long)(lmb_phys_mem_size() >> 20)); | 204 | (unsigned long)(memblock_phys_mem_size() >> 20)); |
205 | 205 | ||
206 | return; | 206 | return; |
207 | 207 | ||