Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1665606
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 21/44] powerpc: implement ->mapping_error |
| Date | 2017-06-14 11:20 +0200 |
| Message-ID | <tScD0-3kg-9@gated-at.bofh.it> (permalink) |
| References | <tQ5FE-4OD-5@gated-at.bofh.it> <tQ5Pl-4SX-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Christoph Hellwig <hch@lst.de> writes:
> DMA_ERROR_CODE is going to go away, so don't rely on it. Instead
> define a ->mapping_error method for all IOMMU based dma operation
> instances. The direct ops don't ever return an error and don't
> need a ->mapping_error method.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> arch/powerpc/include/asm/dma-mapping.h | 4 ----
> arch/powerpc/include/asm/iommu.h | 4 ++++
> arch/powerpc/kernel/dma-iommu.c | 6 ++++++
> arch/powerpc/kernel/iommu.c | 28 ++++++++++++++--------------
> arch/powerpc/platforms/cell/iommu.c | 1 +
> arch/powerpc/platforms/pseries/vio.c | 3 ++-
> 6 files changed, 27 insertions(+), 19 deletions(-)
I also see:
arch/powerpc/kernel/dma.c:const struct dma_map_ops dma_direct_ops = {
Which you mentioned can't fail.
arch/powerpc/platforms/pseries/ibmebus.c:static const struct dma_map_ops ibmebus_dma_ops = {
Which can't fail.
And:
arch/powerpc/platforms/powernv/npu-dma.c:static const struct dma_map_ops dma_npu_ops = {
arch/powerpc/platforms/ps3/system-bus.c:static const struct dma_map_ops ps3_sb_dma_ops = {
arch/powerpc/platforms/ps3/system-bus.c:static const struct dma_map_ops ps3_ioc0_dma_ops = {
All of which look like they definitely can fail, but return 0 on error
and don't implement ->mapping_error.
So I guess I'm acking this and adding a TODO to fix up the NPU code at
least, the ps3 code is probably better left alone these days.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 21/44] powerpc: implement ->mapping_error Christoph Hellwig <hch@lst.de> - 2017-06-08 15:40 +0200 Re: [PATCH 21/44] powerpc: implement ->mapping_error Michael Ellerman <mpe@ellerman.id.au> - 2017-06-14 11:20 +0200
csiph-web