From: hch@lst.de (Christoph Hellwig)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/7] Stop losing firmware-set DMA masks
Date: Mon, 6 Aug 2018 14:13:34 +0200 [thread overview]
Message-ID: <20180806121334.GA5340@lst.de> (raw)
In-Reply-To: <CAK8P3a3ZcOeHMR_qFnsBdXED+2X8_AEMKoS5MeAQhbapbGmm9w@mail.gmail.com>
On Mon, Aug 06, 2018 at 12:01:34PM +0200, Arnd Bergmann wrote:
> There are a few subtle corner cases here, in particular in which cases
> the new dma_set_mask() behavior on arm64 reports success or
> failure when truncating the mask to the bus_dma_mask.
Going forward my plan was to make dma_set_mask() never fail. The idea
is that it sets the mask that the device is capable of, and the core
dma code is responsible for also looking at bus_dma_mask and otherwise
make things just work.
Robin brought up the case where a platform can't handle a given limitation
ever, e.g. a PCI(e) device with a 24-bit dma mask on a device with a dma
offset that means we'll never have any physical memory reachable in that
range. So we'll either still need to allow it to fail for such corner
cases or delay such error until later, e.g. when dma_alloc_* (or in the
corner case of the corner case dma_map_*) is called. I'm still undecided
which way to go, but not allowing error returns from dma_set_mask and
its variants sounds very tempting.
next prev parent reply other threads:[~2018-08-06 12:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 22:16 [PATCH v2 0/7] Stop losing firmware-set DMA masks Robin Murphy
2018-07-23 22:16 ` [PATCH v2 1/7] ACPI/IORT: Support address size limit for root complexes Robin Murphy
2018-07-23 22:16 ` [PATCH v2 2/7] dma-mapping: Generalise dma_32bit_limit flag Robin Murphy
2018-07-25 11:29 ` Christoph Hellwig
2018-07-27 17:45 ` Grygorii Strashko
2018-07-27 20:11 ` Robin Murphy
2018-07-27 20:41 ` Grygorii Strashko
2018-07-23 22:16 ` [PATCH v2 3/7] ACPI/IORT: Set bus DMA mask as appropriate Robin Murphy
2018-07-25 11:29 ` Christoph Hellwig
2018-07-25 13:16 ` Lorenzo Pieralisi
2018-07-23 22:16 ` [PATCH v2 4/7] of/device: " Robin Murphy
2018-07-25 11:30 ` Christoph Hellwig
2018-07-23 22:16 ` [PATCH v2 5/7] iommu/dma: Respect bus DMA limit for IOVAs Robin Murphy
2018-07-26 8:58 ` Christoph Hellwig
2018-07-23 22:16 ` [PATCH v2 6/7] ACPI/IORT: Don't set default coherent DMA mask Robin Murphy
2018-07-25 15:27 ` Lorenzo Pieralisi
2018-07-25 15:43 ` Robin Murphy
2018-07-23 22:16 ` [PATCH v2 7/7] OF: " Robin Murphy
2018-07-26 23:52 ` Grygorii Strashko
2018-07-27 0:22 ` Grygorii Strashko
2018-07-27 11:36 ` Robin Murphy
2018-07-27 17:34 ` Grygorii Strashko
2018-07-27 19:46 ` Robin Murphy
2018-07-27 18:13 ` Russell King - ARM Linux
2018-07-27 18:45 ` Grygorii Strashko
2018-07-27 20:42 ` Robin Murphy
2018-07-27 19:29 ` Robin Murphy
2018-07-25 11:31 ` [PATCH v2 0/7] Stop losing firmware-set DMA masks Christoph Hellwig
2018-07-25 12:11 ` Joerg Roedel
2018-07-25 12:12 ` Robin Murphy
2018-07-25 12:17 ` Will Deacon
2018-07-25 13:58 ` Ard Biesheuvel
2018-07-26 9:00 ` Christoph Hellwig
2018-07-26 23:45 ` Grygorii Strashko
2018-07-27 10:55 ` Robin Murphy
2018-07-27 17:22 ` Grygorii Strashko
2018-07-29 12:32 ` Arnd Bergmann
2018-07-31 11:24 ` Robin Murphy
2018-08-06 10:01 ` Arnd Bergmann
2018-08-06 12:13 ` Christoph Hellwig [this message]
2018-08-06 12:13 ` Arnd Bergmann
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=20180806121334.GA5340@lst.de \
--to=hch@lst.de \
--cc=linux-arm-kernel@lists.infradead.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).