From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751351AbeBWIvh (ORCPT ); Fri, 23 Feb 2018 03:51:37 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:45570 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbeBWIvf (ORCPT ); Fri, 23 Feb 2018 03:51:35 -0500 X-Google-Smtp-Source: AG47ELtUu87XKTa0ZMEkpL06sVU1QNz0ytP/vji9hTAGOKVUo0K+jGAlXslKGE/GxN4hiLpegwz7JanAyGs0ppeKppo= MIME-Version: 1.0 In-Reply-To: References: <20180208122146.28399-1-benjamin.gaignard@linaro.org> From: Benjamin Gaignard Date: Fri, 23 Feb 2018 09:51:34 +0100 Message-ID: Subject: Re: [PATCH] firmware: qcom_scm: use correct parameter type for dma_alloc_coherent To: Arnd Bergmann Cc: Andy Gross , David Brown , Bjorn Andersson , linux-arm-msm , linux-soc@vger.kernel.org, Arnaud Pouliquen , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-08 15:26 GMT+01:00 Benjamin Gaignard : > 2018-02-08 15:09 GMT+01:00 Arnd Bergmann : >> On Thu, Feb 8, 2018 at 1:21 PM, Benjamin Gaignard >> wrote: >>> dma_alloc_coherent expects it third argument type to be dma_addr_t and >>> not phys_addr_t. >>> When phys_addr_t is defined as u32 and dma_addr_t as u64 that generate >>> a compilation issue. >>> Change the variable name because dma_alloc_coherent returns a bus >>> address not a physical address. >>> >> >>> @@ -480,14 +480,14 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, >>> >>> /* Fill details of mem buff to map */ >>> mem_to_map = ptr + ALIGN(src_sz, SZ_64); >>> - mem_to_map_phys = ptr_phys + ALIGN(src_sz, SZ_64); >>> + mem_to_map_phys = handle + ALIGN(src_sz, SZ_64); >>> mem_to_map[0].mem_addr = cpu_to_le64(mem_addr); >>> mem_to_map[0].mem_size = cpu_to_le64(mem_sz); >>> >>> next_vm = 0; >>> /* Fill details of next vmid detail */ >>> destvm = ptr + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64); >>> - dest_phys = ptr_phys + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64); >>> + dest_phys = handle + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64); >> >> This still assigns from a 'dma' address to a 'phys' address without a >> long comment >> explaining why you do it. There is also another instance of the naming confusion >> in qcom_scm_pas_init_image and __qcom_scm_pas_init_image, so maybe they >> should be addressed at the same time. > > This patch just fix a compilation issue, nothing else. Gentle ping on this patch since the problem still exist on 4.16-rc2 > >> >> Arnd