From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: John Rose <johnrose@austin.ibm.com>
Cc: Olof Johansson <olof@lixom.net>,
External List <linuxppc-dev@ozlabs.org>,
Santiago Leon <saleon@us.ibm.com>
Subject: Re: iommu hypervisor hypothetical
Date: Thu, 28 Sep 2006 09:11:42 +1000 [thread overview]
Message-ID: <1159398703.18293.104.camel@localhost.localdomain> (raw)
In-Reply-To: <1159381557.19103.17.camel@sinatra.austin.ibm.com>
On Wed, 2006-09-27 at 13:25 -0500, John Rose wrote:
> > So just change the prototype of tce_build
> > to return success/failure, and handle it accordingly in iommu_alloc
> > (DMA_ERROR_CODE). The error should move on up the stack from there.
>
> I'm thinking of functions like dma_map_single(), which returns the
> unsigned type dma_addr_t. Suppose H_HCE_PUT fails, and this gets
> propagated up to the device driver through DMA_ERROR_CODE. The PAPR
> currently defines 2 ways in which this could fail, and we're considering
> at least one more. One error code doesn't seem sufficient.
That's a design issue with the linux API that has been around for some
time. At first, there was no possible error return from dma_map_single()
in fact :( DMA_ERROR_CODE was added, and I see no way to do something
better from that function...
> > Or did I misunderstand your question in the first place? It's sort of
> > sparse on details. :-)
>
> You know how it goes :) I guess my question is whether passing specific
> failure conditions up the call chain is permissible/feasible, and
> whether the prototypes for the various device driver DMA utilities are
> set in stone.
>
> Thanks-
> John
prev parent reply other threads:[~2006-09-27 23:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 16:47 iommu hypervisor hypothetical John Rose
2006-09-27 17:07 ` Olof Johansson
2006-09-27 18:25 ` John Rose
2006-09-27 18:40 ` Olof Johansson
2006-09-27 23:11 ` Benjamin Herrenschmidt [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=1159398703.18293.104.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=johnrose@austin.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=saleon@us.ibm.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).