Re: [PATCH 2/3] dma: override "dma_flags_set_dmaflush" for sn-ia64

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: James Bottomley <James.Bottomley@...>
Cc: Jes Sorensen <jes@...>, <akepner@...>, Randy Dunlap <randy.dunlap@...>, linux-kernel <linux-kernel@...>, <rdreier@...>, linux-ia64 <linux-ia64@...>
Date: Wednesday, August 22, 2007 - 12:03 pm

On Wednesday, August 22, 2007 7:02:38 am James Bottomley wrote:

mmiowb() is for PIO->device.  This interface is for DMA->memory (see akepner's 
other mail).

The problem is a DMA write (say to a completion queue) from a device may imply 
something about another DMA write from the same device (say the actual data).  
If the completion queue write arrives first (which can happen on sn2), the 
driver must ensure that the rest of the outstanding DMA is complete prior to 
looking at the completion queue status.  It can either use a regular PIO read 
to do this (i.e. a non-relaxed one) or set a flag on the completion queue DMA 
address that makes it act as a barrier wrt other DMA, which is what akepner's 
patch does (which should be much more efficient that using a PIO read to 
guarantee DMA writes have completed).

Jesse
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/3] dma: override "dma_flags_set_dmaflush" for s..., Jesse Barnes, (Wed Aug 22, 12:03 pm)