diff options
author | 1998-11-24 04:56:36 +0000 | |
---|---|---|
committer | 1998-11-24 04:56:36 +0000 | |
commit | 3a1444ab15916e4c4b8819ae9cc6f9150cb7ec73 (patch) | |
tree | 556749e1bcbbf4c0178663ca82cdee76cbea652c | |
parent | better error message from ulimit (diff) | |
download | wireguard-openbsd-3a1444ab15916e4c4b8819ae9cc6f9150cb7ec73.tar.xz wireguard-openbsd-3a1444ab15916e4c4b8819ae9cc6f9150cb7ec73.zip |
put kvtop() here, since it needs virtual_avail as the end
of equaly mapped area. use pmap_extracet() for the rest ...
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index be3b51735f6..91a6c33c0fb 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.4 1998/11/11 05:18:12 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.5 1998/11/24 04:56:36 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -1525,6 +1525,16 @@ pmap_is_referenced(pa) return pv != NULL; } +int +kvtop(va) + caddr_t va; +{ + if ((vm_offset_t)va < virtual_avail) + return (int)va; + else + return (int)pmap_extract(kernel_pmap, (vm_offset_t)va); +} + #ifdef DEBUG void pmap_hptdump() |