summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/include/pmap.h3
-rw-r--r--sys/amd64/include/pmap.h9
-rw-r--r--sys/i386/include/pmap.h7
-rw-r--r--sys/ia64/include/pmap.h2
-rw-r--r--sys/powerpc/include/pmap.h2
-rw-r--r--sys/sparc64/include/pmap.h2
6 files changed, 11 insertions, 14 deletions
diff --git a/sys/alpha/include/pmap.h b/sys/alpha/include/pmap.h
index cc5902b..9dca988 100644
--- a/sys/alpha/include/pmap.h
+++ b/sys/alpha/include/pmap.h
@@ -126,6 +126,7 @@ extern pt_entry_t PTlev1pte; /* pte that maps lev1 page table */
*/
#define vtopte(va) (PTmap + (alpha_btop(va) \
& ((1 << 3*ALPHA_PTSHIFT)-1)))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
/*
* Routine: pmap_kextract
@@ -145,8 +146,6 @@ pmap_kextract(vm_offset_t va)
return pa;
}
-#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
-
static __inline vm_offset_t
alpha_XXX_dmamap(vm_offset_t va)
{
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index 504d9f8..c4ca99a 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -46,7 +46,7 @@
#define _MACHINE_PMAP_H_
/*
- * Page-directory and page-table entires follow this format, with a few
+ * Page-directory and page-table entries follow this format, with a few
* of the fields not present here and there, depending on a lot of things.
*/
/* ---- Intel Nomenclature ---- */
@@ -171,14 +171,12 @@ extern u_int64_t KPML4phys; /* physical address of kernel level 4 */
#ifdef _KERNEL
/*
* virtual address to page table entry and
- * to physical address. Likewise for alternate address space.
+ * to physical address.
* Note: these work recursively, thus vtopte of a pte will give
* the corresponding pde that in turn maps it.
*/
pt_entry_t *vtopte(vm_offset_t);
-vm_paddr_t pmap_kextract(vm_offset_t);
-
-#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
static __inline pt_entry_t
pte_load(pt_entry_t *ptep)
@@ -291,6 +289,7 @@ extern vm_offset_t virtual_end;
void pmap_bootstrap(vm_paddr_t *);
void pmap_kenter(vm_offset_t va, vm_paddr_t pa);
void *pmap_kenter_temporary(vm_paddr_t pa, int i);
+vm_paddr_t pmap_kextract(vm_offset_t);
void pmap_kremove(vm_offset_t);
void *pmap_mapdev(vm_paddr_t, vm_size_t);
void pmap_unmapdev(vm_offset_t, vm_size_t);
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index 0324658..5e20c5e 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -45,7 +45,7 @@
#define _MACHINE_PMAP_H_
/*
- * Page-directory and page-table entires follow this format, with a few
+ * Page-directory and page-table entries follow this format, with a few
* of the fields not present here and there, depending on a lot of things.
*/
/* ---- Intel Nomenclature ---- */
@@ -177,11 +177,12 @@ extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */
#ifdef _KERNEL
/*
* virtual address to page table entry and
- * to physical address. Likewise for alternate address space.
+ * to physical address.
* Note: these work recursively, thus vtopte of a pte will give
* the corresponding pde that in turn maps it.
*/
#define vtopte(va) (PTmap + i386_btop(va))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
/*
* Routine: pmap_kextract
@@ -203,8 +204,6 @@ pmap_kextract(vm_offset_t va)
return pa;
}
-#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
-
#ifdef PAE
static __inline pt_entry_t
diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h
index 173d714..978917d 100644
--- a/sys/ia64/include/pmap.h
+++ b/sys/ia64/include/pmap.h
@@ -58,7 +58,7 @@
#endif
#define MAXKPT (PAGE_SIZE/sizeof(vm_offset_t))
-#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
#endif /* _KERNEL */
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h
index 57c6f61..213d211 100644
--- a/sys/powerpc/include/pmap.h
+++ b/sys/powerpc/include/pmap.h
@@ -98,7 +98,7 @@ int pmap_dev_direct_mapped(vm_offset_t, vm_size_t);
boolean_t pmap_mmu_install(char *name, int prio);
-#define vtophys(va) pmap_kextract(((vm_offset_t)(va)))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
#define PHYS_AVAIL_SZ 128
extern vm_offset_t phys_avail[PHYS_AVAIL_SZ];
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h
index 049968a..67ec85a 100644
--- a/sys/sparc64/include/pmap.h
+++ b/sys/sparc64/include/pmap.h
@@ -97,7 +97,7 @@ void pmap_map_tsb(void);
void pmap_clear_write(vm_page_t m);
-#define vtophys(va) pmap_kextract(((vm_offset_t)(va)))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
extern struct pmap kernel_pmap_store;
#define kernel_pmap (&kernel_pmap_store)
OpenPOWER on IntegriCloud