MGS-2664-4 [#imx-403] fix __dma_flush_range wht 4.9 kernel
authorXianzhong <xianzhong.li@nxp.com>
Thu, 16 Feb 2017 08:08:58 +0000 (16:08 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:10:45 +0000 (15:10 -0500)
__dma_flush_range interface is removed in 4.9 kernel version,
should use the replaceable function with __dma_flush_area instead.

Date: Feb 16, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c

index ba575cf..0c70862 100644 (file)
@@ -4794,8 +4794,12 @@ gckOS_CacheFlush(
     /* Inner cache. */
     dmac_flush_range(Logical, Logical + Bytes);
 #elif defined (CONFIG_ARM64)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+    __dma_flush_area(Logical, Bytes);
+#else
     __dma_flush_range(Logical, Logical + Bytes);
 #endif
+#endif
 
 #if defined(CONFIG_OUTER_CACHE)
     /* Outer cache. */