RF_CACHEABLE flag

Konstantin Belousov kostikbel at gmail.com
Mon Feb 29 16:36:06 UTC 2016


On Mon, Feb 29, 2016 at 05:18:16PM +0100, Svatopluk Kraus wrote:
> It's not so simple to change memory attributes on ARM. Some conditions
> must be met. So, a question is - in which circumstances
> pmap_change_attr() is used?
> 
> It's defined like
> int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode);
> 
> (1) As memory attributes can be changed on a page basis only, the va
> and size are arranged according to that in i386 implementation. That's
> okay.
> 
> (2) Can the memory be used by somebody else while the attributes are
> being changed? In other words, can the memory be unmapped temporary?

Is this for the change of pte through invalidation ?  In other words,
do you mean, is it fine to temporary unmap the range during the
pmap_change_attr() execution ?

If yes, it is fine for uses of the function in the DRM code, since
it is utilized during a setup of things like GTT or buffers, and no
other accesses to the memory could happen until the setup is finished.

I noted that function is used by several network drivers as well, and
by ntb.  It seem that cxgbe and mxge also use it during setup.


More information about the freebsd-arch mailing list