aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-05-22 14:47:18 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 03:48:23 -0400
commit8d717a52d1b0959128be5134dd12608e8e4f2115 (patch)
tree6bc2aca8c9b14a9b0d2f86609e63c2436b03c2d6 /arch
parent2778f62056ada442414392d7ccd41188bb631619 (diff)
ARM: Convert platform reservations to use LMB rather than bootmem
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/memblock.h3
-rw-r--r--arch/arm/kernel/setup.c2
-rw-r--r--arch/arm/mach-clps711x/edb7211-arch.c4
-rw-r--r--arch/arm/mach-integrator/core.c4
-rw-r--r--arch/arm/mach-pxa/palmt5.c4
-rw-r--r--arch/arm/mach-pxa/palmtreo.c6
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c6
-rw-r--r--arch/arm/mach-s3c2440/mach-rx1950.c6
-rw-r--r--arch/arm/mach-s3c2440/mach-rx3715.c6
-rw-r--r--arch/arm/mach-u300/u300.c4
-rw-r--r--arch/arm/mm/init.c11
-rw-r--r--arch/arm/mm/mm.h3
-rw-r--r--arch/arm/mm/mmu.c2
-rw-r--r--arch/arm/mm/nommu.c2
14 files changed, 32 insertions, 31 deletions
diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h
index 3a1d58096f44..fdbc43b2e6c0 100644
--- a/arch/arm/include/asm/memblock.h
+++ b/arch/arm/include/asm/memblock.h
@@ -9,7 +9,8 @@ extern phys_addr_t lowmem_end_addr;
9#endif 9#endif
10 10
11struct meminfo; 11struct meminfo;
12struct machine_desc;
12 13
13extern void arm_memblock_init(struct meminfo *); 14extern void arm_memblock_init(struct meminfo *, struct machine_desc *);
14 15
15#endif 16#endif
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index dfd293477751..31b2643bb0c6 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -716,7 +716,7 @@ void __init setup_arch(char **cmdline_p)
716 716
717 parse_early_param(); 717 parse_early_param();
718 718
719 arm_memblock_init(&meminfo); 719 arm_memblock_init(&meminfo, mdesc);
720 720
721 paging_init(mdesc); 721 paging_init(mdesc);
722 request_standard_resources(&meminfo, mdesc); 722 request_standard_resources(&meminfo, mdesc);
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c
index 077f4051a06a..4a7a2322979a 100644
--- a/arch/arm/mach-clps711x/edb7211-arch.c
+++ b/arch/arm/mach-clps711x/edb7211-arch.c
@@ -18,7 +18,7 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/bootmem.h> 21#include <linux/memblock.h>
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/string.h> 23#include <linux/string.h>
24 24
@@ -33,7 +33,7 @@ extern void edb7211_map_io(void);
33/* Reserve screen memory region at the start of main system memory. */ 33/* Reserve screen memory region at the start of main system memory. */
34static void __init edb7211_reserve(void) 34static void __init edb7211_reserve(void)
35{ 35{
36 reserve_bootmem(PHYS_OFFSET, 0x00020000, BOOTMEM_DEFAULT); 36 memblock_reserve(PHYS_OFFSET, 0x00020000);
37} 37}
38 38
39static void __init 39static void __init
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index f815a1863f70..bcb26f01b26c 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -14,7 +14,7 @@
14#include <linux/spinlock.h> 14#include <linux/spinlock.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/bootmem.h> 17#include <linux/memblock.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <linux/smp.h> 19#include <linux/smp.h>
20#include <linux/termios.h> 20#include <linux/termios.h>
@@ -225,5 +225,5 @@ EXPORT_SYMBOL(cm_control);
225 */ 225 */
226void __init integrator_reserve(void) 226void __init integrator_reserve(void)
227{ 227{
228 reserve_bootmem(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET, BOOTMEM_DEFAULT); 228 memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
229} 229}
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 39fd788ab63b..5e92d84fe50d 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -21,7 +21,7 @@
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/gpio_keys.h> 22#include <linux/gpio_keys.h>
23#include <linux/input.h> 23#include <linux/input.h>
24#include <linux/bootmem.h> 24#include <linux/memblock.h>
25#include <linux/pda_power.h> 25#include <linux/pda_power.h>
26#include <linux/pwm_backlight.h> 26#include <linux/pwm_backlight.h>
27#include <linux/gpio.h> 27#include <linux/gpio.h>
@@ -399,7 +399,7 @@ static void __init palmt5_udc_init(void)
399 399
400static void __init palmt5_reserve(void) 400static void __init palmt5_reserve(void)
401{ 401{
402 reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE); 402 memblock_reserve(0xa0200000, 0x1000);
403} 403}
404 404
405static void __init palmt5_init(void) 405static void __init palmt5_init(void)
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index f5db4f7d7158..3d0c9cc2a406 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -20,7 +20,7 @@
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/gpio_keys.h> 21#include <linux/gpio_keys.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include <linux/bootmem.h> 23#include <linux/memblock.h>
24#include <linux/pda_power.h> 24#include <linux/pda_power.h>
25#include <linux/pwm_backlight.h> 25#include <linux/pwm_backlight.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
@@ -636,8 +636,8 @@ static void __init treo_lcd_power_init(void)
636 636
637static void __init treo_reserve(void) 637static void __init treo_reserve(void)
638{ 638{
639 reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE); 639 memblock_reserve(0xa0000000, 0x1000);
640 reserve_bootmem(0xa2000000, 0x1000, BOOTMEM_EXCLUSIVE); 640 memblock_reserve(0xa2000000, 0x1000);
641} 641}
642 642
643static void __init treo_init(void) 643static void __init treo_init(void)
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 2407aab4d1b8..3ba3bab139d0 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -15,7 +15,7 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/bootmem.h> 18#include <linux/memblock.h>
19#include <linux/timer.h> 19#include <linux/timer.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/sysdev.h> 21#include <linux/sysdev.h>
@@ -308,8 +308,8 @@ static void __init h1940_map_io(void)
308/* H1940 and RX3715 need to reserve this for suspend */ 308/* H1940 and RX3715 need to reserve this for suspend */
309static void __init h1940_reserve(void) 309static void __init h1940_reserve(void)
310{ 310{
311 reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); 311 memblock_reserve(0x30003000, 0x1000);
312 reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); 312 memblock_reserve(0x30081000, 0x1000);
313} 313}
314 314
315static void __init h1940_init_irq(void) 315static void __init h1940_init_irq(void)
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c
index f26d5d60c13d..142d1f921176 100644
--- a/arch/arm/mach-s3c2440/mach-rx1950.c
+++ b/arch/arm/mach-s3c2440/mach-rx1950.c
@@ -15,7 +15,7 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/bootmem.h> 18#include <linux/memblock.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/init.h> 21#include <linux/init.h>
@@ -574,8 +574,8 @@ static void __init rx1950_init_machine(void)
574/* H1940 and RX3715 need to reserve this for suspend */ 574/* H1940 and RX3715 need to reserve this for suspend */
575static void __init rx1950_reserve(void) 575static void __init rx1950_reserve(void)
576{ 576{
577 reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); 577 memblock_reserve(0x30003000, 0x1000);
578 reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); 578 memblock_reserve(0x30081000, 0x1000);
579} 579}
580 580
581MACHINE_START(RX1950, "HP iPAQ RX1950") 581MACHINE_START(RX1950, "HP iPAQ RX1950")
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c
index 6ebdb7bcf085..6bb44f75a9ce 100644
--- a/arch/arm/mach-s3c2440/mach-rx3715.c
+++ b/arch/arm/mach-s3c2440/mach-rx3715.c
@@ -15,7 +15,7 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/bootmem.h> 18#include <linux/memblock.h>
19#include <linux/timer.h> 19#include <linux/timer.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/tty.h> 21#include <linux/tty.h>
@@ -195,8 +195,8 @@ static void __init rx3715_map_io(void)
195/* H1940 and RX3715 need to reserve this for suspend */ 195/* H1940 and RX3715 need to reserve this for suspend */
196static void __init rx3715_reserve(void) 196static void __init rx3715_reserve(void)
197{ 197{
198 reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); 198 memblock_reserve(0x30003000, 0x1000);
199 reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); 199 memblock_reserve(0x30081000, 0x1000);
200} 200}
201 201
202static void __init rx3715_init_irq(void) 202static void __init rx3715_init_irq(void)
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
index 178dca4f9555..bfcda9820888 100644
--- a/arch/arm/mach-u300/u300.c
+++ b/arch/arm/mach-u300/u300.c
@@ -14,7 +14,7 @@
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/bootmem.h> 17#include <linux/memblock.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <mach/hardware.h> 20#include <mach/hardware.h>
@@ -33,7 +33,7 @@ static void __init u300_reserve(void)
33#ifdef CONFIG_MACH_U300_SINGLE_RAM 33#ifdef CONFIG_MACH_U300_SINGLE_RAM
34#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \ 34#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \
35 CONFIG_MACH_U300_2MB_ALIGNMENT_FIX 35 CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
36 reserve_bootmem(PHYS_OFFSET, 0x00100000, BOOTMEM_DEFAULT); 36 memblock_reserve(PHYS_OFFSET, 0x00100000);
37#endif 37#endif
38#endif 38#endif
39} 39}
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 4877e06308b7..99d6bc9b89bb 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -271,7 +271,7 @@ static void arm_memory_present(struct meminfo *mi)
271} 271}
272#endif 272#endif
273 273
274void __init arm_memblock_init(struct meminfo *mi) 274void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
275{ 275{
276 int i; 276 int i;
277 277
@@ -297,11 +297,15 @@ void __init arm_memblock_init(struct meminfo *mi)
297 297
298 arm_mm_memblock_reserve(); 298 arm_mm_memblock_reserve();
299 299
300 /* reserve any platform specific memblock areas */
301 if (mdesc->reserve)
302 mdesc->reserve();
303
300 memblock_analyze(); 304 memblock_analyze();
301 memblock_dump_all(); 305 memblock_dump_all();
302} 306}
303 307
304void __init bootmem_init(struct machine_desc *mdesc) 308void __init bootmem_init(void)
305{ 309{
306 struct meminfo *mi = &meminfo; 310 struct meminfo *mi = &meminfo;
307 unsigned long min, max_low, max_high; 311 unsigned long min, max_low, max_high;
@@ -312,9 +316,6 @@ void __init bootmem_init(struct machine_desc *mdesc)
312 316
313 arm_bootmem_init(mi, min, max_low); 317 arm_bootmem_init(mi, min, max_low);
314 318
315 if (mdesc->reserve)
316 mdesc->reserve();
317
318 /* 319 /*
319 * Sparsemem tries to allocate bootmem in memory_present(), 320 * Sparsemem tries to allocate bootmem in memory_present(),
320 * so must be done after the fixed reservations 321 * so must be done after the fixed reservations
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index fcfffae69b49..6630620380a4 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -28,6 +28,5 @@ extern void __flush_dcache_page(struct address_space *mapping, struct page *page
28 28
29#endif 29#endif
30 30
31struct machine_desc; 31void __init bootmem_init(void);
32void __init bootmem_init(struct machine_desc *);
33void arm_mm_memblock_reserve(void); 32void arm_mm_memblock_reserve(void);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 833a6c3f70c0..d5541adc3520 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1006,7 +1006,7 @@ void __init paging_init(struct machine_desc *mdesc)
1006 /* allocate the zero page. */ 1006 /* allocate the zero page. */
1007 zero_page = early_alloc(PAGE_SIZE); 1007 zero_page = early_alloc(PAGE_SIZE);
1008 1008
1009 bootmem_init(mdesc); 1009 bootmem_init();
1010 1010
1011 empty_zero_page = virt_to_page(zero_page); 1011 empty_zero_page = virt_to_page(zero_page);
1012 __flush_dcache_page(NULL, empty_zero_page); 1012 __flush_dcache_page(NULL, empty_zero_page);
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 40e38fcccc7a..687d02319a41 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -33,7 +33,7 @@ void __init arm_mm_memblock_reserve(void)
33 */ 33 */
34void __init paging_init(struct machine_desc *mdesc) 34void __init paging_init(struct machine_desc *mdesc)
35{ 35{
36 bootmem_init(mdesc); 36 bootmem_init();
37} 37}
38 38
39/* 39/*