Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx> --- services/server/env/linux/osfunc_arm64.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/services/server/env/linux/osfunc_arm64.c b/services/server/env/linux/osfunc_arm64.c index 8b7f06d..70f747b 100644 --- a/services/server/env/linux/osfunc_arm64.c +++ b/services/server/env/linux/osfunc_arm64.c @@ -121,18 +121,12 @@ void OSFlushCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, IMG_CPU_PHYADDR sCPUPhysEnd) { struct device *dev = psDevNode->psDevConfig->pvOSDevice; - struct dma_map_ops *dma_ops = get_dma_ops(dev); PVR_UNREFERENCED_PARAMETER(pvVirtStart); PVR_UNREFERENCED_PARAMETER(pvVirtEnd); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - dma_ops->sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); - dma_ops->sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#else - dma_ops->sync_single_for_device(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); - dma_ops->sync_single_for_cpu(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#endif + dma_sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); } void OSCleanCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, @@ -142,16 +136,11 @@ void OSCleanCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, IMG_CPU_PHYADDR sCPUPhysEnd) { struct device *dev = psDevNode->psDevConfig->pvOSDevice; - struct dma_map_ops *dma_ops = get_dma_ops(dev); PVR_UNREFERENCED_PARAMETER(pvVirtStart); PVR_UNREFERENCED_PARAMETER(pvVirtEnd); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - dma_ops->sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); -#else - dma_ops->sync_single_for_device(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); -#endif + dma_sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); } void OSInvalidateCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, @@ -161,16 +150,11 @@ void OSInvalidateCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, IMG_CPU_PHYADDR sCPUPhysEnd) { struct device *dev = psDevNode->psDevConfig->pvOSDevice; - struct dma_map_ops *dma_ops = get_dma_ops(dev); PVR_UNREFERENCED_PARAMETER(pvVirtStart); PVR_UNREFERENCED_PARAMETER(pvVirtEnd); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - dma_ops->sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#else - dma_ops->sync_single_for_cpu(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#endif + dma_sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); } PVRSRV_CACHE_OP_ADDR_TYPE OSCPUCacheOpAddressType(PVRSRV_CACHE_OP uiCacheOp) -- 2.7.4