Received: by 10.223.176.5 with SMTP id f5csp1354371wra; Sun, 4 Feb 2018 02:03:50 -0800 (PST) X-Google-Smtp-Source: AH8x226FBwk21ZaqDZ0TXQuDaMln0lYcSk3ik9oJyH9EnYSTv9UOya6CTONPiBgYF5jlfmL3YtKU X-Received: by 2002:a17:902:4181:: with SMTP id f1-v6mr40672876pld.59.1517738630872; Sun, 04 Feb 2018 02:03:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517738630; cv=none; d=google.com; s=arc-20160816; b=yL/oecmv7JlexS+/pXKzLVpXc+GtB5prpdbUL6CZV2lrG5oM982iCL1omN5HXKr8MI UizT64HInYnZvgJHwBWVzDRveG6RaFLNdItSkc6k+Bec3XXvaUva6wwpnz02EhIwSAlb 0RhqZruvuGuWB0rUQXA8OeRnwlE0NAy8XJ7DubcJyrTnHtf4ZsMMKen7BMbF4nM96we/ f5RSu+YtQ3R2iRc2cTHhdud+7ORso+Ht4OmibAr64+t/ba2K05R6UPnLwtubSk7mJAGe h9PX6bVX4+ziseombrKB8MgpknrS6Bw9MoYzrlOMdw6KwljEqMqwe9GS455B9Z2F1Iai lvZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=pYPpvQeLZgmD9C11k9g1Ci9p9nHgwsiXDQsAlasYHXM=; b=I18mztkA3mfeanRgscivVVRROm7OwQ+iWSjgOtzx1GxYt1IgRmFzlEfL8mX5g6tcpb AMrzxLzuA+CDin80DRxU+0T2kqi5iCQqljxkaVfQwC1QhJSkyp77eAYyzrJh1G6G1QWT 0oHTKJBlJxInJaC71gSoOmqNPh6SQstEB0hW7Nc/U2ag4ni8tY9JaNpbGJx+N6DZCvis BGRf9zM+Au6A2BKH5petzJnoio4bDbL7la9Dq5l8+tCkvLXGP/tFzqctS7qpl9n4vzfP QGIFzgs9FH5yUUyGlrKz5jPdT0BNEg8PzIw4mNbN4Xmfk74fEBjaCQFqyoQJb9VfQ8aq Jrew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cwas5MPg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e92-v6si3184036pld.643.2018.02.04.02.03.25; Sun, 04 Feb 2018 02:03:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cwas5MPg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751558AbeBDKBl (ORCPT + 99 others); Sun, 4 Feb 2018 05:01:41 -0500 Received: from mail-qt0-f171.google.com ([209.85.216.171]:34637 "EHLO mail-qt0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbeBDKBf (ORCPT ); Sun, 4 Feb 2018 05:01:35 -0500 Received: by mail-qt0-f171.google.com with SMTP id a27so36250945qtd.1 for ; Sun, 04 Feb 2018 02:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pYPpvQeLZgmD9C11k9g1Ci9p9nHgwsiXDQsAlasYHXM=; b=Cwas5MPg+YGn9JM39U+d2Gw1evWavg20uIaNqt0rBrAvf+QCZiF2gPwn1dNRYPf++h yoFfXF2Ak5dxeTqDtuQeKQWcECBIeBYKdgrN6n5xwEySi2zCgTgOZHIuAQVdMHwmxPW/ x3z3qsi/bg0isL/2iDW8pSRVt5k57irGex6XU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pYPpvQeLZgmD9C11k9g1Ci9p9nHgwsiXDQsAlasYHXM=; b=V++deArgiHS6UlPp50FEI9ctoip5takdCfJB7L2BZFNv7ZX7cxaJYG70LSX0d8C+1U 3vNmOQf2w/alBI1UBFaRoa7hW4MDIu6388Tw9TMsOpNySXFkyaHK1GJs3M2mH6u0go/o sqFfLSOMIBdeUcLNPFRXS71vcf+z3gkniF3GpubVFhXgm0eQj0yyIAWoWwk5JD0x2Vda HDFvPj141s/zAgbxsFaTc2zql0JRMoBUtGlwAvpuzhBufmlYGHqCtNBcC1I0D17gnI07 RK7DJcRgMq8vZ8jOz8d4oE3V2hKAHkH+qmVUL70tl024RQ/8ZC8/zKLcbVsekGKMyMHk 2L9w== X-Gm-Message-State: APf1xPCl/R/0IYNbfRVnHf66njnE1CfEEDicHJz0XFjWmr8ShbR4T0O8 RqoFRNF7yI2UwWw+v+daiz0xZOqag4xKTs257mQsyA== X-Received: by 10.200.28.145 with SMTP id f17mr4601771qtl.15.1517738494741; Sun, 04 Feb 2018 02:01:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.82.178 with HTTP; Sun, 4 Feb 2018 02:01:34 -0800 (PST) In-Reply-To: <20180202232923.GK12728@builder> References: <20180202232923.GK12728@builder> From: Benjamin Gaignard Date: Sun, 4 Feb 2018 11:01:34 +0100 Message-ID: Subject: Re: Compilation error report for: drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of ?dma_alloc_coherent? from incompatible pointer type To: Bjorn Andersson Cc: Arnd Bergmann , Benjamin GAIGNARD , Arnaud POULIQUEN , "Andy Gross , David Brown" , "linux-arm-msm@vger.kernel.org" , "linux-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-03 0:29 GMT+01:00 Bjorn Andersson : > On Tue 30 Jan 05:25 PST 2018, Arnd Bergmann wrote: > >> On Tue, Jan 30, 2018 at 11:11 AM, Benjamin GAIGNARD >> wrote: >> > >> > On 01/12/2018 05:11 PM, Arnaud Pouliquen wrote: >> >> Hello Andy,David, >> > + Arnd >> > >> > I have the same issue on drm-misc-next. >> > Does Arnaud's fix make sense or should we update/change the way of how >> > we compile the kernel ? >> >> We've hit a couple of bugs with qcom drivers confusing physical addresses >> and DMA addresses in the past, usually the drivers were buggy in >> some form, and tried to use dma_alloc_coherent() to get a buffer >> that gets passed into a firmware interface taking a physical address, >> which is of course completely wrong. >> > > Thanks Arnd, for once again using the words "bug" and "completely wrong" > when referring to something that obviously works just fine... > I can't judge if using dma_alloc_coherent is correct or not here but, obviously, the type of the third parameter doesn't match dma_alloc_coherent prototype. May you consider to fix that ? > > The solution you introduced for venus and adreno relies on static > reservations of system ram, which isn't pretty, but more importantly > isn't viable for the qcom_scm driver. > > > So, how do I dynamically allocate a chunk of coherent memory? > > Preferably with the possibility of unmapping it temporarily from Linux > while passing the buffer into the trusted environment (as any accesses > during the operation might cause access violations). > > Regards, > Bjorn