aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/init.c5
-rw-r--r--arch/arm/mm/mm.h3
-rw-r--r--arch/arm/mm/mmu.c63
-rw-r--r--arch/arm/mm/nommu.c2
4 files changed, 10 insertions, 63 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 4d2720888c50..1a227eea64bd 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -358,7 +358,7 @@ static void arm_memory_present(struct meminfo *mi)
358} 358}
359#endif 359#endif
360 360
361void __init bootmem_init(void) 361void __init bootmem_init(struct machine_desc *mdesc)
362{ 362{
363 struct meminfo *mi = &meminfo; 363 struct meminfo *mi = &meminfo;
364 unsigned long min, max_low, max_high; 364 unsigned long min, max_low, max_high;
@@ -380,6 +380,9 @@ void __init bootmem_init(void)
380 */ 380 */
381 reserve_special_regions(); 381 reserve_special_regions();
382 382
383 if (mdesc->reserve)
384 mdesc->reserve();
385
383 /* 386 /*
384 * If the initrd is present, reserve its memory. 387 * If the initrd is present, reserve its memory.
385 */ 388 */
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index 7b19c90ab295..afafe4fc5431 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -28,5 +28,6 @@ extern void __flush_dcache_page(struct address_space *mapping, struct page *page
28 28
29#endif 29#endif
30 30
31void __init bootmem_init(void); 31struct machine_desc;
32void __init bootmem_init(struct machine_desc *);
32void reserve_special_regions(void); 33void reserve_special_regions(void);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index ddb1bee6de73..1676d017a93a 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -17,7 +17,6 @@
17#include <linux/sort.h> 17#include <linux/sort.h>
18 18
19#include <asm/cputype.h> 19#include <asm/cputype.h>
20#include <asm/mach-types.h>
21#include <asm/sections.h> 20#include <asm/sections.h>
22#include <asm/cachetype.h> 21#include <asm/cachetype.h>
23#include <asm/setup.h> 22#include <asm/setup.h>
@@ -831,8 +830,6 @@ static inline void prepare_page_table(void)
831 */ 830 */
832void __init reserve_special_regions(void) 831void __init reserve_special_regions(void)
833{ 832{
834 unsigned long res_size = 0;
835
836 /* 833 /*
837 * Register the kernel text and data with bootmem. 834 * Register the kernel text and data with bootmem.
838 * Note that this can only be in node 0. 835 * Note that this can only be in node 0.
@@ -850,68 +847,14 @@ void __init reserve_special_regions(void)
850 reserve_bootmem(__pa(swapper_pg_dir), 847 reserve_bootmem(__pa(swapper_pg_dir),
851 PTRS_PER_PGD * sizeof(pgd_t), BOOTMEM_DEFAULT); 848 PTRS_PER_PGD * sizeof(pgd_t), BOOTMEM_DEFAULT);
852 849
853 /*
854 * Hmm... This should go elsewhere, but we really really need to
855 * stop things allocating the low memory; ideally we need a better
856 * implementation of GFP_DMA which does not assume that DMA-able
857 * memory starts at zero.
858 */
859 if (machine_is_integrator() || machine_is_cintegrator())
860 res_size = __pa(swapper_pg_dir) - PHYS_OFFSET;
861
862 /*
863 * These should likewise go elsewhere. They pre-reserve the
864 * screen memory region at the start of main system memory.
865 */
866 if (machine_is_edb7211())
867 res_size = 0x00020000;
868 if (machine_is_p720t())
869 res_size = 0x00014000;
870
871 /* H1940, RX3715 and RX1950 need to reserve this for suspend */
872
873 if (machine_is_h1940() || machine_is_rx3715()
874 || machine_is_rx1950()) {
875 reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT);
876 reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT);
877 }
878
879 if (machine_is_palmld() || machine_is_palmtx()) {
880 reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE);
881 reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE);
882 }
883
884 if (machine_is_treo680() || machine_is_centro()) {
885 reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE);
886 reserve_bootmem(0xa2000000, 0x1000, BOOTMEM_EXCLUSIVE);
887 }
888
889 if (machine_is_palmt5())
890 reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE);
891
892 /*
893 * U300 - This platform family can share physical memory
894 * between two ARM cpus, one running Linux and the other
895 * running another OS.
896 */
897 if (machine_is_u300()) {
898#ifdef CONFIG_MACH_U300_SINGLE_RAM
899#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \
900 CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
901 res_size = 0x00100000;
902#endif
903#endif
904 }
905
906#ifdef CONFIG_SA1111 850#ifdef CONFIG_SA1111
907 /* 851 /*
908 * Because of the SA1111 DMA bug, we want to preserve our 852 * Because of the SA1111 DMA bug, we want to preserve our
909 * precious DMA-able memory... 853 * precious DMA-able memory...
910 */ 854 */
911 res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; 855 reserve_bootmem(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET,
856 BOOTMEM_DEFAULT);
912#endif 857#endif
913 if (res_size)
914 reserve_bootmem(PHYS_OFFSET, res_size, BOOTMEM_DEFAULT);
915} 858}
916 859
917/* 860/*
@@ -1056,7 +999,7 @@ void __init paging_init(struct machine_desc *mdesc)
1056 sanity_check_meminfo(); 999 sanity_check_meminfo();
1057 prepare_page_table(); 1000 prepare_page_table();
1058 map_lowmem(); 1001 map_lowmem();
1059 bootmem_init(); 1002 bootmem_init(mdesc);
1060 devicemaps_init(mdesc); 1003 devicemaps_init(mdesc);
1061 kmap_init(); 1004 kmap_init();
1062 1005
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 25376d480b8e..ed58ddbbc5b3 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -46,7 +46,7 @@ void __init reserve_special_regions(void)
46 */ 46 */
47void __init paging_init(struct machine_desc *mdesc) 47void __init paging_init(struct machine_desc *mdesc)
48{ 48{
49 bootmem_init(); 49 bootmem_init(mdesc);
50} 50}
51 51
52/* 52/*