aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/machine_kexec.c18
-rw-r--r--arch/sh/kernel/setup.c8
2 files changed, 13 insertions, 13 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
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 272734681d29..e769401a78ba 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -30,7 +30,7 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/lmb.h> 33#include <linux/memblock.h>
34#include <asm/uaccess.h> 34#include <asm/uaccess.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/page.h> 36#include <asm/page.h>
@@ -141,10 +141,10 @@ void __init check_for_initrd(void)
141 goto disable; 141 goto disable;
142 } 142 }
143 143
144 if (unlikely(end > lmb_end_of_DRAM())) { 144 if (unlikely(end > memblock_end_of_DRAM())) {
145 pr_err("initrd extends beyond end of memory " 145 pr_err("initrd extends beyond end of memory "
146 "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 146 "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
147 end, (unsigned long)lmb_end_of_DRAM()); 147 end, (unsigned long)memblock_end_of_DRAM());
148 goto disable; 148 goto disable;
149 } 149 }
150 150
@@ -161,7 +161,7 @@ void __init check_for_initrd(void)
161 initrd_start = (unsigned long)__va(__pa(start)); 161 initrd_start = (unsigned long)__va(__pa(start));
162 initrd_end = initrd_start + INITRD_SIZE; 162 initrd_end = initrd_start + INITRD_SIZE;
163 163
164 lmb_reserve(__pa(initrd_start), INITRD_SIZE); 164 memblock_reserve(__pa(initrd_start), INITRD_SIZE);
165 165
166 return; 166 return;
167 167