summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
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/hp300
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/hp300')
-rw-r--r--sys/arch/hp300/hp300/pmap.c17
-rw-r--r--sys/arch/hp300/hp300/trap.c4
2 files changed, 11 insertions, 10 deletions
diff --git a/sys/arch/hp300/hp300/pmap.c b/sys/arch/hp300/hp300/pmap.c
index 2d2ad43cfff..a3cea120a46 100644
--- a/sys/arch/hp300/hp300/pmap.c
+++ b/sys/arch/hp300/hp300/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.17 2001/05/05 02:41:24 millert Exp $ */
+/* $OpenBSD: pmap.c,v 1.18 2001/05/05 21:26:35 art Exp $ */
/* $NetBSD: pmap.c,v 1.75 1999/06/15 22:18:07 thorpej Exp $ */
/*-
@@ -675,7 +675,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);
@@ -732,7 +732,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) {
@@ -1338,13 +1338,14 @@ pmap_enter(pmap, va, pa, prot, wired, access_type)
* on this PT page. PT pages are wired down as long as there
* is a valid mapping in the page.
*/
- if (pmap != pmap_kernel())
+ if (pmap != pmap_kernel()) {
#ifdef UVM
pmap_ptpage_addref(trunc_page(pte));
#else
(void) vm_map_pageable(pt_map, trunc_page(pte),
- round_page(pte+1), FALSE);
+ round_page(pte+1), FALSE);
#endif
+ }
/*
* Enter on the PV list if part of our managed memory
@@ -1534,7 +1535,7 @@ validate:
#endif
#ifdef DEBUG
if ((pmapdebug & PDB_WIRING) && pmap != pmap_kernel())
- pmap_check_wiring("enter", trunc_page(pte));
+ pmap_check_wiring("enter", trunc_page((vaddr_t)pte));
#endif
}
@@ -2199,7 +2200,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
*/
#ifdef UVM
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)
@@ -2345,7 +2346,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
ptpmap->pm_stab, ptpmap->pm_sref - 1));
#ifdef DEBUG
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/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c
index 0f27f56d589..f7f5a9254dd 100644
--- a/sys/arch/hp300/hp300/trap.c
+++ b/sys/arch/hp300/hp300/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.19 2001/05/05 20:56:34 art Exp $ */
+/* $OpenBSD: trap.c,v 1.20 2001/05/05 21:26:35 art Exp $ */
/* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */
/*
@@ -829,7 +829,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);