From efb44e2392047e3280218218bcb536fad2671796 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 6 May 2001 21:39:01 +0000 Subject: Add casts to vaddr_t to round_page() and trunc_page() calls since those macros no longer have an explicit cast inline. Needed because you can't do bitwise ops on a void *. --- sys/arch/hp300/hp300/pmap.c | 13 +++++++------ sys/arch/hp300/hp300/vm_machdep.c | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'sys/arch/hp300') diff --git a/sys/arch/hp300/hp300/pmap.c b/sys/arch/hp300/hp300/pmap.c index a3cea120a46..e31fc729b6c 100644 --- a/sys/arch/hp300/hp300/pmap.c +++ b/sys/arch/hp300/hp300/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.18 2001/05/05 21:26:35 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.19 2001/05/06 21:38:59 millert Exp $ */ /* $NetBSD: pmap.c,v 1.75 1999/06/15 22:18:07 thorpej Exp $ */ /*- @@ -1340,10 +1340,10 @@ pmap_enter(pmap, va, pa, prot, wired, access_type) */ if (pmap != pmap_kernel()) { #ifdef UVM - pmap_ptpage_addref(trunc_page(pte)); + pmap_ptpage_addref(trunc_page((vaddr_t)pte)); #else - (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); #endif } @@ -2245,9 +2245,10 @@ pmap_remove_mapping(pmap, va, pte, flags) } #else if (pmap != pmap_kernel()) { - vaddr_t ptpva = trunc_page(pte); + vaddr_t ptpva = trunc_page((vaddr_t)pte); - (void) vm_map_pageable(pt_map, ptpva, round_page(pte+1), TRUE); + (void) vm_map_pageable(pt_map, ptpva, + round_page((vaddr_t)pte + 1), TRUE); #ifdef DEBUG if (pmapdebug & PDB_WIRING) pmap_check_wiring("remove", ptpva); diff --git a/sys/arch/hp300/hp300/vm_machdep.c b/sys/arch/hp300/hp300/vm_machdep.c index f958800176f..6d72e5ceac9 100644 --- a/sys/arch/hp300/hp300/vm_machdep.c +++ b/sys/arch/hp300/hp300/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.19 2001/05/06 00:45:48 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.20 2001/05/06 21:39:00 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.47 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -328,7 +328,7 @@ vmapbuf(bp, len) if ((bp->b_flags & B_PHYS) == 0) panic("vmapbuf"); - uva = trunc_page(bp->b_saveaddr = bp->b_data); + uva = trunc_page((vaddr_t)(bp->b_saveaddr = bp->b_data)); off = (vaddr_t)bp->b_data - uva; len = round_page(off + len); #if defined(UVM) @@ -365,7 +365,7 @@ vunmapbuf(bp, len) if ((bp->b_flags & B_PHYS) == 0) panic("vunmapbuf"); - kva = trunc_page(bp->b_data); + kva = trunc_page((vaddr_t)bp->b_data); off = (vaddr_t)bp->b_data - kva; len = round_page(off + len); -- cgit v1.2.3