linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: iommu@lists.linux-foundation.org
Cc: Russell Currey <ruscur@russell.cc>,
	Sam Bobroff <sbobroff@linux.ibm.com>,
	oohall@gmail.com,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Hanjun Guo <hanjun.guo@linaro.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vkoul@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	jroedel@suse.de, Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	dmaengine@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [PATCH 6/6] dmaengine: sh: rcar-dmac: Use device_iommu_mapped()
Date: Tue, 11 Dec 2018 14:43:43 +0100	[thread overview]
Message-ID: <20181211134343.10664-7-joro@8bytes.org> (raw)
In-Reply-To: <20181211134343.10664-1-joro@8bytes.org>

From: Joerg Roedel <jroedel@suse.de>

Use Use device_iommu_mapped() to check if the device is
already mapped by an IOMMU.

Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/dma/sh/rcar-dmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 74fa2b1a6a86..2b4f25698169 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1809,7 +1809,7 @@ static int rcar_dmac_probe(struct platform_device *pdev)
 	 * level we can't disable it selectively, so ignore channel 0 for now if
 	 * the device is part of an IOMMU group.
 	 */
-	if (pdev->dev.iommu_group) {
+	if (device_iommu_mapped(&pdev->dev)) {
 		dmac->n_channels--;
 		channels_offset = 1;
 	}
-- 
2.17.1


  parent reply	other threads:[~2018-12-11 13:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 13:43 [PATCH 0/6 v2] Introduce device_iommu_mapped() function Joerg Roedel
2018-12-11 13:43 ` [PATCH 1/6] driver core: " Joerg Roedel
2018-12-11 14:59   ` Sergei Shtylyov
2018-12-11 15:18     ` Joerg Roedel
2018-12-12 11:04   ` Greg Kroah-Hartman
2018-12-12 11:07     ` Joerg Roedel
2018-12-17  6:11   ` Vinod Koul
2018-12-17  9:31     ` Joerg Roedel
2018-12-11 13:43 ` [PATCH 2/6] iommu/of: Use device_iommu_mapped() Joerg Roedel
2018-12-11 13:43 ` [PATCH 3/6] ACPI/IORT: " Joerg Roedel
2018-12-17  9:21   ` Hanjun Guo
2018-12-11 13:43 ` [PATCH 4/6] powerpc/iommu: " Joerg Roedel
2018-12-11 13:43 ` [PATCH 5/6] xhci: " Joerg Roedel
2018-12-17 11:21   ` Mathias Nyman
2018-12-11 13:43 ` Joerg Roedel [this message]
2018-12-17  6:11   ` [PATCH 6/6] dmaengine: sh: rcar-dmac: " Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181211134343.10664-7-joro@8bytes.org \
    --to=joro@8bytes.org \
    --cc=benh@kernel.crashing.org \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanjun.guo@linaro.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mathias.nyman@intel.com \
    --cc=mpe@ellerman.id.au \
    --cc=oohall@gmail.com \
    --cc=paulus@samba.org \
    --cc=ruscur@russell.cc \
    --cc=sbobroff@linux.ibm.com \
    --cc=sudeep.holla@arm.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).