]> Zhao Yanbai Git Server - minix.git/commitdiff
vm: include no-caching bits in PTF_ALLFLAGS for flags sanity check.
authorBen Gras <ben@minix3.org>
Tue, 13 Apr 2010 11:08:08 +0000 (11:08 +0000)
committerBen Gras <ben@minix3.org>
Tue, 13 Apr 2010 11:08:08 +0000 (11:08 +0000)
servers/vm/arch/i386/pagetable.c
servers/vm/arch/i386/pagetable.h

index cc3e8f776c968877c3da641cf50b11abf213da8f..4fa248311ac8d37ba22070d1249e0e102da49878 100644 (file)
@@ -855,8 +855,7 @@ PUBLIC void pt_init(phys_bytes usedlimit)
                                I386_VM_PRESENT | I386_VM_USER | I386_VM_WRITE |
                                global_bit;
                        if(flags & VMMF_UNCACHED)
-                               kern_mappings[index].flags |=
-                                       I386_VM_PWT | I386_VM_PCD;
+                               kern_mappings[index].flags |= PTF_NOCACHE;
                        if(addr % I386_PAGE_SIZE)
                                panic("VM: addr unaligned: %d", addr);
                        if(len % I386_PAGE_SIZE)
index c1eacc8a26080978c03121f2f1ad47b4e6a09418..68d54c20c765a6638b500b619ccab2059dad6457 100644 (file)
@@ -30,11 +30,12 @@ typedef struct {
 #define PTF_USER       I386_VM_USER
 #define PTF_GLOBAL     I386_VM_GLOBAL
 #define PTF_MAPALLOC   I386_VM_PTAVAIL1 /* Page allocated by pt code. */
+#define PTF_NOCACHE    (I386_VM_PWT | I386_VM_PCD)
 
 /* For arch-specific PT routines to check if no bits outside
  * the regular flags are set.
  */
-#define PTF_ALLFLAGS   (PTF_WRITE|PTF_PRESENT|PTF_USER|PTF_GLOBAL)
+#define PTF_ALLFLAGS   (PTF_WRITE|PTF_PRESENT|PTF_USER|PTF_GLOBAL|PTF_NOCACHE)
 
 #if SANITYCHECKS
 #define PT_SANE(p) { pt_sanitycheck((p), __FILE__, __LINE__); }