diff options
author | Alan Cox <alan@linux.intel.com> | 2017-03-08 11:39:20 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-08 13:40:00 +0100 |
commit | 1d3da3fed1a211d11d33aff1fb2438a1fc27740e (patch) | |
tree | 9a27241f082be67ef146cc7ae03a5b807d49937b /drivers/staging/media/atomisp/pci/atomisp2/mmu | |
parent | 2267a75047de86993b1280f59ba59bc8e3c0b599 (diff) |
atomisp: USE_KMEM_CACHE is always defined so remove the dead code
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/mmu')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c b/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c index b53aaa06e7d8..2009e3a11b86 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c @@ -103,14 +103,10 @@ static phys_addr_t alloc_page_table(struct isp_mmu *mmu) * The slab allocator(kmem_cache and kmalloc family) doesn't handle * GFP_DMA32 flag, so we have to use buddy allocator. */ -#ifdef USE_KMEM_CACHE 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); -#else - virt = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32); -#endif if (!virt) return (phys_addr_t)NULL_PAGE; @@ -144,11 +140,7 @@ static void free_page_table(struct isp_mmu *mmu, phys_addr_t page) set_memory_wb((unsigned long)virt, 1); #endif -#ifdef USE_KMEM_CACHE kmem_cache_free(mmu->tbl_cache, virt); -#else - free_page((unsigned long)virt); -#endif } static void mmu_remap_error(struct isp_mmu *mmu, @@ -559,13 +551,11 @@ int isp_mmu_init(struct isp_mmu *mmu, struct isp_mmu_client *driver) mutex_init(&mmu->pt_mutex); -#ifdef USE_KMEM_CACHE mmu->tbl_cache = kmem_cache_create("iopte_cache", ISP_PAGE_SIZE, ISP_PAGE_SIZE, SLAB_HWCACHE_ALIGN, NULL); if (!mmu->tbl_cache) return -ENOMEM; -#endif return 0; } @@ -600,7 +590,5 @@ void isp_mmu_exit(struct isp_mmu *mmu) free_page_table(mmu, l1_pt); -#ifdef USE_KMEM_CACHE kmem_cache_destroy(mmu->tbl_cache); -#endif } |