aboutsummaryrefslogtreecommitdiff
path: root/sys/ia64
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2012-06-16 18:56:19 +0000
committerAlan Cox <alc@FreeBSD.org>2012-06-16 18:56:19 +0000
commit6031c68de4bcae8f608916a7df5885c9b9942d34 (patch)
treeebf0376a21131a0f41835773afe0ddda56d3efbe /sys/ia64
parentbc5116ba42aea2291f3c70ba46aba6ac677e997f (diff)
downloadsrc-6031c68de4bcae8f608916a7df5885c9b9942d34.tar.gz
src-6031c68de4bcae8f608916a7df5885c9b9942d34.zip
The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap
layer, but it is read directly by the MI VM layer. This change introduces pmap_page_is_write_mapped() in order to completely encapsulate all direct access to PGA_WRITEABLE in the pmap layer. Aesthetics aside, I am making this change because amd64 will likely begin using an alternative method to track write mappings, and having pmap_page_is_write_mapped() in place allows me to make such a change without further modification to the MI VM layer. As an added bonus, tidy up some nearby comments concerning page flags. Reviewed by: kib MFC after: 6 weeks
Notes
Notes: svn path=/head/; revision=237168
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/include/pmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h
index 2b89df0e2504..3c4539f6d143 100644
--- a/sys/ia64/include/pmap.h
+++ b/sys/ia64/include/pmap.h
@@ -118,6 +118,7 @@ extern int pmap_vhpt_log2size;
#define pmap_page_get_memattr(m) ((m)->md.memattr)
#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list))
+#define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0)
#define pmap_mapbios(pa, sz) pmap_mapdev(pa, sz)
#define pmap_unmapbios(va, sz) pmap_unmapdev(va, sz)