Linux MIPS Architecture development
 help / color / mirror / Atom feed
* DMA_NONCOHERENT and dma_map_single
@ 2004-01-18 19:50 Dimitri Torfs
  2004-01-18 23:05 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Dimitri Torfs @ 2004-01-18 19:50 UTC (permalink / raw)
  To: linux-mips

Hi,

  dma_map_single() is supposed to be called on a buffer that exactly
  starts and ends on a cacheline boundary, otherwise "bad things"
  (e.g. overwrite of data that was written by device, ...) (especially
  on dma non-coherent systems) may happen. 

  So what should be done when dma_map_single is not called
  with a sane (ptr, size) argument ?

    - is the driver (caller) considered buggy and should we return a 0
      return-value ?
    - is the driver (caller) considered buggy but we do the mapping
      anyway, hoping that the driver has not/will not touched/touch
      the boundary cachelines ?
    - should we take appropriate actions to make sure the
      cache-effects do not come into play (e.g. by using some kind of
      bounce buffer) ?


  Dimitri

-- 
Dimitri Torfs       |  NSCE 
dimitri@sonycom.com |  The Corporate Village
tel: +32 2 7008541  |  Da Vincilaan 7 - D1 
fax: +32 2 7008622  |  B-1935 Zaventem - Belgium

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-18 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-18 19:50 DMA_NONCOHERENT and dma_map_single Dimitri Torfs
2004-01-18 23:05 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox