Received: by 10.223.176.5 with SMTP id f5csp21147wra; Fri, 2 Feb 2018 15:42:56 -0800 (PST) X-Google-Smtp-Source: AH8x227nkMKbItsS9vsxYTtQGYfTgrgyDf021iQ8PDrDIbI0q7WAneyn6kcqH3p8dTxcv7DUyUB6 X-Received: by 10.101.99.205 with SMTP id n13mr15365265pgv.397.1517614976433; Fri, 02 Feb 2018 15:42:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517614976; cv=none; d=google.com; s=arc-20160816; b=IbAjLFHuSuK3cFxUCIYukDQ1iWqIZ7XPPNJhjeupCgKB8gtMc8N90QtoEKnmcELOrP WQo2o93Cb86ssHunWJ49RKHh6s8dLbEWEALx0BWh1GiWen5PBu/34O5JTAFs5kee9G/3 m25Gc01w59IXwNG8XEgcJfw9Dj6FuV3gcoHZ4DwzFraUjWaS2w3jXzA8z9Ab0zNFb+9/ 7W5NZiXmJiYmAAUuck6DVg9l8SjN9X6OGohNqMRo4fZm61Rn71zequJgZoSuXi2HNCAA wl9h1ZoG3R92jU3CwqF1xXcXBpj1hWvOLn9N1CdM8YITkf5PNr4DXV1hkcBisuoPURXv eJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=xsiin9L/kaUfdco2xPi7Cedl4rgNOyrCFKhnjaRtI1s=; b=NL1j+Of8cjMSckLxGqF2CMnEujmYO49HDYneJ0sP0uzampI36PdWSKuZ4hIuv6O08j FYVKQrzdjuNMaVvTiaXKniWgGio4yfrfSRJjd6qGH2yGoIMrYLT7kQA5/jI5xFsPtXSj J3fW0xLDNKGjjl0Aihx1HBvbBJo23XzyuiYIFSfA1pbcyjTLGro7Iu9m3uaj5V/8cuCW bj/QsZPqtYZUs0nCT/X6Uv/RSLb8q2PADRqK1bHeRvE0OrKwGeF/EHyStY+xheL2WphW YUBLg+g6lQJQQ7js5PNMuVeZ/A5MwPP/bNxtUCcsaFwJXREjMdBJJbtn8eroVsELPV4h gcaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YHV83TAo; 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 v1si661610pfg.288.2018.02.02.15.42.42; Fri, 02 Feb 2018 15:42:56 -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=YHV83TAo; 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 S1752880AbeBBX3d (ORCPT + 99 others); Fri, 2 Feb 2018 18:29:33 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:41987 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbeBBX31 (ORCPT ); Fri, 2 Feb 2018 18:29:27 -0500 Received: by mail-pf0-f175.google.com with SMTP id b25so18081294pfd.9 for ; Fri, 02 Feb 2018 15:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xsiin9L/kaUfdco2xPi7Cedl4rgNOyrCFKhnjaRtI1s=; b=YHV83TAocCEu3VcHrPSrbMxY58HgPAMhbhQwfxrmYdCC/OMq2FKKuevtZ0HaCmqg0b g9GyFt3+p+rZg1dSgy6oD/2MLYCff5CuM/Lh7OXPlS39zmGLQ7vLaV45ZYKLgO54yNz+ Oui9XSq3e8L0XyP+g9lSF/0Lhq0osqh8g1uVc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xsiin9L/kaUfdco2xPi7Cedl4rgNOyrCFKhnjaRtI1s=; b=ZLu2cd7w+3y5KStPmCsPVOiHl9Jjv0sTzWF9tdM2Iszg2xaZBgktSNMlE3/DPPPulz aKePJz7Kuzl093tTHJ7TTA730vE83FliFy9fd7wR/p8WJVgwDFdeuyjZDA0772BilvQ7 P55HIfjgvkfiJRp9uvQgYTu/dGYkl0IuJ/uPK5FIUx+5D5yTr5F5Z/9Uubn98hnk9ctc S02SO4rMBzZC3B6Lf98ivJ11tNjHszWT/riYy766bkYBsyRWbukFbtEHF517gGiiOFQo w32e8JlVir9B70gJjfqwDhJf+VIPQb2W7U7PukzfcA1cJF6Q7I/0sVo//Q9ebvuK9y48 hCbQ== X-Gm-Message-State: AKwxytcIaEkBBU23MVrBJJBNnP5UFcCx0J9NAqB+3hG9uCuC8FK1l9dC 7DKFzx4Lasu2McsnRGUP6vSCBiqXprk= X-Received: by 10.99.99.5 with SMTP id x5mr2813632pgb.307.1517614166748; Fri, 02 Feb 2018 15:29:26 -0800 (PST) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id l62sm4635475pga.71.2018.02.02.15.29.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Feb 2018 15:29:25 -0800 (PST) Date: Fri, 2 Feb 2018 15:29:23 -0800 From: Bjorn Andersson To: Arnd Bergmann Cc: Benjamin GAIGNARD , Arnaud POULIQUEN , "Andy Gross , David Brown" , "linux-arm-msm@vger.kernel.org" , "linux-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Benjamin Gaignard 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 Message-ID: <20180202232923.GK12728@builder> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... 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