aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEspen Fjellvær Olsen <espen@mrfjo.org>2013-01-08 20:54:02 +0100
committerEspen Fjellvær Olsen <espen@mrfjo.org>2013-01-09 18:01:21 +0100
commit5528b5d5c43f0c38903db0e672581ec4176ae523 (patch)
tree60dcbd69fced4f5bb21d41b4780560503d1f29d2 /arch
parent3698988b7d3542ae549ef3ab93173840d9137f2e (diff)
downloadkernel_samsung_smdk4412-5528b5d5c43f0c38903db0e672581ec4176ae523.zip
kernel_samsung_smdk4412-5528b5d5c43f0c38903db0e672581ec4176ae523.tar.gz
kernel_samsung_smdk4412-5528b5d5c43f0c38903db0e672581ec4176ae523.tar.bz2
Revert "exynos-mem: Fix major security hole"
This reverts commit 9c1d0f487d28417858778d094f2eb98eb47ea2f7.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-exynos/mach-midas.c4
-rw-r--r--arch/arm/plat-s5p/reserve_mem.c14
2 files changed, 1 insertions, 17 deletions
diff --git a/arch/arm/mach-exynos/mach-midas.c b/arch/arm/mach-exynos/mach-midas.c
index ddc2d14..fc6c224 100644
--- a/arch/arm/mach-exynos/mach-midas.c
+++ b/arch/arm/mach-exynos/mach-midas.c
@@ -58,7 +58,6 @@
#ifdef CONFIG_DMA_CMA
#include <linux/dma-contiguous.h>
-#include <linux/exynos_mem.h>
#endif
#include <asm/mach/arch.h>
@@ -3424,14 +3423,11 @@ static void __init exynos4_reserve(void)
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1 * SZ_1K, 0x65800000, 0);
if (ret != 0)
panic("alloc failed for FIMC1\n");
- cma_region_descriptor_add(s3c_device_fimc1.name, 0x65800000,
- CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1 * SZ_1K);
#endif
#if defined(CONFIG_USE_MFC_CMA) && defined(CONFIG_MACH_M0)
ret = dma_declare_contiguous(&s5p_device_mfc.dev,
0x02800000, 0x5C800000, 0);
- cma_region_descriptor_add(s5p_device_mfc.name, 0x5C800000, 0x02800000);
#endif
if (ret != 0)
printk(KERN_ERR "%s Fail\n", __func__);
diff --git a/arch/arm/plat-s5p/reserve_mem.c b/arch/arm/plat-s5p/reserve_mem.c
index 32ac973..557938a 100644
--- a/arch/arm/plat-s5p/reserve_mem.c
+++ b/arch/arm/plat-s5p/reserve_mem.c
@@ -22,7 +22,6 @@
#ifdef CONFIG_CMA
#include <linux/cma.h>
-#include <linux/exynos_mem.h>
void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
struct cma_region *regions_secure,
size_t align_secure, const char *map)
@@ -70,9 +69,6 @@ void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
pr_debug("S5P/CMA: "
"Reserved 0x%08x/0x%08x for '%s'\n",
reg->start, reg->size, reg->name);
-
- cma_region_descriptor_add(reg->name, reg->start, reg->size);
-
paddr = reg->start;
} else {
paddr = memblock_find_in_range(0,
@@ -92,8 +88,6 @@ void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
pr_info("S5P/CMA: Reserved 0x%08x/0x%08x for '%s'\n",
reg->start, reg->size, reg->name);
-
- cma_region_descriptor_add(reg->name, reg->start, reg->size);
} else {
pr_err("S5P/CMA: No free space in memory for '%s'\n",
reg->name);
@@ -161,9 +155,6 @@ void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
}
if (paddr_last) {
- pr_info("S5P/CMA: "
- "Reserved 0x%08x/0x%08x for 'secure_region'\n",
- paddr_last, size_secure);
#ifndef CONFIG_DMA_CMA
while (memblock_reserve(paddr_last, size_secure))
paddr_last -= align_secure;
@@ -174,6 +165,7 @@ void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
paddr_last -= align_secure;
}
#endif
+
do {
#ifndef CONFIG_DMA_CMA
reg->start = paddr_last;
@@ -199,7 +191,6 @@ void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
if (memblock_reserve(reg->start,
reg->size))
panic("memblock\n");
-
#endif
} else {
reg->start = paddr_last;
@@ -210,9 +201,6 @@ void __init s5p_cma_region_reserve(struct cma_region *regions_normal,
pr_info("S5P/CMA: "
"Reserved 0x%08x/0x%08x for '%s'\n",
reg->start, reg->size, reg->name);
-
- cma_region_descriptor_add(reg->name, reg->start, reg->size);
-
if (cma_early_region_register(reg)) {
memblock_free(reg->start, reg->size);
pr_err("S5P/CMA: "