summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/media/atomisp/include/mmu/isp_mmu.h1
-rw-r--r--drivers/staging/media/atomisp/pci/mmu/isp_mmu.c24
2 files changed, 3 insertions, 22 deletions
diff --git a/drivers/staging/media/atomisp/include/mmu/isp_mmu.h b/drivers/staging/media/atomisp/include/mmu/isp_mmu.h
index c94df9012ac7..d9662c515236 100644
--- a/drivers/staging/media/atomisp/include/mmu/isp_mmu.h
+++ b/drivers/staging/media/atomisp/include/mmu/isp_mmu.h
@@ -113,7 +113,6 @@ struct isp_mmu {
phys_addr_t base_address;
struct mutex pt_mutex;
- struct kmem_cache *tbl_cache;
};
/* flags for PDE and PTE */
diff --git a/drivers/staging/media/atomisp/pci/mmu/isp_mmu.c b/drivers/staging/media/atomisp/pci/mmu/isp_mmu.c
index 06d907f6d143..8930fd629dc3 100644
--- a/drivers/staging/media/atomisp/pci/mmu/isp_mmu.c
+++ b/drivers/staging/media/atomisp/pci/mmu/isp_mmu.c
@@ -99,15 +99,8 @@ static phys_addr_t alloc_page_table(struct isp_mmu *mmu)
phys_addr_t page;
void *virt;
- /*page table lock may needed here*/
- /*
- * The slab allocator(kmem_cache and kmalloc family) doesn't handle
- * GFP_DMA32 flag, so we have to use buddy allocator.
- */
- if (totalram_pages() > (unsigned long)NR_PAGES_2GB)
- virt = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32);
- else
- virt = kmem_cache_zalloc(mmu->tbl_cache, GFP_KERNEL);
+ virt = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32);
+
if (!virt)
return (phys_addr_t)NULL_PAGE;
@@ -142,10 +135,7 @@ static void free_page_table(struct isp_mmu *mmu, phys_addr_t page)
set_memory_wb((unsigned long)virt, 1);
#endif
- if (totalram_pages() > (unsigned long)NR_PAGES_2GB)
- free_page((unsigned long)virt);
- else
- kmem_cache_free(mmu->tbl_cache, virt);
+ free_page((unsigned long)virt);
}
static void mmu_remap_error(struct isp_mmu *mmu,
@@ -541,12 +531,6 @@ int isp_mmu_init(struct isp_mmu *mmu, struct isp_mmu_client *driver)
mutex_init(&mmu->pt_mutex);
- mmu->tbl_cache = kmem_cache_create("iopte_cache", ISP_PAGE_SIZE,
- ISP_PAGE_SIZE, SLAB_HWCACHE_ALIGN,
- NULL);
- if (!mmu->tbl_cache)
- return -ENOMEM;
-
return 0;
}
@@ -579,6 +563,4 @@ void isp_mmu_exit(struct isp_mmu *mmu)
}
free_page_table(mmu, l1_pt);
-
- kmem_cache_destroy(mmu->tbl_cache);
}