diff options
author | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-07-09 12:54:17 +0800 |
---|---|---|
committer | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-07-10 11:17:31 +0800 |
commit | 12f2735b5dd30eb79f31d1478397b3834a1cf154 (patch) | |
tree | cfc6d00102a5890d33af8a7d05f692eb0af671ef | |
parent | 9e3fdb64c63565175fea16c257370af58c699d06 (diff) |
ENGR00216013-2 mx6: not call memblock_free after reserve memory.
Remove call memblock_free after reserve memory with memblock_allocate().
The function of memblock_free is to remove the memory block from reserve list
of memblock, it will totally lost the info about how much phy memory
we have.
Skipping call this can make the reserved memory be accountable in
memblock With no side-effect.
After doing this, we can know how much our phy memory is, then can add check
in our driver like(vpu) to check the phy memory valid or not before vpu start
use the address.
Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_arm2.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabreauto.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabrelite.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabresd.c | 4 | ||||
-rwxr-xr-x | arch/arm/mach-mx6/board-mx6sl_arm2.c | 1 |
5 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_arm2.c b/arch/arm/mach-mx6/board-mx6q_arm2.c index 725cfde33b17..2bfd23e6085b 100644 --- a/arch/arm/mach-mx6/board-mx6q_arm2.c +++ b/arch/arm/mach-mx6/board-mx6q_arm2.c @@ -2213,7 +2213,6 @@ static void __init mx6_arm2_reserve(void) if (imx6_gpu_pdata.reserved_mem_size) { phys = memblock_alloc_base( imx6_gpu_pdata.reserved_mem_size, SZ_4K, SZ_2G); - memblock_free(phys, imx6_gpu_pdata.reserved_mem_size); memblock_remove(phys, imx6_gpu_pdata.reserved_mem_size); imx6_gpu_pdata.reserved_mem_base = phys; } diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c index bb70478715ab..2e5cf702a23b 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c +++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c @@ -1574,7 +1574,6 @@ static void __init mx6q_reserve(void) if (imx6q_gpu_pdata.reserved_mem_size) { phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size, SZ_4K, SZ_2G); - memblock_free(phys, imx6q_gpu_pdata.reserved_mem_size); memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size); imx6q_gpu_pdata.reserved_mem_base = phys; } diff --git a/arch/arm/mach-mx6/board-mx6q_sabrelite.c b/arch/arm/mach-mx6/board-mx6q_sabrelite.c index 86c57c06e3a0..3f00ae563492 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabrelite.c +++ b/arch/arm/mach-mx6/board-mx6q_sabrelite.c @@ -1249,7 +1249,6 @@ static void __init mx6q_sabrelite_reserve(void) if (imx6q_gpu_pdata.reserved_mem_size) { phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size, SZ_4K, SZ_1G); - memblock_free(phys, imx6q_gpu_pdata.reserved_mem_size); memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size); imx6q_gpu_pdata.reserved_mem_base = phys; } @@ -1257,7 +1256,6 @@ static void __init mx6q_sabrelite_reserve(void) if (imx_ion_data.heaps[0].size) { phys = memblock_alloc(imx_ion_data.heaps[0].size, SZ_4K); - memblock_free(phys, imx_ion_data.heaps[0].size); memblock_remove(phys, imx_ion_data.heaps[0].size); imx_ion_data.heaps[0].base = phys; } @@ -1267,7 +1265,6 @@ static void __init mx6q_sabrelite_reserve(void) /* reserve for background buffer */ phys = memblock_alloc(sabrelite_fb_data[i].res_size[0], SZ_4K); - memblock_free(phys, sabrelite_fb_data[i].res_size[0]); memblock_remove(phys, sabrelite_fb_data[i].res_size[0]); sabrelite_fb_data[i].res_base[0] = phys; } diff --git a/arch/arm/mach-mx6/board-mx6q_sabresd.c b/arch/arm/mach-mx6/board-mx6q_sabresd.c index 60b736ed09cd..8452ca06f639 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabresd.c +++ b/arch/arm/mach-mx6/board-mx6q_sabresd.c @@ -1895,11 +1895,11 @@ static void __init mx6q_sabresd_reserve(void) { phys_addr_t phys; int i; + #if defined(CONFIG_MXC_GPU_VIV) || defined(CONFIG_MXC_GPU_VIV_MODULE) if (imx6q_gpu_pdata.reserved_mem_size) { phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size, SZ_4K, SZ_1G); - memblock_free(phys, imx6q_gpu_pdata.reserved_mem_size); memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size); imx6q_gpu_pdata.reserved_mem_base = phys; } @@ -1907,7 +1907,6 @@ static void __init mx6q_sabresd_reserve(void) if (imx_ion_data.heaps[0].size) { phys = memblock_alloc(imx_ion_data.heaps[0].size, SZ_4K); - memblock_free(phys, imx_ion_data.heaps[0].size); memblock_remove(phys, imx_ion_data.heaps[0].size); imx_ion_data.heaps[0].base = phys; } @@ -1917,7 +1916,6 @@ static void __init mx6q_sabresd_reserve(void) /* reserve for background buffer */ phys = memblock_alloc(sabresd_fb_data[i].res_size[0], SZ_4K); - memblock_free(phys, sabresd_fb_data[i].res_size[0]); memblock_remove(phys, sabresd_fb_data[i].res_size[0]); sabresd_fb_data[i].res_base[0] = phys; } diff --git a/arch/arm/mach-mx6/board-mx6sl_arm2.c b/arch/arm/mach-mx6/board-mx6sl_arm2.c index 5ba62fad8257..2507970133eb 100755 --- a/arch/arm/mach-mx6/board-mx6sl_arm2.c +++ b/arch/arm/mach-mx6/board-mx6sl_arm2.c @@ -1313,7 +1313,6 @@ static void __init mx6_arm2_reserve(void) if (imx6q_gpu_pdata.reserved_mem_size) { phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size, SZ_4K, MEMBLOCK_ALLOC_ACCESSIBLE); - memblock_free(phys, imx6q_gpu_pdata.reserved_mem_size); memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size); imx6q_gpu_pdata.reserved_mem_base = phys; } |