diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 04:54:01 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 04:54:01 +0000 |
commit | e15989470c31efa3a857718e7462663964497155 (patch) | |
tree | 8c3443152717af59e2f6dc5556fe89727676ab35 /sys/kern/kern_lkm.c | |
parent | 52b4d7fbde220c6651b33720adb78ce6728e00b1 (diff) |
kmem allocation changes for uvm
Diffstat (limited to 'sys/kern/kern_lkm.c')
-rw-r--r-- | sys/kern/kern_lkm.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index acab4f431f4..4e2044ed753 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lkm.c,v 1.24 1999/02/19 17:17:49 art Exp $ */ +/* $OpenBSD: kern_lkm.c,v 1.25 1999/02/26 04:54:00 art Exp $ */ /* $NetBSD: kern_lkm.c,v 1.31 1996/03/31 21:40:27 christos Exp $ */ /* @@ -250,7 +250,11 @@ lkmunreserve() * Actually unreserve the memory */ if (curp && curp->area) { +#if defined(UVM) + uvm_km_free(kmem_map, curp->area, curp->size); +#else kmem_free(kmem_map, curp->area, curp->size);/**/ +#endif curp->area = 0; } @@ -326,7 +330,11 @@ lkmioctl(dev, cmd, data, flag, p) */ curp->size = resrvp->size; +#if defined(UVM) + curp->area = uvm_km_zalloc(kmem_map, curp->size); +#else curp->area = kmem_alloc(kmem_map, curp->size);/**/ +#endif curp->offset = 0; /* load offset */ @@ -335,7 +343,13 @@ lkmioctl(dev, cmd, data, flag, p) if (cmd == LMRESERV && resrvp->sym_size) { curp->sym_size = resrvp->sym_size; curp->sym_symsize = resrvp->sym_symsize; - curp->syms = (caddr_t)kmem_alloc(kmem_map, curp->sym_size); +#if defined(UVM) + curp->syms = (caddr_t)uvm_km_zalloc(kmem_map, + curp->sym_size); +#else + curp->syms = (caddr_t)kmem_alloc(kmem_map, + curp->sym_size); +#endif curp->sym_offset = 0; resrvp->sym_addr = curp->syms; /* ret symbol addr */ } else { |