]> git.hungrycats.org Git - linux/commitdiff
[ARM] Update ARM memory region reservations.
authorRussell King <rmk@flint.arm.linux.org.uk>
Tue, 1 Jun 2004 21:36:39 +0000 (22:36 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Tue, 1 Jun 2004 21:36:39 +0000 (22:36 +0100)
Remove 26-bit ARM region reserves.

All region reserves start at PHYS_OFFSET, and we only ever have one,
so set res_size and reserve the region from PHYS_OFFSET size res_size.

Don't free the .init sections on Integrator/CP - they sit in the SSRAM
obscured region so we are unable to use them for DMA purposes.

arch/arm/mm/init.c

index c114be6c805cbcd98957212b952b7f1b6a77d64f..07ddce79808c4aa39a28158fc2b558edcb3ae209 100644 (file)
@@ -281,6 +281,7 @@ static int __init check_initrd(struct meminfo *mi)
 static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int bootmap_pages)
 {
        pg_data_t *pgdat = NODE_DATA(0);
+       unsigned long res_size = 0;
 
        /*
         * Register the kernel text and data with bootmem.
@@ -304,31 +305,32 @@ static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int boot
                             bootmap_pages << PAGE_SHIFT);
 
        /*
-        * Hmm... This should go elsewhere, but we really really
-        * need to stop things allocating the low memory; we need
-        * a better implementation of GFP_DMA which does not assume
-        * that DMA-able memory starts at zero.
+        * Hmm... This should go elsewhere, but we really really need to
+        * stop things allocating the low memory; ideally we need a better
+        * implementation of GFP_DMA which does not assume that DMA-able
+        * memory starts at zero.
         */
-       if (machine_is_integrator())
-               reserve_bootmem_node(pgdat, 0, __pa(swapper_pg_dir));
+       if (machine_is_integrator() || machine_is_cintegrator())
+               res_size = __pa(swapper_pg_dir) - PHYS_OFFSET;
+
        /*
-        * These should likewise go elsewhere.  They pre-reserve
-        * the screen memory region at the start of main system
-        * memory.
+        * These should likewise go elsewhere.  They pre-reserve the
+        * screen memory region at the start of main system memory.
         */
-       if (machine_is_archimedes() || machine_is_a5k())
-               reserve_bootmem_node(pgdat, 0x02000000, 0x00080000);
        if (machine_is_edb7211())
-               reserve_bootmem_node(pgdat, 0xc0000000, 0x00020000);
+               res_size = 0x00020000;
        if (machine_is_p720t())
-               reserve_bootmem_node(pgdat, PHYS_OFFSET, 0x00014000);
+               res_size = 0x00014000;
+
 #ifdef CONFIG_SA1111
        /*
-        * Because of the SA1111 DMA bug, we want to preserve
-        * our precious DMA-able memory...
+        * Because of the SA1111 DMA bug, we want to preserve our
+        * precious DMA-able memory...
         */
-       reserve_bootmem_node(pgdat, PHYS_OFFSET, __pa(swapper_pg_dir)-PHYS_OFFSET);
+       res_size = __pa(swapper_pg_dir) - PHYS_OFFSET;
 #endif
+       if (res_size)
+               reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size);
 }
 
 /*
@@ -601,7 +603,7 @@ void __init mem_init(void)
 
 void free_initmem(void)
 {
-       if (!machine_is_integrator()) {
+       if (!machine_is_integrator() && !machine_is_cintegrator()) {
                free_area((unsigned long)(&__init_begin),
                          (unsigned long)(&__init_end),
                          "init");