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/mac68k | |
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/mac68k')
-rw-r--r-- | sys/arch/mac68k/mac68k/pmap.c | 20 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/trap.c | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/arch/mac68k/mac68k/pmap.c b/sys/arch/mac68k/mac68k/pmap.c index b28c0676acc..275ef201b7c 100644 --- a/sys/arch/mac68k/mac68k/pmap.c +++ b/sys/arch/mac68k/mac68k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.16 1999/09/03 18:01:14 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.17 2001/05/05 21:26:38 art Exp $ */ /* $NetBSD: pmap.c,v 1.28 1996/10/21 05:42:27 scottr Exp $ */ /* @@ -539,7 +539,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); @@ -588,7 +588,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) { @@ -1172,8 +1172,8 @@ pmap_enter(pmap, va, pa, prot, wired, access_type) * is a valid mapping in the page. */ if (pmap != pmap_kernel()) - (void) vm_map_pageable(pt_map, trunc_page(pte), - round_page(pte+1), FALSE); + (void) vm_map_pageable(pt_map, trunc_page((vaddr_t)pte), + round_page((vaddr_t)(pte+1)), FALSE); /* * Enter on the PV list if part of our managed memory @@ -1294,7 +1294,7 @@ validate: TBIS(va); #ifdef DEBUG if ((pmapdebug & PDB_WIRING) && pmap != pmap_kernel()) - pmap_check_wiring("enter", trunc_page(pmap_pte(pmap, va))); + pmap_check_wiring("enter", trunc_page((vaddr_t)pmap_pte(pmap, va))); #endif } @@ -1722,11 +1722,11 @@ pmap_remove_mapping(pmap, va, pte, flags) * PT page. */ if (pmap != pmap_kernel()) { - (void) vm_map_pageable(pt_map, trunc_page(pte), - round_page(pte+1), TRUE); + (void) vm_map_pageable(pt_map, trunc_page((vaddr_t)pte), + round_page((vaddr_t)(pte+1)), TRUE); #ifdef DEBUG if (pmapdebug & PDB_WIRING) - pmap_check_wiring("remove", trunc_page(pte)); + pmap_check_wiring("remove", (vaddr_t)trunc_page(pte)); #endif } /* @@ -1815,7 +1815,7 @@ pmap_remove_mapping(pmap, va, pte, flags) printf("remove: stab %p, refcnt %d\n", 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/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c index 31ac320e38b..b628b9be853 100644 --- a/sys/arch/mac68k/mac68k/trap.c +++ b/sys/arch/mac68k/mac68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.19 2001/05/05 20:56:42 art Exp $ */ +/* $OpenBSD: trap.c,v 1.20 2001/05/05 21:26:38 art Exp $ */ /* $NetBSD: trap.c,v 1.46 1997/04/07 22:54:44 scottr Exp $ */ /* @@ -710,7 +710,7 @@ writeback(fp, docachepush) */ if (docachepush) { pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, - trunc_page(f->f_fa), VM_PROT_WRITE, TRUE, + trunc_page((vaddr_t)f->f_fa), VM_PROT_WRITE, TRUE, VM_PROT_WRITE); fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF]; bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16); |