summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amiga/amiga/pmap.c12
-rw-r--r--sys/arch/amiga/dev/sfas.c4
-rw-r--r--sys/arch/hp300/hp300/pmap.c17
-rw-r--r--sys/arch/hp300/hp300/trap.c4
-rw-r--r--sys/arch/hppa/hppa/pmap.c4
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c4
-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
-rw-r--r--sys/arch/m68k/m68k/mappedcopy.c6
-rw-r--r--sys/arch/mac68k/mac68k/pmap.c20
-rw-r--r--sys/arch/mac68k/mac68k/trap.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/pmap.c20
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/vm_machdep.c8
-rw-r--r--sys/arch/pmax/pmax/vm_machdep.c4
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c6
-rw-r--r--sys/arch/powerpc/powerpc/vm_machdep.c6
-rw-r--r--sys/arch/sparc/sparc/machdep.c4
-rw-r--r--sys/arch/vax/vax/pmap.c4
-rw-r--r--sys/arch/vax/vax/trap.c4
-rw-r--r--sys/arch/vax/vax/uvax.c4
-rw-r--r--sys/arch/vax/vax/vm_machdep.c4
23 files changed, 82 insertions, 81 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++)
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);
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index 43eb0797175..110489e8fdb 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.42 2001/04/29 20:58:55 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.43 2001/05/05 21:26:36 art Exp $ */
/*
* Copyright (c) 1998-2001 Michael Shalayeff
@@ -409,7 +409,7 @@ pmap_free_pv(struct pv_entry *pv)
printf("pmap_free_pv(%p)\n", pv);
#endif
- pvp = (struct pv_page *) trunc_page(pv);
+ pvp = (struct pv_page *) trunc_page((vaddr_t)pv);
switch (++pvp->pvp_nfree) {
case 1:
TAILQ_INSERT_TAIL(&pv_page_freelist, pvp, pvp_list);
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index 2868d70b005..88af2a7e48a 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.19 2001/03/29 00:17:00 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.20 2001/05/05 21:26:36 art Exp $ */
/*
* Copyright (c) 1999-2000 Michael Shalayeff
@@ -373,7 +373,7 @@ vunmapbuf(bp, len)
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");
#endif
- addr = trunc_page(bp->b_data);
+ addr = trunc_page((vaddr_t)bp->b_data);
off = (vaddr_t)bp->b_data - addr;
len = round_page(off + len);
uvm_km_free_wakeup(phys_map, addr, len);
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)
diff --git a/sys/arch/m68k/m68k/mappedcopy.c b/sys/arch/m68k/m68k/mappedcopy.c
index 420170fff2d..0dfa6e56056 100644
--- a/sys/arch/m68k/m68k/mappedcopy.c
+++ b/sys/arch/m68k/m68k/mappedcopy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mappedcopy.c,v 1.2 1999/09/03 18:01:04 art Exp $ */
+/* $OpenBSD: mappedcopy.c,v 1.3 2001/05/05 21:26:37 art Exp $ */
/* $NetBSD: mappedcopy.c,v 1.1 1997/02/02 06:54:10 thorpej Exp $ */
/*
@@ -107,7 +107,7 @@ mappedcopyin(fromp, top, count)
/*
* Map in the page and bcopy data in from it
*/
- upa = pmap_extract(upmap, trunc_page(fromp));
+ upa = pmap_extract(upmap, trunc_page((vaddr_t)fromp));
if (upa == 0)
panic("mappedcopyin: null page frame");
len = min(count, (PAGE_SIZE - off));
@@ -158,7 +158,7 @@ mappedcopyout(fromp, top, count)
/*
* Map in the page and bcopy data out to it
*/
- upa = pmap_extract(upmap, trunc_page(top));
+ upa = pmap_extract(upmap, trunc_page((vaddr_t)top));
if (upa == 0)
panic("mappedcopyout: null page frame");
len = min(count, (PAGE_SIZE - off));
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);
diff --git a/sys/arch/mvme68k/mvme68k/pmap.c b/sys/arch/mvme68k/mvme68k/pmap.c
index 50141bc6b00..9160d60394c 100644
--- a/sys/arch/mvme68k/mvme68k/pmap.c
+++ b/sys/arch/mvme68k/mvme68k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.17 2001/04/05 20:39:40 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.18 2001/05/05 21:26:38 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -677,7 +677,7 @@ pmap_free_pv(pv)
register struct pv_page *pvp;
register int i;
- 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);
@@ -724,7 +724,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) {
@@ -1286,8 +1286,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
@@ -1408,7 +1408,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
}
@@ -2024,11 +2024,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", trunc_page((vaddr_t)pte));
#endif
}
/*
@@ -2117,7 +2117,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
printf("remove: stab %x, 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/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index 7897c940a36..9363eb9353d 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.28 2001/05/05 20:56:45 art Exp $ */
+/* $OpenBSD: trap.c,v 1.29 2001/05/05 21:26:39 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -724,7 +724,7 @@ int docachepush;
*/
if (docachepush) {
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
- trunc_page(f->f_fa), VM_PROT_WRITE, TRUE, VM_PROT_WRITE);
+ 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);
DCFL(pmap_extract(pmap_kernel(), (vm_offset_t)fa));
diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c
index e89a67773d9..c4271f736cd 100644
--- a/sys/arch/mvme88k/mvme88k/vm_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.22 2001/05/05 20:56:47 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.23 2001/05/05 21:26:39 art Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -251,7 +251,7 @@ vmapbuf(bp, len)
panic("vmapbuf");
#endif
- addr = (caddr_t)trunc_page(bp->b_saveaddr = bp->b_data);
+ addr = (caddr_t)trunc_page((vaddr_t)(bp->b_saveaddr = bp->b_data));
off = (vm_offset_t)bp->b_saveaddr & PGOFSET;
len = round_page(off + len);
pmap = vm_map_pmap(&bp->b_proc->p_vmspace->vm_map);
@@ -306,7 +306,7 @@ vunmapbuf(bp, len)
panic("vunmapbuf");
#endif
- addr = trunc_page(bp->b_data);
+ addr = trunc_page((vaddr_t)bp->b_data);
off = (vm_offset_t)bp->b_data & PGOFSET;
len = round_page(off + len);
#if defined(UVM)
@@ -434,7 +434,7 @@ mapiospace(caddr_t pa, int len)
int off = (u_long)pa & PGOFSET;
extern vm_offset_t phys_map_vaddr1;
- pa = (caddr_t)trunc_page(pa);
+ pa = (caddr_t)trunc_page((paddr_t)pa);
pmap_enter(kernel_pmap, phys_map_vaddr1, (vm_offset_t)pa,
VM_PROT_READ|VM_PROT_WRITE, 1, 0);
diff --git a/sys/arch/pmax/pmax/vm_machdep.c b/sys/arch/pmax/pmax/vm_machdep.c
index dfc7b97508e..f270b0a004f 100644
--- a/sys/arch/pmax/pmax/vm_machdep.c
+++ b/sys/arch/pmax/pmax/vm_machdep.c
@@ -304,7 +304,7 @@ vmapbuf(bp, len)
if ((bp->b_flags & B_PHYS) == 0)
panic("vmapbuf");
p = bp->b_proc;
- 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);
taddr = kmem_alloc_wait(phys_map, len);
@@ -335,7 +335,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);
kmem_free_wakeup(phys_map, addr, len);
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c
index c2cf84bc7c3..b5cb6103a66 100644
--- a/sys/arch/powerpc/powerpc/pmap.c
+++ b/sys/arch/powerpc/powerpc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.27 2001/04/18 06:26:12 drahn Exp $ */
+/* $OpenBSD: pmap.c,v 1.28 2001/05/05 21:26:40 art Exp $ */
/* $NetBSD: pmap.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */
/*
@@ -1069,7 +1069,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:
LIST_INSERT_HEAD(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
@@ -1143,7 +1143,7 @@ pofree(po, freepage)
{
struct po_page *pop;
- pop = (struct po_page *)trunc_page(po);
+ pop = (struct po_page *)trunc_page((vaddr_t)po);
switch (++pop->pop_pgi.pgi_nfree) {
case NPOPPG:
if (!freepage)
diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c
index 6fb4ed7058f..1e2d82d5d2e 100644
--- a/sys/arch/powerpc/powerpc/vm_machdep.c
+++ b/sys/arch/powerpc/powerpc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.14 2001/04/03 20:27:26 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.15 2001/05/05 21:26:40 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */
/*
@@ -237,7 +237,7 @@ vmapbuf(bp, len)
if (!(bp->b_flags & B_PHYS))
panic("vmapbuf");
#endif
- 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);
#ifdef UVM
@@ -269,7 +269,7 @@ vunmapbuf(bp, len)
if (!(bp->b_flags & B_PHYS))
panic("vunmapbuf");
#endif
- 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);
#ifdef UVM
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 6b68142e839..5328206389a 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.54 2001/05/05 20:56:52 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.55 2001/05/05 21:26:41 art Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -1067,7 +1067,7 @@ mapdev(phys, virt, offset, size)
ret = (void *)(v | (((u_long)phys->rr_paddr + offset) & PGOFSET));
/* note: preserve page offset */
- pa = trunc_page(phys->rr_paddr + offset);
+ pa = trunc_page((vaddr_t)phys->rr_paddr + offset);
pmtype = PMAP_IOENC(phys->rr_iospace);
do {
diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c
index 43f4f758abd..80eb65aa8af 100644
--- a/sys/arch/vax/vax/pmap.c
+++ b/sys/arch/vax/vax/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.13 2001/04/10 06:59:13 niklas Exp $ */
+/* $OpenBSD: pmap.c,v 1.14 2001/05/05 21:26:41 art Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
@@ -717,7 +717,7 @@ if (startpmapdebug)
panic("pmap_enter: bad index %d", index);
#endif
if (pmap->pm_refcnt[index] == 0) {
- vaddr_t ptaddr = trunc_page(&patch[i]);
+ vaddr_t ptaddr = trunc_page((vaddr_t)&patch[i]);
paddr_t phys;
struct vm_page *pg;
#ifdef DEBUG
diff --git a/sys/arch/vax/vax/trap.c b/sys/arch/vax/vax/trap.c
index db589030997..a6be28ca91e 100644
--- a/sys/arch/vax/vax/trap.c
+++ b/sys/arch/vax/vax/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.13 2000/11/10 18:15:43 art Exp $ */
+/* $OpenBSD: trap.c,v 1.14 2001/05/05 21:26:41 art Exp $ */
/* $NetBSD: trap.c,v 1.47 1999/08/21 19:26:20 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -180,7 +180,7 @@ if(faultdebug)printf("trap accflt type %lx, code %lx, pc %lx, psl %lx\n",
* because we must check for PTE pages anyway we don't
* bother doing it here.
*/
- addr = trunc_page(frame->code);
+ addr = trunc_page((vaddr_t)frame->code);
if ((umode == 0) && (frame->code < 0))
map = kernel_map;
else
diff --git a/sys/arch/vax/vax/uvax.c b/sys/arch/vax/vax/uvax.c
index 592daa5c584..6aaaeba9501 100644
--- a/sys/arch/vax/vax/uvax.c
+++ b/sys/arch/vax/vax/uvax.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvax.c,v 1.4 1999/01/11 05:12:08 millert Exp $ */
+/* $OpenBSD: uvax.c,v 1.5 2001/05/05 21:26:42 art Exp $ */
/* $NetBSD: uvax.c,v 1.4 1997/02/19 10:04:27 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -93,7 +93,7 @@ uvax_phys2virt(phys)
for (p = dep_call->cpu_map; p->um_base != 0; p++) {
if (p->um_base > phys || p->um_end < phys)
continue;
- virt = p->um_virt + (phys - trunc_page(p->um_base));
+ virt = p->um_virt + (phys - trunc_page((vaddr_t)p->um_base));
break;
}
diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c
index e93dd48fec0..cc0fa99ecb8 100644
--- a/sys/arch/vax/vax/vm_machdep.c
+++ b/sys/arch/vax/vax/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.19 2001/02/11 06:34:37 hugh Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.20 2001/05/05 21:26:42 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.67 2000/06/29 07:14:34 mrg Exp $ */
/*
@@ -341,7 +341,7 @@ vmapbuf(bp, len)
if ((bp->b_flags & B_PHYS) == 0)
panic("vmapbuf");
p = bp->b_proc;
- faddr = trunc_page((vaddr_t)bp->b_saveaddr = bp->b_data);
+ faddr = trunc_page((vaddr_t)(bp->b_saveaddr = bp->b_data));
off = (vaddr_t)bp->b_data - faddr;
len = round_page(off + len);
taddr = uvm_km_valloc_wait(phys_map, len);