bud_dmamap_load_buffer()

Ian Lepore ian at FreeBSD.org
Thu Jan 31 20:32:22 UTC 2013


On Thu, 2013-01-31 at 21:16 +0100, Olivier Houchard wrote:
> On Thu, Jan 31, 2013 at 09:24:27PM +0200, Konstantin Belousov wrote:
> > I noted that arm/busdma_machdep.c uses essentially inlined pmap_kextract()
> > to get the physical address from the kernel address.  I consulted with
> > gonzo, who said that he does not see a reason for inlining the code.
> > 
> > My theory is that before r240983, pmap_kextract() locked the pmap, which
> > caused unneeded and probably wrong locking in the busdma load path. Since
> > this issue is fixed, I see no reason for directly walking the page tables.
> > 
> > Could somebody please review and test the patch ? v6 busdma already uses
> > pmap_kextract().
> > 
> > Do not remove me from Cc:.
> 
> Hi Konstantin,
> 
> It's that way for historical reasons. It used to check the caching attributes
> of the page, as well as its physical address, to try hard to avoid doing
> unnecessery cache flush if the page is already mapped as uncache. Now that
> code is long gone, and there's no reason anymore not to just use
> pmap_kextract(). Your patch looks fine to me.
> 
> Regards,
> 
> Olivier

That would help explain that XXX comment about checking coherent
mappings in user maps that never made much sense to me.  I think we
should delete the comment now as well.

I've applied and tested the patch, it's working fine.

-- Ian




More information about the freebsd-arm mailing list