summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/pmap.h
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2010-11-20 20:04:29 +0000
committercperciva <cperciva@FreeBSD.org>2010-11-20 20:04:29 +0000
commitb6354cc05660d9d9665630f7b2fbf1b8f3a63c94 (patch)
tree7a2116fa846dae677377a526b8777178a390f377 /sys/i386/include/pmap.h
parent70881bc10bbea544ba7d7d89723de0868bd07916 (diff)
downloadFreeBSD-src-b6354cc05660d9d9665630f7b2fbf1b8f3a63c94.zip
FreeBSD-src-b6354cc05660d9d9665630f7b2fbf1b8f3a63c94.tar.gz
Add VTOM(va) macro as xpmap_ptom(VTOP(va)) to convert to machine addresses.
Clean up the code by converting xpmap_ptom(VTOP(...)) to VTOM(...) and converting xpmap_ptom(VM_PAGE_TO_PHYS(...)) to VM_PAGE_TO_MACH(...). In a few places we take advantage of the fact that xpmap_ptom can commute with setting PG_* flags. This commit should have no net effect save to improve the readability of this code.
Diffstat (limited to 'sys/i386/include/pmap.h')
-rw-r--r--sys/i386/include/pmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index e62e989..7b664e5 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -221,6 +221,8 @@ extern pt_entry_t pg_nx;
#define MACH_TO_VM_PAGE(ma) PHYS_TO_VM_PAGE(xpmap_mtop((ma)))
#define VM_PAGE_TO_MACH(m) xpmap_ptom(VM_PAGE_TO_PHYS((m)))
+#define VTOM(va) xpmap_ptom(VTOP(va))
+
static __inline vm_paddr_t
pmap_kextract_ma(vm_offset_t va)
{
OpenPOWER on IntegriCloud