On 14/07/12 10:48, Blue Swirl wrote:
>>>> +    cpu_physical_memory_write(sccb, &work_sccb,
>>>> +                              be16_to_cpu(work_sccb.h.length));
>>>
>>> Perhaps the DMA helpers should be used instead.
>>>
>>
>> Is there any rule what to use under which circumstances.
> 
> No, it's a recent addition. Devices (at least those which may be used
> in IOMMU environment) should use DMA helpers for their memory accesses
> in general but virtio may be an exception. I'm not sure which category
> this falls in.

Ok, I read this as, if we need to handle DMA into virtual addresses at some
point in time dma helpers are the way to go.

With SCLP we access real storage (no translation) so I think 
cpu_physical_memory_write is fine here. 

Christian


Reply via email to