Re: [PATCH 01/02] omap: dsp: remove shm from normal memory

2010-12-02 Thread Russell King - ARM Linux
On Wed, Nov 10, 2010 at 07:50:24PM -0600, Omar Ramirez Luna wrote:
 From: Felipe Contreras felipe.contre...@gmail.com
 
 Also, don't be picky about the location, which incidentally fixes the
 build since MEMBLOCK_REAL_LIMIT is gone on 2.6.37.

That comment is wrong.  memblock_alloc() is still as picky as the
original.

phys_addr_t __init memblock_alloc(phys_addr_t size, phys_addr_t align)
{
return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE);
}

/* Pump up max_addr */
if (end == MEMBLOCK_ALLOC_ACCESSIBLE)
end = memblock.current_limit;

and current_limit is initialized to what was MEMBLOCK_REAL_LIMIT.  So,
memblock_alloc() will always allocate from lowmem.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/02] omap: dsp: remove shm from normal memory

2010-11-10 Thread Omar Ramirez Luna
From: Felipe Contreras felipe.contre...@gmail.com

Also, don't be picky about the location, which incidentally fixes the
build since MEMBLOCK_REAL_LIMIT is gone on 2.6.37.

arch/arm/plat-omap/devices.c: In function 'omap_dsp_reserve_sdram_memblock':
arch/arm/plat-omap/devices.c:287: error: 'MEMBLOCK_REAL_LIMIT'
undeclared (first use in this function)

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
Acked-by: Tony Lindgren t...@atomide.com
Signed-off-by: Omar Ramirez Luna omar.rami...@ti.com
---
 arch/arm/plat-omap/devices.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 6f42a18..fc81912 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -284,12 +284,14 @@ void __init omap_dsp_reserve_sdram_memblock(void)
if (!size)
return;
 
-   paddr = __memblock_alloc_base(size, SZ_1M, MEMBLOCK_REAL_LIMIT);
+   paddr = memblock_alloc(size, SZ_1M);
if (!paddr) {
pr_err(%s: failed to reserve %x bytes\n,
__func__, size);
return;
}
+   memblock_free(paddr, size);
+   memblock_remove(paddr, size);
 
omap_dsp_phys_mempool_base = paddr;
 }
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html