Author: mmel Date: Sat May 13 10:00:24 2017 New Revision: 318251 URL: https://svnweb.freebsd.org/changeset/base/318251
Log: Clarify usage rules for pmap_remap_vm_attr(). Not a functional change. MFC with: r318021 MFC after: 2 weeks Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat May 13 03:10:50 2017 (r318250) +++ head/sys/arm/arm/pmap-v6.c Sat May 13 10:00:24 2017 (r318251) @@ -500,7 +500,24 @@ pmap_set_tex(void) /* * Remap one vm_meattr class to another one. This can be useful as * workaround for SOC errata, e.g. if devices must be accessed using - * SO memory class. + * SO memory class. + * + * !!! Please note that this function is absolutely last resort thing. + * It should not be used under normal circumstances. !!! + * + * Usage rules: + * - it shall be called after pmap_bootstrap_prepare() and before + * cpu_mp_start() (thus only on boot CPU). In practice, it's expected + * to be called from platform_attach() or platform_late_init(). + * + * - if remapping doesn't change caching mode, or until uncached class + * is remapped to any kind of cached one, then no other restriction exists. + * + * - if pmap_remap_vm_attr() changes caching mode, but both (original and + * remapped) remain cached, then caller is resposible for calling + * of dcache_wbinv_poc_all(). + * + * - remapping of any kind of cached class to uncached is not permitted. */ void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"