diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-01-22 18:16:36 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-01-22 18:16:36 +0000 |
commit | 18c397d8a8ce974998380a8fd88671f84248deb8 (patch) | |
tree | 9d412d1711e54ba842f37e6227325554cd48db04 | |
parent | 9143499c7e01a75fd884374b9aa52d0930aa55f4 (diff) |
consistantly use uvm_prot_* vs vm_prot_* evewrhere
-rw-r--r-- | sys/arch/hppa/hppa/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 18 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 10 | ||||
-rw-r--r-- | sys/arch/hppa/include/pmap.h | 10 |
4 files changed, 21 insertions, 21 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 595450a2fb0..b662cf44bea 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.97 2003/01/14 16:06:53 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.98 2003/01/22 18:16:34 mickey Exp $ */ /* * Copyright (c) 1999-2002 Michael Shalayeff @@ -638,7 +638,7 @@ cpu_startup() panic("cpu_startup: not enough memory for " "buffer cache"); pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg), - VM_PROT_READ|VM_PROT_WRITE); + UVM_PROT_RW); curbuf += PAGE_SIZE; } } diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index a36cd988e08..779e5aae53c 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.92 2003/01/22 16:59:45 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.93 2003/01/22 18:16:34 mickey Exp $ */ /* * Copyright (c) 1998-2002 Michael Shalayeff @@ -450,14 +450,14 @@ pmap_bootstrap(vstart) uvm_setpagesize(); - hppa_prot[VM_PROT_NONE | VM_PROT_NONE | VM_PROT_NONE] =TLB_AR_NA; - hppa_prot[VM_PROT_READ | VM_PROT_NONE | VM_PROT_NONE] =TLB_AR_R; - hppa_prot[VM_PROT_NONE | VM_PROT_WRITE | VM_PROT_NONE] =TLB_AR_RW; - hppa_prot[VM_PROT_READ | VM_PROT_WRITE | VM_PROT_NONE] =TLB_AR_RW; - hppa_prot[VM_PROT_NONE | VM_PROT_NONE | VM_PROT_EXECUTE] =TLB_AR_RX; - hppa_prot[VM_PROT_READ | VM_PROT_NONE | VM_PROT_EXECUTE] =TLB_AR_RX; - hppa_prot[VM_PROT_NONE | VM_PROT_WRITE | VM_PROT_EXECUTE] =TLB_AR_RWX; - hppa_prot[VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE] =TLB_AR_RWX; + hppa_prot[UVM_PROT_NONE] = TLB_AR_NA; + hppa_prot[UVM_PROT_READ] = TLB_AR_R; + hppa_prot[UVM_PROT_WRITE] = TLB_AR_RW; + hppa_prot[UVM_PROT_RW] = TLB_AR_RW; + hppa_prot[UVM_PROT_EXEC] = TLB_AR_RX; + hppa_prot[UVM_PROT_RX] = TLB_AR_RX; + hppa_prot[UVM_PROT_WX] = TLB_AR_RWX; + hppa_prot[UVM_PROT_RWX] = TLB_AR_RWX; /* * Initialize kernel pmap diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 17c07d77df7..05f8dd87724 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.58 2003/01/09 20:48:56 mickey Exp $ */ +/* $OpenBSD: trap.c,v 1.59 2003/01/22 18:16:34 mickey Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -155,17 +155,17 @@ trap(type, frame) trapnum == T_EXCEPTION || trapnum == T_EMULATION) { va = frame->tf_iioq_head; space = frame->tf_iisq_head; - vftype = VM_PROT_EXECUTE; + vftype = UVM_PROT_EXEC; } else { va = frame->tf_ior; space = frame->tf_isr; /* what is the vftype for the T_ITLBMISSNA ??? XXX */ if (va == frame->tf_iioq_head) - vftype = VM_PROT_EXECUTE; + vftype = UVM_PROT_EXEC; else if (inst_store(opcode)) - vftype = VM_PROT_WRITE; + vftype = UVM_PROT_WRITE; else - vftype = VM_PROT_READ; + vftype = UVM_PROT_READ; } if (frame->tf_flags & TFF_LAST) diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h index 019b26f9e41..5e25b2851f0 100644 --- a/sys/arch/hppa/include/pmap.h +++ b/sys/arch/hppa/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.26 2002/11/07 19:22:56 mickey Exp $ */ +/* $OpenBSD: pmap.h,v 1.27 2003/01/22 18:16:35 mickey Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -132,8 +132,8 @@ pmap_prot(struct pmap *pmap, int prot) static __inline void pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { - if ((prot & VM_PROT_WRITE) == 0) { - if (prot & (VM_PROT_READ|VM_PROT_EXECUTE)) + if ((prot & UVM_PROT_WRITE) == 0) { + if (prot & (UVM_PROT_RX)) pmap_changebit(pg, 0, PTE_PROT(TLB_WRITE)); else pmap_page_remove(pg); @@ -143,8 +143,8 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) static __inline void pmap_protect(struct pmap *pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) { - if ((prot & VM_PROT_WRITE) == 0) { - if (prot & (VM_PROT_READ|VM_PROT_EXECUTE)) + if ((prot & UVM_PROT_WRITE) == 0) { + if (prot & (UVM_PROT_RX)) pmap_write_protect(pmap, sva, eva, prot); else pmap_remove(pmap, sva, eva); |