Re: [PATCH] x86-64: trivial gart clean-up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 25, 2006 at 08:26:07AM +0300, Muli Ben-Yehuda wrote:
> On Tue, Apr 25, 2006 at 12:42:43AM +0200, Andi Kleen wrote:
> 
> > On Tuesday 25 April 2006 00:53, Jon Mason wrote:
> > > A trivial change to have gart_unmap_sg call gart_unmap_single directly,
> > > instead of bouncing through the dma_unmap_single wrapper in
> > > dma-mapping.h.  This change required moving the gart_unmap_single above
> > > gart_unmap_sg, and under gart_map_single (which seems a more logical
> > > place that its current location IMHO).
> > 
> > What advantage does that have? I think I prefer the old code.
> 
> I don't know what Jon had in mind, but we do avoid a call through a
> function pointer this way. I agree with Jon that it also makes more
> sense - gart code can just call the gart code directly, without going
> through the dma_xxx wrapper that ends up calling it anyway.

Yes, that is exactly what I was trying to say in my comment above.
Sorry for the confusion, and thanks for clearing it up Muli.

The dma_unmap_single call is the only dma_XXX type call in the gart
code.  All other calls use the gart_XXX equivalent.  It seems to me that
this was an oversight.  Also, the dma_XXX type calls go through a
wrapper in asm/dma-mapping.h, which translates this call to the gart
equivalent.  It also makes the code 8 bytes smaller :)

Thanks,
Jon

> 
> Cheers,
> Muli
> -- 
> Muli Ben-Yehuda
> http://www.mulix.org | http://mulix.livejournal.com/
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux