[PATCH 2/4] x86-64: Calgary IOMMU - move valid_dma_direction into the callers

Muli Ben-Yehuda mulix at mulix.org
Thu May 25 11:42:36 CEST 2006


On Thu, May 25, 2006 at 12:35:07AM -0400, Jeff Garzik wrote:
> Jon Mason wrote:
> >>From Andi Kleen's comments on the original Calgary patch, move
> >valid_dma_direction into the calling functions.
> >
> >Signed-off-by: Muli Ben-Yehuda <muli at il.ibm.com>
> >Signed-off-by: Jon Mason <jdmason at us.ibm.com>
> 
> Even though BUG_ON() includes unlikely(), this introduces additional 
> tests in very hot paths.

Are they really very hot? I mean if you're calling the DMA API, you're
about to frob the hardware or have already frobbed it - does this
check really matter?

> _Why_ do we need this at all?

It was helpful for us during the dma-ops work and Calgary bringup and
Andi requested that we move it from Calgary to common code. I think
we're fine with dropping it if that's the consensus, but it did catch
a few bugs early on and the cost is tiny.

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/




More information about the discuss mailing list