aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/Kconfig2
-rw-r--r--arch/microblaze/include/asm/memblock.h (renamed from arch/microblaze/include/asm/lmb.h)10
-rw-r--r--arch/microblaze/kernel/prom.c14
-rw-r--r--arch/microblaze/mm/init.c40
4 files changed, 33 insertions, 33 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 76818f926539..505a08592423 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -5,7 +5,7 @@ mainmenu "Linux/Microblaze Kernel Configuration"
5 5
6config MICROBLAZE 6config MICROBLAZE
7 def_bool y 7 def_bool y
8 select HAVE_LMB 8 select HAVE_MEMBLOCK
9 select HAVE_FUNCTION_TRACER 9 select HAVE_FUNCTION_TRACER
10 select HAVE_FUNCTION_TRACE_MCOUNT_TEST 10 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
11 select HAVE_FUNCTION_GRAPH_TRACER 11 select HAVE_FUNCTION_GRAPH_TRACER
diff --git a/arch/microblaze/include/asm/lmb.h b/arch/microblaze/include/asm/memblock.h
index a0a0a929c293..f9c2fa331d2a 100644
--- a/arch/microblaze/include/asm/lmb.h
+++ b/arch/microblaze/include/asm/memblock.h
@@ -6,12 +6,12 @@
6 * for more details. 6 * for more details.
7 */ 7 */
8 8
9#ifndef _ASM_MICROBLAZE_LMB_H 9#ifndef _ASM_MICROBLAZE_MEMBLOCK_H
10#define _ASM_MICROBLAZE_LMB_H 10#define _ASM_MICROBLAZE_MEMBLOCK_H
11 11
12/* LMB limit is OFF */ 12/* MEMBLOCK limit is OFF */
13#define LMB_REAL_LIMIT 0xFFFFFFFF 13#define MEMBLOCK_REAL_LIMIT 0xFFFFFFFF
14 14
15#endif /* _ASM_MICROBLAZE_LMB_H */ 15#endif /* _ASM_MICROBLAZE_MEMBLOCK_H */
16 16
17 17
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index a15ef6d67ca9..427b13b4740f 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -29,7 +29,7 @@
29#include <linux/kexec.h> 29#include <linux/kexec.h>
30#include <linux/debugfs.h> 30#include <linux/debugfs.h>
31#include <linux/irq.h> 31#include <linux/irq.h>
32#include <linux/lmb.h> 32#include <linux/memblock.h>
33 33
34#include <asm/prom.h> 34#include <asm/prom.h>
35#include <asm/page.h> 35#include <asm/page.h>
@@ -49,12 +49,12 @@ void __init early_init_dt_scan_chosen_arch(unsigned long node)
49 49
50void __init early_init_dt_add_memory_arch(u64 base, u64 size) 50void __init early_init_dt_add_memory_arch(u64 base, u64 size)
51{ 51{
52 lmb_add(base, size); 52 memblock_add(base, size);
53} 53}
54 54
55u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) 55u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
56{ 56{
57 return lmb_alloc(size, align); 57 return memblock_alloc(size, align);
58} 58}
59 59
60#ifdef CONFIG_EARLY_PRINTK 60#ifdef CONFIG_EARLY_PRINTK
@@ -104,8 +104,8 @@ void __init early_init_devtree(void *params)
104 */ 104 */
105 of_scan_flat_dt(early_init_dt_scan_chosen, NULL); 105 of_scan_flat_dt(early_init_dt_scan_chosen, NULL);
106 106
107 /* Scan memory nodes and rebuild LMBs */ 107 /* Scan memory nodes and rebuild MEMBLOCKs */
108 lmb_init(); 108 memblock_init();
109 of_scan_flat_dt(early_init_dt_scan_root, NULL); 109 of_scan_flat_dt(early_init_dt_scan_root, NULL);
110 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 110 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
111 111
@@ -113,9 +113,9 @@ void __init early_init_devtree(void *params)
113 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE); 113 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
114 parse_early_param(); 114 parse_early_param();
115 115
116 lmb_analyze(); 116 memblock_analyze();
117 117
118 pr_debug("Phys. mem: %lx\n", (unsigned long) lmb_phys_mem_size()); 118 pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
119 119
120 pr_debug(" <- early_init_devtree()\n"); 120 pr_debug(" <- early_init_devtree()\n");
121} 121}
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index cca3579d4268..db5934989926 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -10,7 +10,7 @@
10#include <linux/bootmem.h> 10#include <linux/bootmem.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/lmb.h> 13#include <linux/memblock.h>
14#include <linux/mm.h> /* mem_init */ 14#include <linux/mm.h> /* mem_init */
15#include <linux/initrd.h> 15#include <linux/initrd.h>
16#include <linux/pagemap.h> 16#include <linux/pagemap.h>
@@ -76,10 +76,10 @@ void __init setup_memory(void)
76 u32 kernel_align_start, kernel_align_size; 76 u32 kernel_align_start, kernel_align_size;
77 77
78 /* Find main memory where is the kernel */ 78 /* Find main memory where is the kernel */
79 for (i = 0; i < lmb.memory.cnt; i++) { 79 for (i = 0; i < memblock.memory.cnt; i++) {
80 memory_start = (u32) lmb.memory.region[i].base; 80 memory_start = (u32) memblock.memory.region[i].base;
81 memory_end = (u32) lmb.memory.region[i].base 81 memory_end = (u32) memblock.memory.region[i].base
82 + (u32) lmb.memory.region[i].size; 82 + (u32) memblock.memory.region[i].size;
83 if ((memory_start <= (u32)_text) && 83 if ((memory_start <= (u32)_text) &&
84 ((u32)_text <= memory_end)) { 84 ((u32)_text <= memory_end)) {
85 memory_size = memory_end - memory_start; 85 memory_size = memory_end - memory_start;
@@ -100,7 +100,7 @@ void __init setup_memory(void)
100 kernel_align_start = PAGE_DOWN((u32)_text); 100 kernel_align_start = PAGE_DOWN((u32)_text);
101 /* ALIGN can be remove because _end in vmlinux.lds.S is align */ 101 /* ALIGN can be remove because _end in vmlinux.lds.S is align */
102 kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start; 102 kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start;
103 lmb_reserve(kernel_align_start, kernel_align_size); 103 memblock_reserve(kernel_align_start, kernel_align_size);
104 printk(KERN_INFO "%s: kernel addr=0x%08x-0x%08x size=0x%08x\n", 104 printk(KERN_INFO "%s: kernel addr=0x%08x-0x%08x size=0x%08x\n",
105 __func__, kernel_align_start, kernel_align_start 105 __func__, kernel_align_start, kernel_align_start
106 + kernel_align_size, kernel_align_size); 106 + kernel_align_size, kernel_align_size);
@@ -141,18 +141,18 @@ void __init setup_memory(void)
141 map_size = init_bootmem_node(&contig_page_data, 141 map_size = init_bootmem_node(&contig_page_data,
142 PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn); 142 PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn);
143#endif 143#endif
144 lmb_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size); 144 memblock_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size);
145 145
146 /* free bootmem is whole main memory */ 146 /* free bootmem is whole main memory */
147 free_bootmem(memory_start, memory_size); 147 free_bootmem(memory_start, memory_size);
148 148
149 /* reserve allocate blocks */ 149 /* reserve allocate blocks */
150 for (i = 0; i < lmb.reserved.cnt; i++) { 150 for (i = 0; i < memblock.reserved.cnt; i++) {
151 pr_debug("reserved %d - 0x%08x-0x%08x\n", i, 151 pr_debug("reserved %d - 0x%08x-0x%08x\n", i,
152 (u32) lmb.reserved.region[i].base, 152 (u32) memblock.reserved.region[i].base,
153 (u32) lmb_size_bytes(&lmb.reserved, i)); 153 (u32) memblock_size_bytes(&memblock.reserved, i));
154 reserve_bootmem(lmb.reserved.region[i].base, 154 reserve_bootmem(memblock.reserved.region[i].base,
155 lmb_size_bytes(&lmb.reserved, i) - 1, BOOTMEM_DEFAULT); 155 memblock_size_bytes(&memblock.reserved, i) - 1, BOOTMEM_DEFAULT);
156 } 156 }
157#ifdef CONFIG_MMU 157#ifdef CONFIG_MMU
158 init_bootmem_done = 1; 158 init_bootmem_done = 1;
@@ -235,7 +235,7 @@ static void mm_cmdline_setup(void)
235 if (maxmem && memory_size > maxmem) { 235 if (maxmem && memory_size > maxmem) {
236 memory_size = maxmem; 236 memory_size = maxmem;
237 memory_end = memory_start + memory_size; 237 memory_end = memory_start + memory_size;
238 lmb.memory.region[0].size = memory_size; 238 memblock.memory.region[0].size = memory_size;
239 } 239 }
240 } 240 }
241} 241}
@@ -273,19 +273,19 @@ asmlinkage void __init mmu_init(void)
273{ 273{
274 unsigned int kstart, ksize; 274 unsigned int kstart, ksize;
275 275
276 if (!lmb.reserved.cnt) { 276 if (!memblock.reserved.cnt) {
277 printk(KERN_EMERG "Error memory count\n"); 277 printk(KERN_EMERG "Error memory count\n");
278 machine_restart(NULL); 278 machine_restart(NULL);
279 } 279 }
280 280
281 if ((u32) lmb.memory.region[0].size < 0x1000000) { 281 if ((u32) memblock.memory.region[0].size < 0x1000000) {
282 printk(KERN_EMERG "Memory must be greater than 16MB\n"); 282 printk(KERN_EMERG "Memory must be greater than 16MB\n");
283 machine_restart(NULL); 283 machine_restart(NULL);
284 } 284 }
285 /* Find main memory where the kernel is */ 285 /* Find main memory where the kernel is */
286 memory_start = (u32) lmb.memory.region[0].base; 286 memory_start = (u32) memblock.memory.region[0].base;
287 memory_end = (u32) lmb.memory.region[0].base + 287 memory_end = (u32) memblock.memory.region[0].base +
288 (u32) lmb.memory.region[0].size; 288 (u32) memblock.memory.region[0].size;
289 memory_size = memory_end - memory_start; 289 memory_size = memory_end - memory_start;
290 290
291 mm_cmdline_setup(); /* FIXME parse args from command line - not used */ 291 mm_cmdline_setup(); /* FIXME parse args from command line - not used */
@@ -297,7 +297,7 @@ asmlinkage void __init mmu_init(void)
297 kstart = __pa(CONFIG_KERNEL_START); /* kernel start */ 297 kstart = __pa(CONFIG_KERNEL_START); /* kernel start */
298 /* kernel size */ 298 /* kernel size */
299 ksize = PAGE_ALIGN(((u32)_end - (u32)CONFIG_KERNEL_START)); 299 ksize = PAGE_ALIGN(((u32)_end - (u32)CONFIG_KERNEL_START));
300 lmb_reserve(kstart, ksize); 300 memblock_reserve(kstart, ksize);
301 301
302#if defined(CONFIG_BLK_DEV_INITRD) 302#if defined(CONFIG_BLK_DEV_INITRD)
303 /* Remove the init RAM disk from the available memory. */ 303 /* Remove the init RAM disk from the available memory. */
@@ -335,7 +335,7 @@ void __init *early_get_page(void)
335 * Mem start + 32MB -> here is limit 335 * Mem start + 32MB -> here is limit
336 * because of mem mapping from head.S 336 * because of mem mapping from head.S
337 */ 337 */
338 p = __va(lmb_alloc_base(PAGE_SIZE, PAGE_SIZE, 338 p = __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE,
339 memory_start + 0x2000000)); 339 memory_start + 0x2000000));
340 } 340 }
341 return p; 341 return p;