bud_dmamap_load_buffer()

Olivier Houchard mlfbsd at ci0.org
Thu Jan 31 20:16:48 UTC 2013


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


More information about the freebsd-arm mailing list