]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: nvmap: enable cache maint by set/ways
authorKrishna Reddy <vdumpa@nvidia.com>
Mon, 20 Jan 2014 20:25:31 +0000 (12:25 -0800)
committerKrishna Reddy <vdumpa@nvidia.com>
Fri, 21 Feb 2014 19:13:30 +0000 (11:13 -0800)
Enable cache maint by set/ways on arm64.

Change-Id: I5b2fd41465403301c761d5a5b77811ca5b9824bb
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/357829
(cherry picked from commit 3d723cd30ac3fb289b4e08bbac34351b369c2055)
Reviewed-on: http://git-master/r/370122
Reviewed-by: Adeel Raza <araza@nvidia.com>
GVS: Gerrit_Virtual_Submit

arch/arm64/mach-tegra/Kconfig
drivers/video/tegra/nvmap/nvmap_mm.c
drivers/video/tegra/nvmap/nvmap_priv.h

index 722d457bb0c7a361ea543847b0fed21eba7dad1b..e6fbb382c29afec8ae3120caaa55ca29b8c7b656 100644 (file)
@@ -17,6 +17,8 @@ config ARCH_TEGRA_13x_SOC
        select REPORT_PRESENT_CPUS if TEGRA_AUTO_HOTPLUG
        select ARCH_SUPPORTS_MSI if TEGRA_PCI
        select PCI_MSI if TEGRA_PCI
+       select NVMAP_CACHE_MAINT_BY_SET_WAYS if TEGRA_NVMAP
+       select NVMAP_CACHE_MAINT_BY_SET_WAYS_ON_ONE_CPU if TEGRA_NVMAP
        select ARCH_TEGRA_HAS_CL_DVFS
        select TEGRA_DYNAMIC_CBUS
        select TEGRA_DUAL_CBUS
index aeb67cba9f1e4cae7a22e7766198efca017e1cb9..5d09979ec9a9a79515679e5db3b4dd400b442393 100644 (file)
@@ -24,7 +24,9 @@
 
 void inner_flush_cache_all(void)
 {
-#if defined(CONFIG_ARM64)
+#if defined(CONFIG_ARM64) && defined(CONFIG_NVMAP_CACHE_MAINT_BY_SET_WAYS_ON_ONE_CPU)
+       __flush_dcache_all(NULL);
+#elif defined(CONFIG_ARM64)
        on_each_cpu(__flush_dcache_all, NULL, 1);
 #elif defined(CONFIG_NVMAP_CACHE_MAINT_BY_SET_WAYS_ON_ONE_CPU)
        v7_flush_kern_cache_all();
@@ -33,16 +35,18 @@ void inner_flush_cache_all(void)
 #endif
 }
 
-#ifndef CONFIG_ARM64
 void inner_clean_cache_all(void)
 {
+#if defined(CONFIG_ARM64)
+       inner_flush_cache_all();
+#else
 #ifdef CONFIG_NVMAP_CACHE_MAINT_BY_SET_WAYS_ON_ONE_CPU
        v7_clean_kern_cache_all(NULL);
 #else
        on_each_cpu(v7_clean_kern_cache_all, NULL, 1);
 #endif
-}
 #endif
+}
 
 void nvmap_flush_cache(struct page **pages, int numpages)
 {
index fcbe1630bf1b388a9f0a476204815042ac557482..eb53be44c262344d68ba43c4d78db60ade6a1293 100644 (file)
@@ -70,6 +70,7 @@ void _nvmap_handle_free(struct nvmap_handle *h);
 extern struct nvmap_share *nvmap_share;
 /* holds max number of handles allocted per process at any time */
 extern u32 nvmap_max_handle_count;
+extern size_t cache_maint_inner_threshold;
 
 extern struct platform_device *nvmap_pdev;
 
@@ -96,6 +97,7 @@ extern struct platform_device *nvmap_pdev;
 #define outer_flush_range(s, e)
 #define outer_inv_range(s, e)
 #define outer_clean_range(s, e)
+#define outer_flush_all()
 extern void __flush_dcache_page(struct page *);
 #else
 #define PG_PROT_KERNEL pgprot_kernel