video: tegra: nvmap: Remove high mem page cache flush.
Krishna Reddy [Fri, 2 Dec 2011 20:42:20 +0000 (12:42 -0800)]
Remove cache flush for high mem pages from nvmap as CPA is taking
care of cache flush for high mem pages.
Bug 865816

Change-Id: Ia7b06cdd80a16de0996c119dd950e68c5fd24b5b
Reviewed-on: http://git-master/r/71726
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/75881
Reviewed-by: Automatic_Commit_Validation_User

drivers/video/tegra/nvmap/nvmap_handle.c

index 9249529..87d2407 100644 (file)
@@ -152,7 +152,6 @@ static int handle_page_alloc(struct nvmap_client *client,
        pgprot_t prot;
        unsigned int i = 0;
        struct page **pages;
-       unsigned long base;
 
        pages = altalloc(nr_page * sizeof(*pages));
        if (!pages)
@@ -201,19 +200,7 @@ static int handle_page_alloc(struct nvmap_client *client,
                set_pages_array_uc(pages, nr_page);
        else if (h->flags == NVMAP_HANDLE_INNER_CACHEABLE)
                set_pages_array_iwb(pages, nr_page);
-       else
-               goto skip_cache_flush;
-
-       /* Flush the cache for allocated high mem pages only */
-       for (i = 0; i < nr_page; i++) {
-               if (PageHighMem(pages[i])) {
-                       __flush_dcache_page(page_mapping(pages[i]), pages[i]);
-                       base = page_to_phys(pages[i]);
-                       outer_flush_range(base, base + PAGE_SIZE);
-               }
-       }
 
-skip_cache_flush:
        h->size = size;
        h->pgalloc.pages = pages;
        h->pgalloc.contig = contiguous;