Commit 8749193e authored by Russell King's avatar Russell King

[ARM] Update ARM memory region reservations.

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.
parent 20e743bb
...@@ -281,6 +281,7 @@ static int __init check_initrd(struct meminfo *mi) ...@@ -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) static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int bootmap_pages)
{ {
pg_data_t *pgdat = NODE_DATA(0); pg_data_t *pgdat = NODE_DATA(0);
unsigned long res_size = 0;
/* /*
* Register the kernel text and data with bootmem. * 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 ...@@ -304,31 +305,32 @@ static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int boot
bootmap_pages << PAGE_SHIFT); bootmap_pages << PAGE_SHIFT);
/* /*
* Hmm... This should go elsewhere, but we really really * Hmm... This should go elsewhere, but we really really need to
* need to stop things allocating the low memory; we need * stop things allocating the low memory; ideally we need a better
* a better implementation of GFP_DMA which does not assume * implementation of GFP_DMA which does not assume that DMA-able
* that DMA-able memory starts at zero. * memory starts at zero.
*/ */
if (machine_is_integrator()) if (machine_is_integrator() || machine_is_cintegrator())
reserve_bootmem_node(pgdat, 0, __pa(swapper_pg_dir)); res_size = __pa(swapper_pg_dir) - PHYS_OFFSET;
/* /*
* These should likewise go elsewhere. They pre-reserve * These should likewise go elsewhere. They pre-reserve the
* the screen memory region at the start of main system * screen memory region at the start of main system memory.
* memory.
*/ */
if (machine_is_archimedes() || machine_is_a5k())
reserve_bootmem_node(pgdat, 0x02000000, 0x00080000);
if (machine_is_edb7211()) if (machine_is_edb7211())
reserve_bootmem_node(pgdat, 0xc0000000, 0x00020000); res_size = 0x00020000;
if (machine_is_p720t()) if (machine_is_p720t())
reserve_bootmem_node(pgdat, PHYS_OFFSET, 0x00014000); res_size = 0x00014000;
#ifdef CONFIG_SA1111 #ifdef CONFIG_SA1111
/* /*
* Because of the SA1111 DMA bug, we want to preserve * Because of the SA1111 DMA bug, we want to preserve our
* our precious DMA-able memory... * 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 #endif
if (res_size)
reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size);
} }
/* /*
...@@ -601,7 +603,7 @@ void __init mem_init(void) ...@@ -601,7 +603,7 @@ void __init mem_init(void)
void free_initmem(void) void free_initmem(void)
{ {
if (!machine_is_integrator()) { if (!machine_is_integrator() && !machine_is_cintegrator()) {
free_area((unsigned long)(&__init_begin), free_area((unsigned long)(&__init_begin),
(unsigned long)(&__init_end), (unsigned long)(&__init_end),
"init"); "init");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment