diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-05 21:26:48 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-05 21:26:48 +0000 |
commit | ca8a4ccfe938b07fa473a582784074e5f93813cd (patch) | |
tree | e9075d1e6c63ae7e0fd9c950fcdebcfb637b3405 /sys/arch/amiga | |
parent | 368552036fe6029364e1abc2351955db681286fc (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/amiga')
-rw-r--r-- | sys/arch/amiga/amiga/pmap.c | 12 | ||||
-rw-r--r-- | sys/arch/amiga/dev/sfas.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/amiga/amiga/pmap.c b/sys/arch/amiga/amiga/pmap.c index 831ce5e1ea7..afb0675235b 100644 --- a/sys/arch/amiga/amiga/pmap.c +++ b/sys/arch/amiga/amiga/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.27 2001/04/20 11:01:55 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.28 2001/05/05 21:26:34 art Exp $ */ /* $NetBSD: pmap.c,v 1.68 1999/06/19 19:44:09 is Exp $ */ /*- @@ -814,7 +814,7 @@ pmap_free_pv(pv) { 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); @@ -1326,7 +1326,7 @@ pmap_enter(pmap, va, pa, prot, wired, access_type) * is a valid mapping in the page. */ if (pmap != pmap_kernel()) - pmap_ptpage_addref(trunc_page(pte)); + pmap_ptpage_addref(trunc_page((vaddr_t)pte)); /* * Enter on the PV list if part of our managed memory @@ -1486,7 +1486,7 @@ validate: #ifdef DEBUG if ((pmapdebug & PDB_WIRING) && pmap != pmap_kernel()) { va -= PAGE_SIZE; - pmap_check_wiring("enter", trunc_page(pmap_pte(pmap, va))); + pmap_check_wiring("enter", trunc_page((vaddr_t)pmap_pte(pmap, va))); } #endif } @@ -2025,7 +2025,7 @@ pmap_remove_mapping(pmap, va, pte, flags) * the PT page. */ if (pmap != pmap_kernel()) { - vaddr_t ptpva = trunc_page(pte); + vaddr_t ptpva = trunc_page((vaddr_t)pte); int refs = pmap_ptpage_delref(ptpva); #ifdef DEBUG if (pmapdebug & PDB_WIRING) @@ -2165,7 +2165,7 @@ pmap_remove_mapping(pmap, va, pte, flags) ptpmap->pm_stab, ptpmap->pm_sref - 1); if ((pmapdebug & PDB_PARANOIA) && - ptpmap->pm_stab != (st_entry_t *)trunc_page(ste)) + ptpmap->pm_stab != (st_entry_t *)trunc_page((vaddr_t)ste)) panic("remove: bogus ste"); #endif if (--(ptpmap->pm_sref) == 0) { diff --git a/sys/arch/amiga/dev/sfas.c b/sys/arch/amiga/dev/sfas.c index 29dbf130231..425fd06e570 100644 --- a/sys/arch/amiga/dev/sfas.c +++ b/sys/arch/amiga/dev/sfas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sfas.c,v 1.8 2001/01/25 03:50:46 todd Exp $ */ +/* $OpenBSD: sfas.c,v 1.9 2001/05/05 21:26:35 art Exp $ */ /* $NetBSD: sfas.c,v 1.12 1996/10/13 03:07:33 christos Exp $ */ /* @@ -388,7 +388,7 @@ sfas_scsicmd(struct scsi_xfer *xs) sva = (vm_offset_t)xs->data & PG_FRAME; pendp->vm_link_data.offset = (vm_offset_t)xs->data & PGOFSET; - pendp->vm_link_data.pages = round_page(xs->data+xs->datalen- + pendp->vm_link_data.pages = round_page((vaddr_t)xs->data+xs->datalen- sva)/NBPG; for(n=0; n<pendp->vm_link_data.pages; n++) |