diff options
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/iommu.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/clock.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/cpu.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/emul.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 14 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/mdesc.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/mem.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/pmap.c | 88 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 14 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/vm_machdep.c | 8 |
10 files changed, 79 insertions, 78 deletions
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c index e789becd742..da63933f805 100644 --- a/sys/arch/sparc64/dev/iommu.c +++ b/sys/arch/sparc64/dev/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.70 2014/10/26 18:17:16 kettenis Exp $ */ +/* $OpenBSD: iommu.c,v 1.71 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */ /* @@ -188,8 +188,8 @@ iommu_init(char *name, struct iommu_state *is, int tsbsize, u_int32_t iovabase) for (; m != NULL; m = TAILQ_NEXT(m,pageq)) { pa = VM_PAGE_TO_PHYS(m); pmap_enter(pmap_kernel(), va, pa | PMAP_NVC, - VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE | PMAP_WIRED); va += PAGE_SIZE; } pmap_update(pmap_kernel()); diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c index 70209032749..43457cf709a 100644 --- a/sys/arch/sparc64/sparc64/clock.c +++ b/sys/arch/sparc64/sparc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.54 2014/07/12 18:44:43 tedu Exp $ */ +/* $OpenBSD: clock.c,v 1.55 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */ /* @@ -308,10 +308,10 @@ clock_bus_wenable(handle, onoff) s = splhigh(); if (onoff) prot = writers++ == 0 ? - VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED : 0; + PROT_READ | PROT_WRITE | PMAP_WIRED : 0; else prot = --writers == 0 ? - VM_PROT_READ | PMAP_WIRED : 0; + PROT_READ | PMAP_WIRED : 0; splx(s); if (prot) { diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c index 976e74bfbe2..15ae546e82b 100644 --- a/sys/arch/sparc64/sparc64/cpu.c +++ b/sys/arch/sparc64/sparc64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.62 2014/03/29 18:09:30 guenther Exp $ */ +/* $OpenBSD: cpu.c,v 1.63 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */ /* @@ -147,7 +147,7 @@ alloc_cpuinfo(struct mainbus_attach_args *ma) cpu0paddr += sz; for (pa = pa0; pa < cpu0paddr; pa += PAGE_SIZE, va += PAGE_SIZE) - pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE); + pmap_kenter_pa(va, pa, PROT_READ | PROT_WRITE); pmap_update(pmap_kernel()); diff --git a/sys/arch/sparc64/sparc64/emul.c b/sys/arch/sparc64/sparc64/emul.c index 3cd9f33faa2..ee3a8f20b0e 100644 --- a/sys/arch/sparc64/sparc64/emul.c +++ b/sys/arch/sparc64/sparc64/emul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emul.c,v 1.22 2011/07/11 15:40:47 guenther Exp $ */ +/* $OpenBSD: emul.c,v 1.23 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: emul.c,v 1.8 2001/06/29 23:58:40 eeh Exp $ */ /*- @@ -394,7 +394,7 @@ emul_qf(int32_t insv, struct proc *p, union sigval sv, struct trapframe *tf) segv: KERNEL_LOCK(); - trapsignal(p, SIGSEGV, isload ? VM_PROT_READ : VM_PROT_WRITE, + trapsignal(p, SIGSEGV, isload ? PROT_READ : PROT_WRITE, SEGV_MAPERR, sv); KERNEL_UNLOCK(); return (0); diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index bfa6dbec3f1..ba74694247a 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.170 2014/10/25 16:58:59 kettenis Exp $ */ +/* $OpenBSD: machdep.c,v 1.171 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -825,7 +825,7 @@ printf("starting dump, blkno %lld\n", (long long)blkno); if (i && (i % (1024*1024)) == 0) printf("%lld ", i / (1024*1024)); (void) pmap_enter(pmap_kernel(), dumpspace, maddr, - VM_PROT_READ, VM_PROT_READ|PMAP_WIRED); + PROT_READ, PROT_READ | PMAP_WIRED); pmap_update(pmap_kernel()); error = (*dump)(dumpdev, blkno, (caddr_t)dumpspace, (int)n); @@ -1476,8 +1476,8 @@ _bus_dmamem_map(t, t0, segs, nsegs, size, kvap, flags) #endif addr = VM_PAGE_TO_PHYS(m); error = pmap_enter(pmap_kernel(), va, addr | cbit, - VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | - VM_PROT_WRITE | PMAP_WIRED | PMAP_CANFAIL); + PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE | PMAP_WIRED | PMAP_CANFAIL); if (error) { pmap_update(pmap_kernel()); km_free((void *)sva, ssize, &kv_any, &kp_none); @@ -1596,7 +1596,7 @@ sparc_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t addr, vaddr_t va; u_int64_t pa; paddr_t pm_flags = 0; - vm_prot_t pm_prot = VM_PROT_READ; + vm_prot_t pm_prot = PROT_READ; if (flags & BUS_SPACE_MAP_PROMADDRESS) { hp->bh_ptr = addr; @@ -1657,7 +1657,7 @@ sparc_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t addr, pa = trunc_page(addr); if ((flags & BUS_SPACE_MAP_READONLY) == 0) - pm_prot |= VM_PROT_WRITE; + pm_prot |= PROT_WRITE; #ifdef BUS_SPACE_DEBUG { /* scope */ @@ -1728,7 +1728,7 @@ sparc_bus_protect(bus_space_tag_t t, bus_space_tag_t t0, bus_space_handle_t h, } prot = (flags & BUS_SPACE_MAP_READONLY) ? - VM_PROT_READ : VM_PROT_READ | VM_PROT_WRITE; + PROT_READ : PROT_READ | PROT_WRITE; if ((flags & BUS_SPACE_MAP_CACHEABLE) == 0) pm_flags |= PMAP_NC; diff --git a/sys/arch/sparc64/sparc64/mdesc.c b/sys/arch/sparc64/sparc64/mdesc.c index 77ce1cb528c..2d905f4ef72 100644 --- a/sys/arch/sparc64/sparc64/mdesc.c +++ b/sys/arch/sparc64/sparc64/mdesc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdesc.c,v 1.5 2014/10/24 21:49:34 kettenis Exp $ */ +/* $OpenBSD: mdesc.c,v 1.6 2014/11/16 12:30:59 deraadt Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -69,8 +69,9 @@ again: m = TAILQ_FIRST(&mlist); for (; m != NULL; m = TAILQ_NEXT(m,pageq)) { pa = VM_PAGE_TO_PHYS(m); - pmap_enter(pmap_kernel(), va, pa, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + pmap_enter(pmap_kernel(), va, pa, + PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE | PMAP_WIRED); va += PAGE_SIZE; } pmap_update(pmap_kernel()); diff --git a/sys/arch/sparc64/sparc64/mem.c b/sys/arch/sparc64/sparc64/mem.c index a38bec453f2..d85f651f6a2 100644 --- a/sys/arch/sparc64/sparc64/mem.c +++ b/sys/arch/sparc64/sparc64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.11 2007/11/14 20:43:12 kettenis Exp $ */ +/* $OpenBSD: mem.c,v 1.12 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: mem.c,v 1.18 2001/04/24 04:31:12 thorpej Exp $ */ /* @@ -129,8 +129,8 @@ mmrw(dev, uio, flags) error = EFAULT; goto unlock; } - prot = uio->uio_rw == UIO_READ ? VM_PROT_READ : - VM_PROT_WRITE; + prot = uio->uio_rw == UIO_READ ? PROT_READ : + PROT_WRITE; pmap_enter(pmap_kernel(), (vaddr_t)vmmap, trunc_page(v), prot, prot|PMAP_WIRED); pmap_update(pmap_kernel()); diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 5b495837eb3..d550d591a8a 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.82 2014/07/08 17:19:25 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.83 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -1971,24 +1971,24 @@ pmap_kenter_pa(va, pa, prot) tte.tag = TSB_TAG(0,pm->pm_ctx,va); if (CPU_ISSUN4V) { tte.data = SUN4V_TSB_DATA(0, PGSZ_8K, pa, 1 /* Privileged */, - (VM_PROT_WRITE & prot), 1, 0, 1, 0); + (PROT_WRITE & prot), 1, 0, 1, 0); /* * We don't track modification on kenter mappings. */ - if (prot & VM_PROT_WRITE) + if (prot & PROT_WRITE) tte.data |= SUN4V_TLB_REAL_W|SUN4V_TLB_W; - if (prot & VM_PROT_EXECUTE) + if (prot & PROT_EXEC) tte.data |= SUN4V_TLB_EXEC; tte.data |= SUN4V_TLB_TSB_LOCK; /* wired */ } else { tte.data = SUN4U_TSB_DATA(0, PGSZ_8K, pa, 1 /* Privileged */, - (VM_PROT_WRITE & prot), 1, 0, 1, 0); + (PROT_WRITE & prot), 1, 0, 1, 0); /* * We don't track modification on kenter mappings. */ - if (prot & VM_PROT_WRITE) + if (prot & PROT_WRITE) tte.data |= SUN4U_TLB_REAL_W|SUN4U_TLB_W; - if (prot & VM_PROT_EXECUTE) + if (prot & PROT_EXEC) tte.data |= SUN4U_TLB_EXEC; tte.data |= SUN4U_TLB_TSB_LOCK; /* wired */ } @@ -2131,13 +2131,13 @@ pmap_enter(pm, va, pa, prot, flags) if (pv != NULL) { aliased = (pv->pv_va&(PV_ALIAS|PV_NVC)); #ifdef DIAGNOSTIC - if ((flags & VM_PROT_ALL) & ~prot) + if ((flags & PROT_MASK) & ~prot) panic("pmap_enter: access_type exceeds prot"); #endif /* If we don't have the traphandler do it, set the ref/mod bits now */ - if (flags & VM_PROT_ALL) + if (flags & PROT_MASK) pv->pv_va |= PV_REF; - if (flags & VM_PROT_WRITE) + if (flags & PROT_WRITE) pv->pv_va |= PV_MOD; pv->pv_va |= pmap_tte2flags(tte.data); #ifdef DEBUG @@ -2158,21 +2158,21 @@ pmap_enter(pm, va, pa, prot, flags) #endif if (CPU_ISSUN4V) { tte.data = SUN4V_TSB_DATA(0, size, pa, pm == pmap_kernel(), - (flags & VM_PROT_WRITE), (!(pa & PMAP_NC)), + (flags & PROT_WRITE), (!(pa & PMAP_NC)), aliased, 1, (pa & PMAP_LITTLE)); - if (prot & VM_PROT_WRITE) + if (prot & PROT_WRITE) tte.data |= SUN4V_TLB_REAL_W; - if (prot & VM_PROT_EXECUTE) + if (prot & PROT_EXEC) tte.data |= SUN4V_TLB_EXEC; if (wired) tte.data |= SUN4V_TLB_TSB_LOCK; } else { tte.data = SUN4U_TSB_DATA(0, size, pa, pm == pmap_kernel(), - (flags & VM_PROT_WRITE), (!(pa & PMAP_NC)), + (flags & PROT_WRITE), (!(pa & PMAP_NC)), aliased, 1, (pa & PMAP_LITTLE)); - if (prot & VM_PROT_WRITE) + if (prot & PROT_WRITE) tte.data |= SUN4U_TLB_REAL_W; - if (prot & VM_PROT_EXECUTE) + if (prot & PROT_EXEC) tte.data |= SUN4U_TLB_EXEC; if (wired) tte.data |= SUN4U_TLB_TSB_LOCK; @@ -2318,11 +2318,11 @@ pmap_protect(pm, sva, eva, prot) KDASSERT(pm != pmap_kernel() || eva < INTSTACK || sva > EINTSTACK); KDASSERT(pm != pmap_kernel() || eva < kdata || sva > ekdata); - if ((prot & (VM_PROT_WRITE|VM_PROT_EXECUTE)) == - (VM_PROT_WRITE|VM_PROT_EXECUTE)) + if ((prot & (PROT_WRITE | PROT_EXEC)) == + (PROT_WRITE | PROT_EXEC)) return; - if (prot == VM_PROT_NONE) { + if (prot == PROT_NONE) { pmap_remove(pm, sva, eva); return; } @@ -2362,14 +2362,14 @@ pmap_protect(pm, sva, eva, prot) } /* Just do the pmap and TSB, not the pv_list */ if (CPU_ISSUN4V) { - if ((prot & VM_PROT_WRITE) == 0) + if ((prot & PROT_WRITE) == 0) data &= ~(SUN4V_TLB_W|SUN4V_TLB_REAL_W); - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & PROT_EXEC) == 0) data &= ~(SUN4V_TLB_EXEC); } else { - if ((prot & VM_PROT_WRITE) == 0) + if ((prot & PROT_WRITE) == 0) data &= ~(SUN4U_TLB_W|SUN4U_TLB_REAL_W); - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & PROT_EXEC) == 0) data &= ~(SUN4U_TLB_EXEC); } KDASSERT((data & TLB_NFO) == 0); @@ -3018,28 +3018,28 @@ pmap_page_protect(pg, prot) (unsigned long long)pa, prot); #endif - if (prot & VM_PROT_WRITE) { + if (prot & PROT_WRITE) { pv_check(); return; } - if (prot & (VM_PROT_READ|VM_PROT_EXECUTE)) { + if (prot & (PROT_READ | PROT_EXEC)) { /* copy_on_write */ set = TLB_V; if (CPU_ISSUN4V) { clear = SUN4V_TLB_REAL_W|SUN4V_TLB_W; - if (VM_PROT_EXECUTE & prot) + if (PROT_EXEC & prot) set |= SUN4V_TLB_EXEC; else clear |= SUN4V_TLB_EXEC; } else { clear = SUN4U_TLB_REAL_W|SUN4U_TLB_W; - if (VM_PROT_EXECUTE & prot) + if (PROT_EXEC & prot) set |= SUN4U_TLB_EXEC; else clear |= SUN4U_TLB_EXEC; - if (VM_PROT_EXECUTE == prot) + if (PROT_EXEC == prot) set |= SUN4U_TLB_EXEC_ONLY; } @@ -3639,8 +3639,8 @@ pmap_remove_holes(struct vm_map *map) return; (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, - UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_SHARE, - UVM_ADV_RANDOM, + UVM_MAPFLAG(PROT_NONE, PROT_NONE, UVM_INH_SHARE, + POSIX_MADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } @@ -3692,8 +3692,8 @@ pmap_testout() pmap_get_page(&pa, NULL, pmap_kernel()); pg = PHYS_TO_VM_PAGE(pa); - pmap_enter(pmap_kernel(), va, pa, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE); + pmap_enter(pmap_kernel(), va, pa, PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE); pmap_update(pmap_kernel()); /* Now clear reference and modify */ @@ -3754,11 +3754,11 @@ pmap_testout() ref, mod); /* Check pmap_protect() */ - pmap_protect(pmap_kernel(), va, va+1, VM_PROT_READ); + pmap_protect(pmap_kernel(), va, va+1, PROT_READ); pmap_update(pmap_kernel()); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg); - printf("pmap_protect(VM_PROT_READ): ref %d, mod %d\n", + printf("pmap_protect(PROT_READ): ref %d, mod %d\n", ref, mod); /* Now clear reference and modify */ @@ -3769,8 +3769,8 @@ pmap_testout() ref, mod); /* Modify page */ - pmap_enter(pmap_kernel(), va, pa, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE); + pmap_enter(pmap_kernel(), va, pa, PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE); pmap_update(pmap_kernel()); *loc = 1; @@ -3780,11 +3780,11 @@ pmap_testout() ref, mod); /* Check pmap_protect() */ - pmap_protect(pmap_kernel(), va, va+1, VM_PROT_NONE); + pmap_protect(pmap_kernel(), va, va+1, PROT_NONE); pmap_update(pmap_kernel()); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg); - printf("pmap_protect(VM_PROT_READ): ref %d, mod %d\n", + printf("pmap_protect(PROT_READ): ref %d, mod %d\n", ref, mod); /* Now clear reference and modify */ @@ -3795,8 +3795,8 @@ pmap_testout() ref, mod); /* Modify page */ - pmap_enter(pmap_kernel(), va, pa, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE); + pmap_enter(pmap_kernel(), va, pa, PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE); pmap_update(pmap_kernel()); *loc = 1; @@ -3806,7 +3806,7 @@ pmap_testout() ref, mod); /* Check pmap_pag_protect() */ - pmap_page_protect(pg, VM_PROT_READ); + pmap_page_protect(pg, PROT_READ); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg); printf("pmap_protect(): ref %d, mod %d\n", @@ -3821,8 +3821,8 @@ pmap_testout() /* Modify page */ - pmap_enter(pmap_kernel(), va, pa, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE); + pmap_enter(pmap_kernel(), va, pa, PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE); pmap_update(pmap_kernel()); *loc = 1; @@ -3832,7 +3832,7 @@ pmap_testout() ref, mod); /* Check pmap_pag_protect() */ - pmap_page_protect(pg, VM_PROT_NONE); + pmap_page_protect(pg, PROT_NONE); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg); printf("pmap_protect(): ref %d, mod %d\n", diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index 70a3411b08e..f4c9067e423 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.84 2014/05/11 00:12:44 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.85 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -794,10 +794,10 @@ data_access_fault(tf, type, pc, addr, sfva, sfsr) */ if (type == T_FDMMU_MISS || (sfsr & SFSR_FV) == 0) { /* Punt */ - access_type = VM_PROT_READ; + access_type = PROT_READ; } else { - access_type = (sfsr & SFSR_W) ? VM_PROT_READ|VM_PROT_WRITE - : VM_PROT_READ; + access_type = (sfsr & SFSR_W) ? PROT_READ | PROT_WRITE + : PROT_READ; } if (tstate & TSTATE_PRIV) { KERNEL_LOCK(); @@ -975,7 +975,7 @@ data_access_error(tf, type, afva, afsr, sfva, sfsr) } KERNEL_LOCK(); - trapsignal(p, SIGSEGV, VM_PROT_READ|VM_PROT_WRITE, SEGV_MAPERR, sv); + trapsignal(p, SIGSEGV, PROT_READ | PROT_WRITE, SEGV_MAPERR, sv); KERNEL_UNLOCK(); out: @@ -1016,7 +1016,7 @@ text_access_fault(tf, type, pc, sfsr) /* Now munch on protections... */ - access_type = VM_PROT_EXECUTE; + access_type = PROT_EXEC; if (tstate & TSTATE_PRIV) { extern int trap_trace_dis; trap_trace_dis = 1; /* Disable traptrace for printf */ @@ -1124,7 +1124,7 @@ text_access_error(tf, type, pc, sfsr, afva, afsr) va = trunc_page(pc); /* Now munch on protections... */ - access_type = VM_PROT_EXECUTE; + access_type = PROT_EXEC; if (tstate & TSTATE_PRIV) { extern int trap_trace_dis; trap_trace_dis = 1; /* Disable traptrace for printf */ diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index fde01c2ebb1..61494dd2856 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.31 2014/10/24 20:26:58 kettenis Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.32 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */ /* @@ -104,9 +104,9 @@ vmapbuf(struct buf *bp, vsize_t len) panic("vmapbuf: null page frame"); /* Now map the page into kernel space. */ pmap_enter(pmap_kernel(), kva, - pa /* | PMAP_NC */, - VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + pa /* | PMAP_NC */, + PROT_READ | PROT_WRITE, + PROT_READ | PROT_WRITE | PMAP_WIRED); uva += PAGE_SIZE; kva += PAGE_SIZE; |