Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2969937ybi; Mon, 1 Jul 2019 23:29:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxC3one4Mrr9INpxH4SHnmlbtGi0wyYVrg9HW/FzfPMVFYksTzrO62d2LfB/7MQNVXXBeI7 X-Received: by 2002:a17:902:8d92:: with SMTP id v18mr33859268plo.211.1562048947024; Mon, 01 Jul 2019 23:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562048947; cv=none; d=google.com; s=arc-20160816; b=lN1L3jd8jC6YQAEStiMtNs6elF1uDe5mCbOUR/TZLlgzXS6/0w6TcpHswYm3mTy8um rGz5+Lfm+vIKA1hN2dci/gtYysTH89Y5/wmaBuioFoYgiB9mnKN3p7L1dzmonDlBoy3F FCOX4LLB/awWeiyPAOaJaI9jAQTWVwxFX81GYX1WnHO5885QHCp8h+5Ji25L8LFZLeR5 W0BV2BuN9Qk96SUYooiiztTVtOyjTPnh2vTDs3P743mafaWTZdvvUSZc96ILxFqZ0fRJ w3YRl+7IhYeKZB5vWDp0iMcKAq9NQVnhcqykoIs9MjrsJ4geqAgMYClLqYm3iqQg6wLX QfiA== 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; bh=EuejUuvkcT0encYrvFlmXEqjXG50bA0a3JTt1nvk284=; b=FFBXLi9lYJZuEMsISxVLiiLoaNu4Q6D/DIWivTkM90LWfexjudCtvGxJie3D8lfM5e YCnt/7vksBG3ZOqk3qrDp3UCyyECAhjZOSIw7LLG7U1KN8s4gMtDomH5gKtQoR7GoKag FIKvOSZBaMbjlf9hoFgGsm5tcesj0H0wu4SxNcpFyj8e50sVpL0Dwv+nnjsvNXmwPt6K 7Ow+yJQAnPAxCHBt3re/njhb19Mw3IbyAUCELuAI+gh6By3sbw6zkEYFAuY33GDvlSF4 0fONZ/WxIWJQ1CUPcFF2w+zBu26pAdCttak65dDxj+BnfD8BXdj3MnSHQCgAlu5jmK79 zHTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SUrTPTpx; 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 h8si11589603plt.16.2019.07.01.23.28.51; Mon, 01 Jul 2019 23:29:07 -0700 (PDT) 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=SUrTPTpx; 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 S1726252AbfGBG1J (ORCPT + 99 others); Tue, 2 Jul 2019 02:27:09 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38517 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbfGBG1J (ORCPT ); Tue, 2 Jul 2019 02:27:09 -0400 Received: by mail-pg1-f196.google.com with SMTP id z75so7173617pgz.5 for ; Mon, 01 Jul 2019 23:27:09 -0700 (PDT) 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=EuejUuvkcT0encYrvFlmXEqjXG50bA0a3JTt1nvk284=; b=SUrTPTpxZQWzoc8xTD8MV2EteX90mj48aZsU+pGX5yAGF16EQHrZQDK/GBKw3jOg92 1SltWro5BRtXqRDHomNrtTRJ2oZiBRrcCOwyg0aIlmrqWCmamn/de4sTTkqz3wZwUzRw R6etkEFn4ZdfTuIAUnnVcR/5Sug0HdzBfRieNTsr1y4BqAhBL6Z+P/7beZC50k2P4Mvv dQkgsT/FzLFzuDl6hGrJYVnkXlxwFRt4vxDqUSO9SmBhllum7KPE8d1U02FF+ThVYkT3 Tgii0iXStS3K6tuNl/Q3wX4FFk/5GzDN/CeQAq1pVbhJYIdY4pQsknE0xgHpcj0o5btW eyow== 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=EuejUuvkcT0encYrvFlmXEqjXG50bA0a3JTt1nvk284=; b=mHWTFO0onAuZVT8GWvH7Vj9TBrzxV2O8+WQoaU7dD3FT0zMqm5mKnEsuylRsJbsAh0 s9J3T1clVO2frzcqEypjO/fdONYMYyj69tfmcqaJkOCO51WCDzYr645Np+wSx4kfBWNL oTokxPWu99bgwjwhB5KAmE+Xf2/E17XzI/OHXElYOSH/9BaoxTsHEtYdBpyaw32zPTdX rj1+kXv/v0nE9i0gh15pKfYf4LvFXALOyNo/cJtCYdjVEj6b+mTrOHMSsuo5FOOzcG/2 qT+OJva8dndfPR4tCHHnzaDTd+4MmwIn85K+48srn2xAE/Xo3wTYthz9dr9/Dl8MfVSQ xITg== X-Gm-Message-State: APjAAAX3FLk/VvFwso0O2HNEcg2F78SNlHBO7mr7aYxEbflXNQqhbg4O HQ/Hy00Zx+6Q0wWZ5eSKqumYBg== X-Received: by 2002:a63:6089:: with SMTP id u131mr29778864pgb.314.1562048828621; Mon, 01 Jul 2019 23:27:08 -0700 (PDT) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id a10sm5644142pgq.2.2019.07.01.23.27.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2019 23:27:07 -0700 (PDT) Date: Mon, 1 Jul 2019 23:27:05 -0700 From: Bjorn Andersson To: Clement Leger Cc: Ohad Ben-Cohen , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Loic Pallardy Subject: Re: [PATCH v2] remoteproc: copy parent dma_pfn_offset for vdev Message-ID: <20190702062705.GG1263@builder> References: <20190612095521.4703-1-cleger@kalray.eu> <20190701070245.32083-1-cleger@kalray.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190701070245.32083-1-cleger@kalray.eu> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 01 Jul 00:02 PDT 2019, Clement Leger wrote: > When preparing the subdevice for the vdev, also copy dma_pfn_offset > since this is used for sub device dma allocations. Without that, there > is incoherency between the parent dma settings and the childs one, > potentially leading to dma_alloc_coherent failure (due to phys_to_dma > using dma_pfn_offset for translation). > > Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") > Signed-off-by: Clement Leger > Acked-by: Loic Pallardy Thanks for the update. Applied Regards, Bjorn > --- > Changes in v2: > - Fix typo in commit message > - Add "Fixes" in commit message > - Add Signed-off > - Add Acked-by Loic Pallardy > > --- > drivers/remoteproc/remoteproc_core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 48feebd6d0a2..06837b1f2d60 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -520,6 +520,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc, > /* Initialise vdev subdevice */ > snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index); > rvdev->dev.parent = rproc->dev.parent; > + rvdev->dev.dma_pfn_offset = rproc->dev.parent->dma_pfn_offset; > rvdev->dev.release = rproc_rvdev_release; > dev_set_name(&rvdev->dev, "%s#%s", dev_name(rvdev->dev.parent), name); > dev_set_drvdata(&rvdev->dev, rvdev); > -- > 2.15.0.276.g89ea799 >