summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2011-12-14 10:31:27 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2011-12-14 11:31:39 +0800
commitd0df9fcd37e6e2bcd8a4fdbecac1316a989fe5b4 (patch)
tree46cf1a35fc3bdc6130cfcd67f1f7a1c1ccfcee99
parent9ef13aa76a9ed925bcf50582844c2f5d50dafde5 (diff)
ENGR00170215 pmem: remove ioremap for virtual address
ioremapped virtual address is only used by kenrel drivers who need to access pmem. But on our platform, we never have such use case. So remove this ioremap to save the vmalloc virtual kernel spaces for lowmem mapping. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
-rw-r--r--drivers/misc/pmem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/pmem.c b/drivers/misc/pmem.c
index c694f24a67d2..3027618a6a9f 100644
--- a/drivers/misc/pmem.c
+++ b/drivers/misc/pmem.c
@@ -105,8 +105,10 @@ struct pmem_info {
struct miscdevice dev;
/* physical start address of the remaped pmem space */
unsigned long base;
+#ifdef PMEM_VADDR_SUPPORT
/* vitual start address of the remaped pmem space */
unsigned char __iomem *vbase;
+#endif
/* total size of the pmem space */
unsigned long size;
/* number of entries in the pmem space */
@@ -471,10 +473,17 @@ static unsigned long pmem_start_addr(int id, struct pmem_data *data)
}
+#ifdef PMEM_VADDR_SUPPORT
static void *pmem_start_vaddr(int id, struct pmem_data *data)
{
return pmem_start_addr(id, data) - pmem[id].base + pmem[id].vbase;
}
+#else
+static void *pmem_start_vaddr(int id, struct pmem_data *data)
+{
+ return 0;
+}
+#endif
static unsigned long pmem_len(int id, struct pmem_data *data)
{
@@ -1273,6 +1282,7 @@ int pmem_setup(struct android_pmem_platform_data *pdata,
}
}
+#ifdef PMEM_VADDR_SUPPORT
if (pmem[id].cached)
pmem[id].vbase = ioremap_cached(pmem[id].base,
pmem[id].size);
@@ -1286,6 +1296,7 @@ int pmem_setup(struct android_pmem_platform_data *pdata,
if (pmem[id].vbase == 0)
goto error_cant_remap;
+#endif
pmem[id].garbage_pfn = page_to_pfn(alloc_page(GFP_KERNEL));
if (pmem[id].no_allocator)