From 729868c9df13ea5c2a910ba353ba2e9f97e55a29 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Tue, 24 Nov 1998 04:56:37 +0000 Subject: put kvtop() here, since it needs virtual_avail as the end of equaly mapped area. use pmap_extracet() for the rest ... --- sys/arch/hppa/hppa/pmap.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys') 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() -- cgit v1.2.3