LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: John Rose <johnrose@austin.ibm.com>
Cc: External, Santiago Leon <saleon@us.ibm.com>,
	List <linuxppc-dev@ozlabs.org>
Subject: Re: iommu hypervisor hypothetical
Date: Wed, 27 Sep 2006 13:40:37 -0500	[thread overview]
Message-ID: <20060927134037.0384a8da@localhost.localdomain> (raw)
In-Reply-To: <1159381557.19103.17.camel@sinatra.austin.ibm.com>

On Wed, 27 Sep 2006 13:25:57 -0500 John Rose <johnrose@austin.ibm.com> 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.

So you need to know in the driver why it failed, to take separate
actions based on why? Driver/device events aren't communicated in any
other manner?

> > 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.

You could expand to other DMA_ERROR_.* codes, as long as you modify
dma_mapping_error accordingly.


-Olof

  reply	other threads:[~2006-09-27 18:42 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 [this message]
2006-09-27 23:11     ` Benjamin Herrenschmidt

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=20060927134037.0384a8da@localhost.localdomain \
    --to=olof@lixom.net \
    --cc=johnrose@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --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