summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-03-24 23:12:48 +0000
committerdg <dg@FreeBSD.org>1994-03-24 23:12:48 +0000
commitd777903222b11321f93bfb1f2767ba08437e3946 (patch)
treec53c28fcb5dfd361b564e4bc356d24fcfd42e934 /sys/amd64/include
parentf4bbdc7da6e18ffed99f492f7865dcaf729ff629 (diff)
downloadFreeBSD-src-d777903222b11321f93bfb1f2767ba08437e3946.zip
FreeBSD-src-d777903222b11321f93bfb1f2767ba08437e3946.tar.gz
From John Dyson: performance improvements to the new bounce buffer
code.
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/pmap.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index ee2823a..d015bc1 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -42,7 +42,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $Id: pmap.h,v 1.10 1994/01/31 04:19:00 davidg Exp $
+ * $Id: pmap.h,v 1.11 1994/03/07 11:38:48 davidg Exp $
*/
#ifndef _PMAP_MACHINE_
@@ -181,6 +181,21 @@ extern int IdlePTD; /* physical address of "Idle" state directory */
#define avtophys(va) (((int) (*avtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
/*
+ * Routine: pmap_kextract
+ * Function:
+ * Extract the physical page address associated
+ * kernel virtual address.
+ */
+static inline vm_offset_t
+pmap_kextract(va)
+ vm_offset_t va;
+{
+ vm_offset_t pa = *(int *)vtopte(va);
+ pa = (pa & PG_FRAME) | (va & ~PG_FRAME);
+ return pa;
+}
+
+/*
* macros to generate page directory/table indicies
*/
OpenPOWER on IntegriCloud