From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Christoph Hellwig <hch@lst.de>,
m.szyprowski@samsung.com, iommu@lists.linux-foundation.org,
linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 1/2] dma-mapping: Clean up dma_set_*mask() hooks
Date: Tue, 10 Jul 2018 13:44:43 +0200 [thread overview]
Message-ID: <20180710114443.GC32688@lst.de> (raw)
In-Reply-To: <3ce04634-a467-ec6b-7b90-6cd916d9b532@arm.com>
On Mon, Jul 09, 2018 at 03:53:50PM +0100, Robin Murphy wrote:
> Oh, for sure, the generic fix would be the longer-term goal, this was just
> an expedient compromise because I want to get *something* landed for 4.19.
> Since in practice this is predominantly affecting arm64, doing the
> arch-specific fix to appease affected customers then working to generalise
> it afterwards seemed to carry the lowest risk.
>
> That said, I think I can see a relatively safe and clean alternative
> approach based on converting dma_32bit_limit to a mask, so I'll spin some
> patches around that idea ASAP to continue the discussion.
Great! I really want to sort out this area as soon as possible, and
introducing more arch specific code isn't really helping with that. In
fact my whole drive to consolidate code is based on the fact that
I want to fix issues like this in one code base instead of 20 slightly
different ones.
FYI, this is the Xilinx/RISC-V use case for the 32-bit limit,
which I'll need to respin a bit based on linux-pci feedback:
http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/xilinx-dma-32
> It's entirely possible to plug an old PCI soundcard via a bridge adapter
> into a modern board where the card's 24-bit DMA mask reaches nothing but
> the SoC's boot flash, and no IOMMU is available (e.g. some of the smaller
> NXP Layercape stuff); I still think there should be an error in such rare
> cases when DMA is utterly impossible, but otherwise I agree it would be
> much nicer for drivers to just provide their preferred mask and let the ops
> massage it as necessary.
Ok, I guess we need still need to keep the return value for that.
prev parent reply other threads:[~2018-07-10 11:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 17:50 [RFC PATCH 1/2] dma-mapping: Clean up dma_set_*mask() hooks Robin Murphy
2018-07-04 17:50 ` [RFC PATCH 2/2] dma-mapping: Clean up dma_get_required_mask() hooks Robin Murphy
2018-07-05 19:38 ` Christoph Hellwig
2018-07-06 14:22 ` Robin Murphy
2018-07-10 11:39 ` Christoph Hellwig
2018-07-10 12:29 ` Robin Murphy
2018-07-10 15:08 ` Christoph Hellwig
2018-07-05 19:37 ` [RFC PATCH 1/2] dma-mapping: Clean up dma_set_*mask() hooks Christoph Hellwig
2018-07-06 14:20 ` Robin Murphy
2018-07-08 15:07 ` Christoph Hellwig
2018-07-09 14:53 ` Robin Murphy
2018-07-10 11:44 ` Christoph Hellwig [this message]
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=20180710114443.GC32688@lst.de \
--to=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
/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).