summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-10 07:59:07 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-10 07:59:07 +0000
commit4fc0744584b136b73eee0c8778f998813a5bab13 (patch)
tree1b4e1a8d86cb187f0ab77fc76e0c80df80f95b43 /sys/arch
parent39c048cf21de365deb06f965b0af2dcc52f41fd4 (diff)
Some locking protocol fixes and better enforcement of wiring limits.
From NetBSD.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/dev/grf.c5
-rw-r--r--sys/arch/i386/i386/gdt.c8
-rw-r--r--sys/arch/mac68k/dev/grf.c5
3 files changed, 10 insertions, 8 deletions
diff --git a/sys/arch/hp300/dev/grf.c b/sys/arch/hp300/dev/grf.c
index 1d0445c18c7..e79d3edd46a 100644
--- a/sys/arch/hp300/dev/grf.c
+++ b/sys/arch/hp300/dev/grf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf.c,v 1.9 2001/05/04 22:48:58 aaron Exp $ */
+/* $OpenBSD: grf.c,v 1.10 2001/05/10 07:59:05 art Exp $ */
/* $NetBSD: grf.c,v 1.30 1998/08/20 08:33:41 kleink Exp $ */
/*
@@ -644,7 +644,8 @@ grfmap(dev, addrp, p)
#if defined(UVM)
error = uvm_mmap(&p->p_vmspace->vm_map, (vaddr_t *)addrp,
(vsize_t)len, VM_PROT_ALL, VM_PROT_ALL,
- flags, (caddr_t)&vn, 0);
+ flags, (caddr_t)&vn, 0,
+ p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur);
#else
error = vm_mmap(&p->p_vmspace->vm_map, (vaddr_t *)addrp,
(vsize_t)len, VM_PROT_ALL, VM_PROT_ALL,
diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c
index b5458b4e757..26b5b12cc2f 100644
--- a/sys/arch/i386/i386/gdt.c
+++ b/sys/arch/i386/i386/gdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt.c,v 1.14 2001/05/05 23:25:35 art Exp $ */
+/* $OpenBSD: gdt.c,v 1.15 2001/05/10 07:59:05 art Exp $ */
/* $NetBSD: gdt.c,v 1.8 1996/05/03 19:42:06 christos Exp $ */
/*-
@@ -168,7 +168,7 @@ gdt_init()
dynamic_gdt = (union descriptor *)uvm_km_valloc(kernel_map, max_len);
uvm_map_pageable(kernel_map, (vaddr_t)dynamic_gdt,
- (vaddr_t)dynamic_gdt + min_len, FALSE);
+ (vaddr_t)dynamic_gdt + min_len, FALSE, FALSE);
bcopy(gdt, dynamic_gdt, NGDT * sizeof(union descriptor));
setregion(&region, dynamic_gdt, max_len - 1);
@@ -185,7 +185,7 @@ gdt_grow()
new_len = old_len << 1;
uvm_map_pageable(kernel_map, (vaddr_t)dynamic_gdt + old_len,
- (vaddr_t)dynamic_gdt + new_len, FALSE);
+ (vaddr_t)dynamic_gdt + new_len, FALSE, FALSE);
}
void
@@ -197,7 +197,7 @@ gdt_shrink()
gdt_size >>= 1;
new_len = old_len >> 1;
uvm_map_pageable(kernel_map, (vaddr_t)dynamic_gdt + new_len,
- (vaddr_t)dynamic_gdt + old_len, TRUE);
+ (vaddr_t)dynamic_gdt + old_len, TRUE, FALSE);
}
/*
diff --git a/sys/arch/mac68k/dev/grf.c b/sys/arch/mac68k/dev/grf.c
index cfc63247957..71e990f23a0 100644
--- a/sys/arch/mac68k/dev/grf.c
+++ b/sys/arch/mac68k/dev/grf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf.c,v 1.10 2001/05/08 17:30:39 aaron Exp $ */
+/* $OpenBSD: grf.c,v 1.11 2001/05/10 07:59:05 art Exp $ */
/* $NetBSD: grf.c,v 1.41 1997/02/24 06:20:04 scottr Exp $ */
/*
@@ -376,7 +376,8 @@ grfmap(dev, addrp, p)
#if defined(UVM)
error = uvm_mmap(&p->p_vmspace->vm_map, (vm_offset_t *)addrp,
- (vm_size_t)len, VM_PROT_ALL, VM_PROT_ALL, flags, (caddr_t)&vn, 0);
+ (vm_size_t)len, VM_PROT_ALL, VM_PROT_ALL, flags, (caddr_t)&vn, 0
+ p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur);
#else
error = vm_mmap(&p->p_vmspace->vm_map, (vm_offset_t *) addrp,
(vm_size_t) len, VM_PROT_ALL, VM_PROT_ALL, flags, (caddr_t) &vn, 0);