Il 07/05/2013 20:20, Peter Maydell ha scritto:
> On 7 May 2013 15:16, Paolo Bonzini <pbonz...@redhat.com> wrote:
>> The translate function in the DMAContext is now always NULL.
>> Remove every reference to it.
> 
>> --- a/include/sysemu/dma.h
>> +++ b/include/sysemu/dma.h
> 
>> -static inline int dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr,
>> -                                        void *buf, dma_addr_t len,
>> -                                        DMADirection dir)
>> +static inline void dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr,
>> +                                         void *buf, dma_addr_t len,
>> +                                         DMADirection dir)
>>  {
>> -    if (!dma_has_iommu(dma)) {
>> -        /* Fast-path for no IOMMU */
>> -        address_space_rw(dma->as, addr, buf, len, dir == 
>> DMA_DIRECTION_FROM_DEVICE);
>> -        return 0;
>> -    } else {
>> -        return iommu_dma_memory_rw(dma, addr, buf, len, dir);
>> -    }
>> +    address_space_rw(dma->as, addr, buf, len, dir == 
>> DMA_DIRECTION_FROM_DEVICE);
>>  }
> 
> Should we really be removing the success-or-failure indication
> from the read/write functions?

For now yes.  In the future I want to add it back to address_space_rw.

Paolo

Reply via email to