On 10/15/2012 09:52 PM, Benjamin Herrenschmidt wrote:
>> 
>> I do have an is_write parameter to translate, in fact I added it in
>> order to implement the spapr iommu.  Or do you mean something else?
> 
> Hrm, sort of. "is_write" means you can only express RO vs RW. Two
> parameter for read and write allow to express WO. The only difference is
> going to be if something does one translate for several R and W.
> 
> Not a huge deal, since mostly translate is used for atomic accesses so
> one translate = one access... except with map. It's useful to
> differenciate the map with 3 states: RO, WO, RW.

address_space_rw() and address_space_map() can only by used for one
direction at the time (the first due to its API, the second because of
the need to bounce sometimes), so the current ->translate() signature is
okay for that.  We can consider dropping the is_write parameter and
replacing it with permission bits in IOMMUTLBEntry, I think it's a
little more elegant (but no real advantage unless we start caching
IOMMUTLBEntries).


-- 
error compiling committee.c: too many arguments to function

Reply via email to