linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
	linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-s390@vger.kernel.org, sparclinux@vger.kernel.org,
	iommu@lists.linux-foundation.org, linux-parisc@vger.kernel.org,
	xen-devel@lists.xenproject.org, Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Stephen Bates <sbates@raithlin.com>,
	Martin Oliveira <martin.oliveira@eideticom.com>
Subject: Re: [PATCH v1 00/16] .map_sg() error cleanup
Date: Thu, 15 Jul 2021 10:56:09 -0600	[thread overview]
Message-ID: <aa33d2bf-8324-5647-b800-3a2e3e774e80@deltatee.com> (raw)
In-Reply-To: <20210715165309.GO22278@shell.armlinux.org.uk>




On 2021-07-15 10:53 a.m., Russell King (Oracle) wrote:
> On Thu, Jul 15, 2021 at 10:45:28AM -0600, Logan Gunthorpe wrote:
>> Hi,
>>
>> This series is spun out and expanded from my work to add P2PDMA support
>> to DMA map operations[1].
>>
>> The P2PDMA work requires distinguishing different error conditions in
>> a map_sg operation. dma_map_sgtable() already allows for returning an
>> error code (where as dma_map_sg() is only allowed to return zero)
>> however, it currently only returns -EINVAL when a .map_sg() call returns
>> zero.
>>
>> This series cleans up all .map_sg() implementations to return appropriate
>> error codes. After the cleanup, dma_map_sg() will still return zero,
>> however dma_map_sgtable() will pass the error code from the .map_sg()
>> call. Thanks go to Martn Oliveira for doing a lot of the cleanup of the
>> obscure implementations.
>>
>> The patch set is based off of v5.14-rc1 and a git repo can be found
>> here:
> 
> Have all the callers for dma_map_sg() been updated to check for error
> codes? If not, isn't that a pre-requisit to this patch set?

No. Perhaps I wasn't clear enough: This series is changing only
impelemntations of .map_sg(). It does *not* change the return code of
dma_map_sg(). dma_map_sg() will continue to return zero on error for the
foreseeable future. The dma_map_sgtable() call already allows returning
error codes and it will pass the new error code through. This is what
will be used in the P2PDMA work.

Logan

      reply	other threads:[~2021-07-15 16:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 16:45 [PATCH v1 00/16] .map_sg() error cleanup Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 01/16] dma-mapping: Allow map_sg() ops to return negative error codes Logan Gunthorpe
2021-07-16  6:29   ` Christoph Hellwig
2021-07-15 16:45 ` [PATCH v1 02/16] dma-direct: Return appropriate error code from dma_direct_map_sg() Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 03/16] iommu: Return full error code from iommu_map_sg[_atomic]() Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 04/16] dma-iommu: Return error code from iommu_dma_map_sg() Logan Gunthorpe
2021-07-16  6:31   ` Christoph Hellwig
2021-07-15 16:45 ` [PATCH v1 05/16] alpha: return error code from alpha_pci_map_sg() Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 06/16] ARM/dma-mapping: return error code from .map_sg() ops Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 07/16] ia64/sba_iommu: return error code from sba_map_sg_attrs() Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 08/16] MIPS/jazzdma: return error code from jazz_dma_map_sg() Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 09/16] powerpc/iommu: return error code from .map_sg() ops Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 10/16] s390/pci: return error code from s390_dma_map_sg() Logan Gunthorpe
2021-07-16  8:24   ` Niklas Schnelle
2021-07-15 16:45 ` [PATCH v1 11/16] sparc/iommu: return error codes from .map_sg() ops Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 12/16] parisc: return error code " Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 13/16] xen: swiotlb: return error code from xen_swiotlb_map_sg() Logan Gunthorpe
2021-07-19 20:22   ` Boris Ostrovsky
2021-07-15 16:45 ` [PATCH v1 14/16] x86/amd_gart: return error code from gart_map_sg() Logan Gunthorpe
2021-07-16  6:32   ` Christoph Hellwig
2021-07-16 12:11     ` Robin Murphy
2021-07-15 16:45 ` [PATCH v1 15/16] dma-mapping: return error code from dma_dummy_map_sg() Logan Gunthorpe
2021-07-15 16:45 ` [PATCH v1 16/16] dma-mapping: Disallow .map_sg operations from returning zero on error Logan Gunthorpe
2021-07-16  6:33   ` Christoph Hellwig
2021-07-16 12:19     ` Robin Murphy
2021-07-16 16:17     ` Logan Gunthorpe
2021-07-15 16:53 ` [PATCH v1 00/16] .map_sg() error cleanup Russell King (Oracle)
2021-07-15 16:56   ` Logan Gunthorpe [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=aa33d2bf-8324-5647-b800-3a2e3e774e80@deltatee.com \
    --to=logang@deltatee.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.oliveira@eideticom.com \
    --cc=robin.murphy@arm.com \
    --cc=sbates@raithlin.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.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).