From patchwork Wed Sep 25 21:50:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11161627 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 707F01709 for ; Wed, 25 Sep 2019 21:51:47 +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 565582146E for ; Wed, 25 Sep 2019 21:51:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 565582146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 1iDFAo-0004dp-Uq; Wed, 25 Sep 2019 21:50:10 +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 1iDFAn-0004dk-F8 for xen-devel@lists.xenproject.org; Wed, 25 Sep 2019 21:50:09 +0000 X-Inumbo-ID: 70c37ea8-dfde-11e9-963a-12813bfff9fa Received: from mail-ot1-f66.google.com (unknown [209.85.210.66]) by localhost (Halon) with ESMTPS id 70c37ea8-dfde-11e9-963a-12813bfff9fa; Wed, 25 Sep 2019 21:50:08 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id f21so124914otl.13 for ; Wed, 25 Sep 2019 14:50:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6cXLFB02TykvVAB5VHeIiQg5E1YhhmuVezg1VTNWACM=; b=ZbFv5Rn8e0VL0ADJr8YuTx7oGjrZEl1s0j11FAHKyby9RAV9iAFCK3i2rMnIB1AaWc 8eGLz4yThyDws5UD/NgQ3r79MwafRW8O5zsNJP5EVNP8Mf+K+DZdl+c0b8wCXpnWc1Ig i65wsX7s6mCpd9r7LnBNJiMfBjdLcch4E+rQ7LG2pFk45PCAU/9s/ukslWFGsDIQP5q+ nWt5r4iXCg3hLagzI983iazlsKadDrGRaaAbktGJHr2ttQySJsgumgpw9kLqePi5EhZF vnivyMAhDhHq2vSasgKD6vD1hdI9Ku9mU5fCz31vvsARYrAYCiN5HVrHDR9l4JWhY3HQ TXWw== X-Gm-Message-State: APjAAAVpzahMAjzPsvx5HjcU0HyZ6eyJcrgb8ZBDkSXr2E2/U+G1AQAj BmjXkd0ym6sWG3G/+CvkOw== X-Google-Smtp-Source: APXvYqyz7lSYS26abdEhCGr1U2uy0uBmZ56y9Lbe3N7QnPUQ3gDyYFxELSUCIBwmOSdt/05qrxpCYg== X-Received: by 2002:a05:6830:1d8:: with SMTP id r24mr215060ota.217.1569448207485; Wed, 25 Sep 2019 14:50:07 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id q199sm78792oic.16.2019.09.25.14.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 14:50:06 -0700 (PDT) From: Rob Herring To: Oleksandr Andrushchenko , Boris Ostrovsky Date: Wed, 25 Sep 2019 16:50:06 -0500 Message-Id: <20190925215006.12056-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [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 , Nicolas Saenz Julienne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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. Not sure exactly what setup besides arch_setup_dma_ops is needed... 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 --- drivers/xen/gntdev.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index a446a7221e13..59906f9a40e4 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -34,9 +34,6 @@ #include #include #include -#ifdef CONFIG_XEN_GRANT_DMA_ALLOC -#include -#endif #include #include @@ -625,14 +622,6 @@ static int gntdev_open(struct inode *inode, struct file *flip) flip->private_data = priv; #ifdef CONFIG_XEN_GRANT_DMA_ALLOC priv->dma_dev = gntdev_miscdev.this_device; - - /* - * The device is not spawn from a device tree, so arch_setup_dma_ops - * is not called, thus leaving the device with dummy DMA ops. - * Fix this by calling of_dma_configure() with a NULL node to set - * default DMA ops. - */ - of_dma_configure(priv->dma_dev, NULL, true); #endif pr_debug("priv %p\n", priv);