summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskra <skra@FreeBSD.org>2016-02-02 10:17:51 +0000
committerskra <skra@FreeBSD.org>2016-02-02 10:17:51 +0000
commit8c057ed9b1f5a02e407eb5641f65c5ff2cc977e6 (patch)
treea6fb7fa527d4fa3b60eba3ce4bcb2c911999b9f4
parent86ce64705e75081226b33569e8335f94947a0514 (diff)
downloadFreeBSD-src-8c057ed9b1f5a02e407eb5641f65c5ff2cc977e6.zip
FreeBSD-src-8c057ed9b1f5a02e407eb5641f65c5ff2cc977e6.tar.gz
Fix setting of protection bits for page table entries in pmap_map(). This
function is only called from vm_page_startup() and vm_reserv_startup(). I.e. during vm subsystem initialization. As VM_PROT_WRITE is always used in these calls, the typo did not have any effect. Likely, it's the reason why it wasn't discovered so long.
-rw-r--r--sys/arm/arm/pmap-v6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c
index 4f774c4..23167d6 100644
--- a/sys/arm/arm/pmap-v6.c
+++ b/sys/arm/arm/pmap-v6.c
@@ -1325,7 +1325,7 @@ pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot)
PDEBUG(1, printf("%s: virt = %#x, start = %#x, end = %#x (size = %#x),"
" prot = %d\n", __func__, *virt, start, end, end - start, prot));
- l2prot = (prot & VM_PROT_WRITE) ? PTE2_AP_KRW : PTE1_AP_KR;
+ l2prot = (prot & VM_PROT_WRITE) ? PTE2_AP_KRW : PTE2_AP_KR;
l2prot |= (prot & VM_PROT_EXECUTE) ? PTE2_X : PTE2_NX;
l1prot = ATTR_TO_L1(l2prot);
OpenPOWER on IntegriCloud