From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com,
gregkh@linuxfoundation.org, joro@8bytes.org, x86@kernel.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
iommu@lists.linux-foundation.org, robh+dt@kernel.org,
hanjun.guo@linaro.org, sudeep.holla@arm.com,
frowand.list@gmail.com, hch@lst.de,
linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com
Subject: Re: [RFC PATCH 1/4] dma-mapping: Generalise dma_32bit_limit flag
Date: Tue, 10 Jul 2018 20:04:33 +0200 [thread overview]
Message-ID: <20180710180433.GB26285@lst.de> (raw)
In-Reply-To: <a85a5fe22fced65b2960251fc6e8d8f1e68f828a.1531239284.git.robin.murphy@arm.com>
On Tue, Jul 10, 2018 at 06:17:16PM +0100, Robin Murphy wrote:
> diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
> index 8be8106270c2..95e185347e34 100644
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -183,7 +183,7 @@ int dma_direct_supported(struct device *dev, u64 mask)
> * Various PCI/PCIe bridges have broken support for > 32bit DMA even
> * if the device itself might support it.
> */
> - if (dev->dma_32bit_limit && mask > DMA_BIT_MASK(32))
> + if (dev->bus_dma_mask && mask > dev->bus_dma_mask)
> return 0;
The comment above this check needs an updated (or just be removed).
Also we still have a few architectures not using dma-direct. I guess
most were doing fine without such limits anyway, but at least arm
will probably need an equivalent check.
WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/4] dma-mapping: Generalise dma_32bit_limit flag
Date: Tue, 10 Jul 2018 20:04:33 +0200 [thread overview]
Message-ID: <20180710180433.GB26285@lst.de> (raw)
In-Reply-To: <a85a5fe22fced65b2960251fc6e8d8f1e68f828a.1531239284.git.robin.murphy@arm.com>
On Tue, Jul 10, 2018 at 06:17:16PM +0100, Robin Murphy wrote:
> diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
> index 8be8106270c2..95e185347e34 100644
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -183,7 +183,7 @@ int dma_direct_supported(struct device *dev, u64 mask)
> * Various PCI/PCIe bridges have broken support for > 32bit DMA even
> * if the device itself might support it.
> */
> - if (dev->dma_32bit_limit && mask > DMA_BIT_MASK(32))
> + if (dev->bus_dma_mask && mask > dev->bus_dma_mask)
> return 0;
The comment above this check needs an updated (or just be removed).
Also we still have a few architectures not using dma-direct. I guess
most were doing fine without such limits anyway, but at least arm
will probably need an equivalent check.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: hch@lst.de, m.szyprowski@samsung.com,
iommu@lists.linux-foundation.org,
linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org,
sudeep.holla@arm.com, robh+dt@kernel.org, frowand.list@gmail.com,
gregkh@linuxfoundation.org, joro@8bytes.org, x86@kernel.org
Subject: Re: [RFC PATCH 1/4] dma-mapping: Generalise dma_32bit_limit flag
Date: Tue, 10 Jul 2018 20:04:33 +0200 [thread overview]
Message-ID: <20180710180433.GB26285@lst.de> (raw)
In-Reply-To: <a85a5fe22fced65b2960251fc6e8d8f1e68f828a.1531239284.git.robin.murphy@arm.com>
On Tue, Jul 10, 2018 at 06:17:16PM +0100, Robin Murphy wrote:
> diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
> index 8be8106270c2..95e185347e34 100644
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -183,7 +183,7 @@ int dma_direct_supported(struct device *dev, u64 mask)
> * Various PCI/PCIe bridges have broken support for > 32bit DMA even
> * if the device itself might support it.
> */
> - if (dev->dma_32bit_limit && mask > DMA_BIT_MASK(32))
> + if (dev->bus_dma_mask && mask > dev->bus_dma_mask)
> return 0;
The comment above this check needs an updated (or just be removed).
Also we still have a few architectures not using dma-direct. I guess
most were doing fine without such limits anyway, but at least arm
will probably need an equivalent check.
next prev parent reply other threads:[~2018-07-10 18:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 17:17 [RFC PATCH 0/4] Stop losing firmware-set DMA masks Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` [RFC PATCH 2/4] ACPI/IORT: Set bus DMA mask as appropriate Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` Robin Murphy
[not found] ` <c604b3eae4103ee0ad6da84baa1bc893a81ef5f8.1531239284.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2018-07-10 18:04 ` Christoph Hellwig
2018-07-10 18:04 ` Christoph Hellwig
2018-07-10 18:04 ` Christoph Hellwig
[not found] ` <20180710180458.GC26285-jcswGhMUV9g@public.gmane.org>
2018-07-11 18:03 ` Robin Murphy
2018-07-11 18:03 ` Robin Murphy
2018-07-11 18:03 ` Robin Murphy
2018-07-10 17:17 ` [RFC PATCH 3/4] of/device: " Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` [RFC PATCH 4/4] iommu/dma: Respect bus DMA limit for IOVAs Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` Robin Murphy
[not found] ` <cover.1531239284.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2018-07-10 17:17 ` [RFC PATCH 1/4] dma-mapping: Generalise dma_32bit_limit flag Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 17:17 ` Robin Murphy
2018-07-10 18:04 ` Christoph Hellwig [this message]
2018-07-10 18:04 ` Christoph Hellwig
2018-07-10 18:04 ` Christoph Hellwig
2018-07-11 16:56 ` Robin Murphy
2018-07-11 16:56 ` Robin Murphy
[not found] ` <868cead9-88a7-e58d-3452-a78e19be5f47-5wv7dgnIgG8@public.gmane.org>
2018-07-12 7:20 ` Christoph Hellwig
2018-07-12 7:20 ` Christoph Hellwig
2018-07-12 7:20 ` Christoph Hellwig
2018-07-10 18:02 ` [RFC PATCH 0/4] Stop losing firmware-set DMA masks Christoph Hellwig
2018-07-10 18:02 ` Christoph Hellwig
2018-07-10 18:02 ` Christoph Hellwig
2018-07-10 18:02 ` Christoph Hellwig
[not found] ` <20180710180232.GA26285-jcswGhMUV9g@public.gmane.org>
2018-07-10 18:11 ` Robin Murphy
2018-07-10 18:11 ` Robin Murphy
2018-07-10 18:11 ` Robin Murphy
2018-07-10 18:11 ` Robin Murphy
2018-07-10 18:12 ` Atish Patra
2018-07-10 18:12 ` Atish Patra
2018-07-10 18:12 ` Atish Patra
2018-07-11 14:40 ` Rob Herring
2018-07-11 14:40 ` Rob Herring
[not found] ` <CABGGisxVqLMu3TUpbJGWnUFgzUor-8tdyV8KJeU0YT7y=BHrAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-11 16:03 ` Robin Murphy
2018-07-11 16:03 ` Robin Murphy
2018-07-11 16:03 ` Robin Murphy
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=20180710180433.GB26285@lst.de \
--to=hch@lst.de \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hanjun.guo@linaro.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=m.szyprowski@samsung.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sudeep.holla@arm.com \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.