From 6eeaee04e4175a3faa0ce3f7778a3abce0d8d9a2 Mon Sep 17 00:00:00 2001 From: alc Date: Sat, 16 Jun 2012 18:56:19 +0000 Subject: 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 --- sys/vm/pmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/vm/pmap.h') diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index a4f1e70..d06c22b 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -80,10 +80,11 @@ struct pmap_statistics { typedef struct pmap_statistics *pmap_statistics_t; /* - * Each machine dependent implementation is expected to provide: + * Each machine-dependent implementation is required to provide: * * vm_memattr_t pmap_page_get_memattr(vm_page_t); * boolean_t pmap_page_is_mapped(vm_page_t); + * boolean_t pmap_page_is_write_mapped(vm_page_t); * void pmap_page_set_memattr(vm_page_t, vm_memattr_t); */ #include -- cgit v1.1