bus_dmamap_sync() for bounced client buffers from user address space
Jason Harmening
jason.harmening at gmail.com
Wed Apr 29 19:59:05 UTC 2015
>
> See the paragraph in my mail before the one you answered.
> I am asking about the bcopy()/physcopyout() lines in diff, not about
> the if () conditions change. The later is definitely fine.
>
Oh, yes, sorry. There were a couple of whitespace changes there, but
nothing of consequence.
> Even without SMP, VIPT cache cannot hold two mappings of the same page.
> As I understand, sometimes it is more involved, eg if mappings have
> correct color (eg. on ultrasparcs), then cache can deal with aliasing.
> Otherwise pmap has to map the page uncached for all mappings.
>
Yes, you are right. Regardless of whatever logic the cache uses (or
doesn't use), FreeBSD's page-coloring scheme should prevent that.
>
> I do not see what would make this case special for SMP after that.
> Cache invalidation would be either not needed, or coherency domain
> propagation of the virtual address does the right thing.
>
Since VIPT cache operations require a virtual address, I'm wondering about
the case where different processes are running on different cores, and the
same UVA corresponds to a completely different physical page for each of
those processes. If the d-cache for each core contains that UVA, then what
does it mean when one core issues a flush/invalidate instruction for that
UVA?
Admittedly, there's a lot I don't know about how that's supposed to work in
the arm/mips SMP world. For all I know, the SMP targets could be
fully-snooped and we don't need to worry about cache maintenance at all.
More information about the freebsd-arch
mailing list