iommu hypervisor hypothetical

Olof Johansson olof at lixom.net
Thu Sep 28 04:40:37 EST 2006


On Wed, 27 Sep 2006 13:25:57 -0500 John Rose <johnrose at 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



More information about the Linuxppc-dev mailing list