summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-05 21:26:48 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-05 21:26:48 +0000
commitca8a4ccfe938b07fa473a582784074e5f93813cd (patch)
treee9075d1e6c63ae7e0fd9c950fcdebcfb637b3405 /sys/arch/i386
parent368552036fe6029364e1abc2351955db681286fc (diff)
Remove the (vaddr_t) casts inside the round_page and trunc_page macros.
We might want to use them on types that are bigger than vaddr_t. Fix all callers that pass pointers without casts.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/pmap.old.c10
-rw-r--r--sys/arch/i386/i386/trap.c4
-rw-r--r--sys/arch/i386/i386/vm_machdep.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/i386/i386/pmap.old.c b/sys/arch/i386/i386/pmap.old.c
index c3fb2af5575..48ce1fc730b 100644
--- a/sys/arch/i386/i386/pmap.old.c
+++ b/sys/arch/i386/i386/pmap.old.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.old.c,v 1.37 2001/03/22 20:44:59 niklas Exp $ */
+/* $OpenBSD: pmap.old.c,v 1.38 2001/05/05 21:26:36 art Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -413,7 +413,7 @@ pmap_free_pv(pv)
{
register struct pv_page *pvp;
- pvp = (struct pv_page *) trunc_page(pv);
+ pvp = (struct pv_page *) trunc_page((vaddr_t)pv);
switch (++pvp->pvp_pgi.pgi_nfree) {
case 1:
TAILQ_INSERT_TAIL(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
@@ -470,7 +470,7 @@ pmap_collect_pv()
continue;
s = splimp();
for (ppv = ph; (pv = ppv->pv_next) != 0; ) {
- pvp = (struct pv_page *) trunc_page(pv);
+ pvp = (struct pv_page *) trunc_page((vaddr_t)pv);
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
@@ -1176,7 +1176,7 @@ pmap_enter(pmap, va, pa, prot, wired, access_type)
/* our guess about the vm_map was good! fault it in. */
vmap = &curproc->p_vmspace->vm_map;
- v = trunc_page(vtopte(va));
+ v = trunc_page((vaddr_t)vtopte(va));
#ifdef DEBUG
printf("faulting in a pt page map %x va %x\n", vmap, v);
#endif
@@ -1815,7 +1815,7 @@ pmap_prefault(map, v, l)
for (pv = v; pv < v + l ; pv += ~PD_MASK + 1) {
if (!pmap_pde_v(pmap_pde(map->pmap, pv))) {
- pv2 = trunc_page(vtopte(pv));
+ pv2 = trunc_page((vaddr_t)vtopte(pv));
#if defined(UVM)
uvm_fault(map, pv2, 0, VM_PROT_READ);
#else
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index 91a50eb16c4..d0d12d0759e 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.38 2001/05/05 20:56:38 art Exp $ */
+/* $OpenBSD: trap.c,v 1.39 2001/05/05 21:26:37 art Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
@@ -493,7 +493,7 @@ trap(frame)
#ifndef PMAP_NEW
/* check if page table is mapped, if not, fault it first */
if ((PTD[pdei(va)] & PG_V) == 0) {
- v = trunc_page(vtopte(va));
+ v = trunc_page((vaddr_t)vtopte(va));
#if defined(UVM)
rv = uvm_fault(map, v, 0, ftype);
#else
diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c
index ee5c433ad33..bcbda38c1f3 100644
--- a/sys/arch/i386/i386/vm_machdep.c
+++ b/sys/arch/i386/i386/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.23 2001/03/23 18:41:01 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.24 2001/05/05 21:26:37 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.61 1996/05/03 19:42:35 christos Exp $ */
/*-
@@ -427,7 +427,7 @@ vmapbuf(bp, len)
if ((bp->b_flags & B_PHYS) == 0)
panic("vmapbuf");
- faddr = trunc_page(bp->b_saveaddr = bp->b_data);
+ faddr = trunc_page((vaddr_t)(bp->b_saveaddr = bp->b_data));
off = (vm_offset_t)bp->b_data - faddr;
len = round_page(off + len);
#if defined(UVM)
@@ -487,7 +487,7 @@ vunmapbuf(bp, len)
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");
- addr = trunc_page(bp->b_data);
+ addr = trunc_page((vaddr_t)bp->b_data);
off = (vm_offset_t)bp->b_data - addr;
len = round_page(off + len);
#if defined(UVM)