From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 545BAC432C2 for ; Thu, 26 Sep 2019 09:06:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E67E20872 for ; Thu, 26 Sep 2019 09:06:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730065AbfIZJGf (ORCPT ); Thu, 26 Sep 2019 05:06:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:32988 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729018AbfIZJGe (ORCPT ); Thu, 26 Sep 2019 05:06:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2BE23AB7D; Thu, 26 Sep 2019 09:06:33 +0000 (UTC) Message-ID: Subject: Re: [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API From: Nicolas Saenz Julienne To: Rob Herring , Oleksandr Andrushchenko , Boris Ostrovsky Cc: linux-kernel@vger.kernel.org, Robin Murphy , Julien Grall , Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org Date: Thu, 26 Sep 2019 11:06:31 +0200 In-Reply-To: <20190925215006.12056-1-robh@kernel.org> References: <20190925215006.12056-1-robh@kernel.org> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-VZLu1lyfilRACxdtIeDn" User-Agent: Evolution 3.32.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-VZLu1lyfilRACxdtIeDn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-09-25 at 16:50 -0500, Rob Herring wrote: > As the comment says, this isn't a DT based device. of_dma_configure() > is going to stop allowing a NULL DT node, so this needs to be fixed. >=20 > Not sure exactly what setup besides arch_setup_dma_ops is needed... >=20 > Cc: Robin Murphy > Cc: Julien Grall > Cc: Nicolas Saenz Julienne > Cc: Oleksandr Andrushchenko > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: xen-devel@lists.xenproject.org > Signed-off-by: Rob Herring Just so it isn't forgotten, the same applies here: diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index ba1828acd8c9..de316a891f39 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -11,7 +11,6 @@ #include #include #include -#include =20 #include #include @@ -718,19 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev, struct device *dev =3D &xb_dev->dev; int ret; =20 - /* - * The device is not spawn from a device tree, so arch_setup_dma_op= s - * is not called, thus leaving the device with dummy DMA ops. - * This makes the device return error on PRIME buffer import, which - * is not correct: to fix this call of_dma_configure() with a NULL - * node to set default DMA ops. - */ dev->coherent_dma_mask =3D DMA_BIT_MASK(32); - ret =3D of_dma_configure(dev, NULL, true); - if (ret < 0) { - DRM_ERROR("Cannot setup DMA ops, ret %d", ret); - return ret; - } =20 front_info =3D devm_kzalloc(&xb_dev->dev, sizeof(*front_info), GFP_KERNEL); --=-VZLu1lyfilRACxdtIeDn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl2Mf5cACgkQlfZmHno8 x/4SfAf+NsGqU0loPiWDCjo41LSGYYLj1TAtCnYEFJhWysp82mV30XSwqhdPMdEd ydFDB1TmNDhAazi+do8Sh47UzN+UQ2e4U3a5zZ949lNlPNG5bOueY+SQ+S39PFfy G+NP0lHrXfisWnLmslIn9y6Eqi5Ik4Bjb2DqNZLiAoyzYDlwvDMoAI66J54GT84H c7TGaeDzTpP4mHxW1BbJxk66gtEIvvURo62SOZuaohC4SICm6f26g+iz6CG8Bjdw +jRf9eff00d4MOwD28lJPMrHcDS80W1nZHcdTEijMB3bK0QWBkSr1g9Mki2jzukA 5DGyncDkT9wSqIzxCXx77+RPs3rLuA== =7yuB -----END PGP SIGNATURE----- --=-VZLu1lyfilRACxdtIeDn-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2347CC432C2 for ; Thu, 26 Sep 2019 09:07:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F19A0206B7 for ; Thu, 26 Sep 2019 09:07:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F19A0206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDPjQ-0007eD-J3; Thu, 26 Sep 2019 09:06:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDPjP-0007e2-Lb for xen-devel@lists.xenproject.org; Thu, 26 Sep 2019 09:06:35 +0000 X-Inumbo-ID: efcc7de0-e03c-11e9-964b-12813bfff9fa Received: from mx1.suse.de (unknown [195.135.220.15]) by localhost (Halon) with ESMTPS id efcc7de0-e03c-11e9-964b-12813bfff9fa; Thu, 26 Sep 2019 09:06:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2BE23AB7D; Thu, 26 Sep 2019 09:06:33 +0000 (UTC) Message-ID: From: Nicolas Saenz Julienne To: Rob Herring , Oleksandr Andrushchenko , Boris Ostrovsky Date: Thu, 26 Sep 2019 11:06:31 +0200 In-Reply-To: <20190925215006.12056-1-robh@kernel.org> References: <20190925215006.12056-1-robh@kernel.org> User-Agent: Evolution 3.32.4 MIME-Version: 1.0 Subject: Re: [Xen-devel] [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , linux-kernel@vger.kernel.org, Julien Grall , xen-devel@lists.xenproject.org, Robin Murphy Content-Type: multipart/mixed; boundary="===============6599430665408421931==" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" --===============6599430665408421931== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-VZLu1lyfilRACxdtIeDn" --=-VZLu1lyfilRACxdtIeDn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-09-25 at 16:50 -0500, Rob Herring wrote: > As the comment says, this isn't a DT based device. of_dma_configure() > is going to stop allowing a NULL DT node, so this needs to be fixed. >=20 > Not sure exactly what setup besides arch_setup_dma_ops is needed... >=20 > Cc: Robin Murphy > Cc: Julien Grall > Cc: Nicolas Saenz Julienne > Cc: Oleksandr Andrushchenko > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: xen-devel@lists.xenproject.org > Signed-off-by: Rob Herring Just so it isn't forgotten, the same applies here: diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index ba1828acd8c9..de316a891f39 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -11,7 +11,6 @@ #include #include #include -#include =20 #include #include @@ -718,19 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev, struct device *dev =3D &xb_dev->dev; int ret; =20 - /* - * The device is not spawn from a device tree, so arch_setup_dma_op= s - * is not called, thus leaving the device with dummy DMA ops. - * This makes the device return error on PRIME buffer import, which - * is not correct: to fix this call of_dma_configure() with a NULL - * node to set default DMA ops. - */ dev->coherent_dma_mask =3D DMA_BIT_MASK(32); - ret =3D of_dma_configure(dev, NULL, true); - if (ret < 0) { - DRM_ERROR("Cannot setup DMA ops, ret %d", ret); - return ret; - } =20 front_info =3D devm_kzalloc(&xb_dev->dev, sizeof(*front_info), GFP_KERNEL); --=-VZLu1lyfilRACxdtIeDn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl2Mf5cACgkQlfZmHno8 x/4SfAf+NsGqU0loPiWDCjo41LSGYYLj1TAtCnYEFJhWysp82mV30XSwqhdPMdEd ydFDB1TmNDhAazi+do8Sh47UzN+UQ2e4U3a5zZ949lNlPNG5bOueY+SQ+S39PFfy G+NP0lHrXfisWnLmslIn9y6Eqi5Ik4Bjb2DqNZLiAoyzYDlwvDMoAI66J54GT84H c7TGaeDzTpP4mHxW1BbJxk66gtEIvvURo62SOZuaohC4SICm6f26g+iz6CG8Bjdw +jRf9eff00d4MOwD28lJPMrHcDS80W1nZHcdTEijMB3bK0QWBkSr1g9Mki2jzukA 5DGyncDkT9wSqIzxCXx77+RPs3rLuA== =7yuB -----END PGP SIGNATURE----- --=-VZLu1lyfilRACxdtIeDn-- --===============6599430665408421931== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============6599430665408421931==--