Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to make them type-generic, which is necessary i.e. to operate on file offsets without truncating them. * In due course, cast pointer arguments to these macros to an appropriate integral type (paddr_t, vaddr_t). Originally done by Chuck Silvers, updated by myself.
This commit is contained in:
parent
8abfe24915
commit
230876cf26
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.200 2000/03/23 01:04:10 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.201 2000/03/26 20:42:21 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -79,7 +79,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.200 2000/03/23 01:04:10 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.201 2000/03/26 20:42:21 kleink Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -466,13 +466,13 @@ nobootinfo:
|
||||
* bit of space before the beginning for the bootstrap
|
||||
* stack).
|
||||
*/
|
||||
kernstart = trunc_page(kernel_text) - 2 * PAGE_SIZE;
|
||||
kernstart = trunc_page((vaddr_t)kernel_text) - 2 * PAGE_SIZE;
|
||||
#ifdef DDB
|
||||
ksym_start = (void *)bootinfo.ssym;
|
||||
ksym_end = (void *)bootinfo.esym;
|
||||
kernend = (vaddr_t)round_page(ksym_end);
|
||||
kernend = (vaddr_t)round_page((vaddr_t)ksym_end);
|
||||
#else
|
||||
kernend = (vaddr_t)round_page(_end);
|
||||
kernend = (vaddr_t)round_page((vaddr_t)_end);
|
||||
#endif
|
||||
|
||||
kernstartpfn = atop(ALPHA_K0SEG_TO_PHYS(kernstart));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.127 2000/03/01 18:29:04 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.128 2000/03/26 20:42:22 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -154,7 +154,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.127 2000/03/01 18:29:04 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.128 2000/03/26 20:42:22 kleink Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -3317,7 +3317,7 @@ pmap_physpage_addref(kva)
|
||||
paddr_t pa;
|
||||
int rval;
|
||||
|
||||
pa = ALPHA_K0SEG_TO_PHYS(trunc_page(kva));
|
||||
pa = ALPHA_K0SEG_TO_PHYS(trunc_page((vaddr_t)kva));
|
||||
pvh = pa_to_pvh(pa);
|
||||
|
||||
simple_lock(&pvh->pvh_slock);
|
||||
@ -3345,7 +3345,7 @@ pmap_physpage_delref(kva)
|
||||
paddr_t pa;
|
||||
int rval;
|
||||
|
||||
pa = ALPHA_K0SEG_TO_PHYS(trunc_page(kva));
|
||||
pa = ALPHA_K0SEG_TO_PHYS(trunc_page((vaddr_t)kva));
|
||||
pvh = pa_to_pvh(pa);
|
||||
|
||||
simple_lock(&pvh->pvh_slock);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.53 2000/01/20 22:18:54 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.54 2000/03/26 20:42:23 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.53 2000/01/20 22:18:54 sommerfeld Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.54 2000/03/26 20:42:23 kleink Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -372,7 +372,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr = uvm_km_valloc_wait(phys_map, len);
|
||||
@ -401,7 +401,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 = (vaddr_t)bp->b_data - addr;
|
||||
len = round_page(off + len);
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.74 1999/11/13 00:30:26 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.75 2000/03/26 20:42:24 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -749,7 +749,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);
|
||||
@ -1236,7 +1236,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -2029,7 +2029,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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.76 2000/03/24 17:05:30 ws Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.77 2000/03/26 20:42:24 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -386,7 +386,7 @@ cpu_startup()
|
||||
* and then give everything true virtual addresses.
|
||||
*/
|
||||
size = allocsys(NULL, NULL);
|
||||
sysbase = (caddr_t)uvm_km_zalloc(kernel_map, round_page(size));
|
||||
sysbase = (caddr_t)uvm_km_zalloc(kernel_map, round_page((vaddr_t)size));
|
||||
if (sysbase == 0)
|
||||
panic(
|
||||
"cpu_startup: no room for system tables; %d bytes required",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.66 1999/11/17 08:43:53 mrg Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.67 2000/03/26 20:42:25 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -337,7 +337,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);
|
||||
@ -386,7 +386,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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.48 2000/01/20 22:18:55 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.49 2000/03/26 20:42:26 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -345,7 +345,7 @@ vmapbuf(bp, len)
|
||||
|
||||
taddr = uvm_km_valloc_wait(phys_map, len);
|
||||
|
||||
faddr = trunc_page(bp->b_data);
|
||||
faddr = trunc_page((vaddr_t)bp->b_data);
|
||||
off = (vm_offset_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
bp->b_saveaddr = bp->b_data;
|
||||
@ -402,7 +402,7 @@ vunmapbuf(bp, len)
|
||||
* Make sure the cache does not have dirty data for the
|
||||
* pages we had mapped.
|
||||
*/
|
||||
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);
|
||||
bp->b_data = bp->b_saveaddr;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.54 1999/11/13 00:30:30 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.55 2000/03/26 20:42:26 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -709,7 +709,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);
|
||||
@ -1189,7 +1189,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1335,7 +1335,8 @@ 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
|
||||
|
||||
@ -1971,7 +1972,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)
|
||||
@ -2111,7 +2112,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.82 1999/11/14 19:20:27 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.83 2000/03/26 20:42:27 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -609,7 +609,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);
|
||||
@ -662,7 +662,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) {
|
||||
@ -1243,7 +1243,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1424,7 +1424,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
|
||||
|
||||
return (KERN_SUCCESS);
|
||||
@ -2126,7 +2126,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)
|
||||
@ -2261,7 +2261,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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.86 2000/01/20 22:18:56 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.87 2000/03/26 20:42:28 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -380,7 +380,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr= uvm_km_valloc_wait(phys_map, len);
|
||||
@ -420,7 +420,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 = (vaddr_t)bp->b_data - addr;
|
||||
len = round_page(off + len);
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.4 2000/01/19 20:05:37 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.5 2000/03/26 20:42:28 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2000/01/19 20:05:37 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2000/03/26 20:42:28 kleink Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -360,7 +360,7 @@ cpu_startup()
|
||||
* XXX Should just change KERNBASE and VM_MIN_KERNEL_ADDRESS,
|
||||
* XXX but not right now.
|
||||
*/
|
||||
if (uvm_map_protect(kernel_map, 0, round_page(&kernel_text),
|
||||
if (uvm_map_protect(kernel_map, 0, round_page((vaddr_t)&kernel_text),
|
||||
UVM_PROT_NONE, TRUE) != KERN_SUCCESS)
|
||||
panic("can't mark pre-text pages off-limits");
|
||||
|
||||
@ -368,8 +368,8 @@ cpu_startup()
|
||||
* Tell the VM system that writing to kernel text isn't allowed.
|
||||
* If we don't, we might end up COW'ing the text segment!
|
||||
*/
|
||||
if (uvm_map_protect(kernel_map, trunc_page(&kernel_text),
|
||||
trunc_page(&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE)
|
||||
if (uvm_map_protect(kernel_map, trunc_page((vaddr_t)&kernel_text),
|
||||
trunc_page((vaddr_t)&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE)
|
||||
!= KERN_SUCCESS)
|
||||
panic("can't protect kernel text");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.2 2000/01/11 08:24:14 nisimura Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.3 2000/03/26 20:42:28 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -583,7 +583,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);
|
||||
@ -636,7 +636,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) {
|
||||
@ -1160,7 +1160,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1273,7 +1273,7 @@ validate:
|
||||
TBIS(va);
|
||||
#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
|
||||
|
||||
return (KERN_SUCCESS);
|
||||
@ -1877,7 +1877,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)
|
||||
@ -1995,7 +1995,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mappedcopy.c,v 1.9 1999/11/18 15:19:26 minoura Exp $ */
|
||||
/* $NetBSD: mappedcopy.c,v 1.10 2000/03/26 20:42:29 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* XXX This doesn't work yet. Soon. --thorpej@netbsd.org
|
||||
@ -113,7 +113,8 @@ mappedcopyin(f, t, count)
|
||||
/*
|
||||
* Map in the page and bcopy data in from it
|
||||
*/
|
||||
if (pmap_extract(upmap, trunc_page(fromp), &upa) == FALSE)
|
||||
if (pmap_extract(upmap, trunc_page((vaddr_t)fromp), &upa)
|
||||
== FALSE)
|
||||
panic("mappedcopyin: null page frame");
|
||||
len = min(count, (PAGE_SIZE - off));
|
||||
pmap_enter(pmap_kernel(), kva, upa,
|
||||
@ -169,7 +170,8 @@ mappedcopyout(f, t, count)
|
||||
/*
|
||||
* Map in the page and bcopy data out to it
|
||||
*/
|
||||
if (pmap_extract(upmap, trunc_page(top), &upa) == FALSE)
|
||||
if (pmap_extract(upmap, trunc_page((vaddr_t)top), &upa)
|
||||
== FALSE)
|
||||
panic("mappedcopyout: null page frame");
|
||||
len = min(count, (PAGE_SIZE - off));
|
||||
pmap_enter(pmap_kernel(), kva, upa,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.64 1999/11/13 00:30:37 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.65 2000/03/26 20:42:29 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -602,7 +602,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);
|
||||
@ -655,7 +655,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) {
|
||||
@ -1186,7 +1186,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1297,7 +1297,7 @@ validate:
|
||||
TBIS(va);
|
||||
#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
|
||||
|
||||
return (KERN_SUCCESS);
|
||||
@ -1897,7 +1897,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)
|
||||
@ -2016,7 +2016,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.71 2000/03/24 17:05:33 ws Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.72 2000/03/26 20:42:30 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -827,7 +827,7 @@ kvtop(addr)
|
||||
if (addr < end)
|
||||
return (int)addr;
|
||||
|
||||
va = trunc_page(addr);
|
||||
va = trunc_page((vaddr_t)addr);
|
||||
off = (int)addr - va;
|
||||
|
||||
if (pmap_extract(pmap_kernel(), va, &pa) == FALSE) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.49 2000/03/19 19:16:14 soren Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.50 2000/03/26 20:42:31 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -43,7 +43,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.49 2000/03/19 19:16:14 soren Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.50 2000/03/26 20:42:31 kleink Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -329,7 +329,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr = uvm_km_valloc_wait(phys_map, len);
|
||||
@ -358,7 +358,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 = (vaddr_t)bp->b_data - addr;
|
||||
len = round_page(off + len);
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.63 2000/03/18 22:33:06 scw Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.64 2000/03/26 20:42:31 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -510,7 +510,7 @@ cpu_startup()
|
||||
* XXX Should just change KERNBASE and VM_MIN_KERNEL_ADDRESS,
|
||||
* XXX but not right now.
|
||||
*/
|
||||
if (uvm_map_protect(kernel_map, 0, round_page(&kernel_text),
|
||||
if (uvm_map_protect(kernel_map, 0, round_page((vaddr_t)&kernel_text),
|
||||
UVM_PROT_NONE, TRUE) != KERN_SUCCESS)
|
||||
panic("can't mark pre-text pages off-limits");
|
||||
|
||||
@ -518,8 +518,8 @@ cpu_startup()
|
||||
* Tell the VM system that writing to the kernel text isn't allowed.
|
||||
* If we don't, we might end up COW'ing the text segment!
|
||||
*/
|
||||
if (uvm_map_protect(kernel_map, trunc_page(&kernel_text),
|
||||
round_page(&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE)
|
||||
if (uvm_map_protect(kernel_map, trunc_page((vaddr_t)&kernel_text),
|
||||
round_page((vaddr_t)&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE)
|
||||
!= KERN_SUCCESS)
|
||||
panic("can't protect kernel text");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.40 2000/03/18 22:33:07 scw Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.41 2000/03/26 20:42:32 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -588,7 +588,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);
|
||||
@ -641,7 +641,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) {
|
||||
@ -1165,7 +1165,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1278,7 +1278,7 @@ validate:
|
||||
TBIS(va);
|
||||
#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
|
||||
|
||||
return (KERN_SUCCESS);
|
||||
@ -1920,7 +1920,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)
|
||||
@ -2038,7 +2038,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.1 1999/12/09 14:53:17 tsutsui Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.2 2000/03/26 20:42:33 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -605,7 +605,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);
|
||||
@ -658,7 +658,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) {
|
||||
@ -1256,7 +1256,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1439,7 +1439,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
|
||||
|
||||
return (KERN_SUCCESS);
|
||||
@ -2139,7 +2139,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)
|
||||
@ -2274,7 +2274,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.29 2000/01/19 20:05:45 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.30 2000/03/26 20:42:33 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -407,7 +407,7 @@ cpu_startup()
|
||||
* XXX Should just change KERNBASE and VM_MIN_KERNEL_ADDRESS,
|
||||
* XXX but not right now.
|
||||
*/
|
||||
if (uvm_map_protect(kernel_map, 0, round_page(&kernel_text),
|
||||
if (uvm_map_protect(kernel_map, 0, round_page((vaddr_t)&kernel_text),
|
||||
UVM_PROT_NONE, TRUE) != KERN_SUCCESS)
|
||||
panic("can't mark pre-text pages off-limits");
|
||||
|
||||
@ -415,8 +415,8 @@ cpu_startup()
|
||||
* Tell the VM system that writing to the kernel text isn't allowed.
|
||||
* If we don't, we might end up COW'ing the text segment!
|
||||
*/
|
||||
if (uvm_map_protect(kernel_map, trunc_page(&kernel_text),
|
||||
round_page(&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE)
|
||||
if (uvm_map_protect(kernel_map, trunc_page((vaddr_t)&kernel_text),
|
||||
round_page((vaddr_t)&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE)
|
||||
!= KERN_SUCCESS)
|
||||
panic("can't protect kernel text");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.21 1999/11/13 00:30:41 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.22 2000/03/26 20:42:34 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* This file was taken from mvme68k/mvme68k/pmap.c
|
||||
@ -635,7 +635,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);
|
||||
@ -683,7 +683,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) {
|
||||
@ -1326,7 +1326,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1529,7 +1529,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
|
||||
|
||||
return (KERN_SUCCESS);
|
||||
@ -2151,7 +2151,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)
|
||||
@ -2301,7 +2301,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.40 2000/01/20 22:18:58 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.41 2000/03/26 20:42:35 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 Matthias Pfaller.
|
||||
@ -363,7 +363,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr= uvm_km_valloc_wait(phys_map, len);
|
||||
@ -403,7 +403,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 = (vaddr_t)bp->b_data - addr;
|
||||
len = round_page(off + len);
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: px.c,v 1.29 2000/02/22 12:22:19 soda Exp $ */
|
||||
/* $NetBSD: px.c,v 1.30 2000/03/26 20:42:35 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.29 2000/02/22 12:22:19 soda Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.30 2000/03/26 20:42:35 kleink Exp $");
|
||||
|
||||
/*
|
||||
* px.c: driver for the DEC TURBOchannel 2D and 3D accelerated framebuffers
|
||||
@ -1935,7 +1935,7 @@ px_mmap_info (p, dev, va)
|
||||
size = sizeof(struct px_map);
|
||||
prot = VM_PROT_READ | VM_PROT_WRITE;
|
||||
flags = MAP_SHARED | MAP_FILE;
|
||||
*va = round_page(p->p_vmspace->vm_taddr + MAXTSIZ + MAXDSIZ);
|
||||
*va = round_page((vaddr_t)p->p_vmspace->vm_taddr + MAXTSIZ + MAXDSIZ);
|
||||
return uvm_mmap(&p->p_vmspace->vm_map, va, size, prot,
|
||||
VM_PROT_ALL, flags, (caddr_t)&vn, 0,
|
||||
p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.27 1999/11/13 00:30:43 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.28 2000/03/26 20:42:36 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -773,7 +773,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);
|
||||
@ -839,7 +839,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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.15 2000/01/20 22:18:58 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.16 2000/03/26 20:42:36 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -259,7 +259,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr = uvm_km_valloc_wait(phys_map, len);
|
||||
@ -289,7 +289,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 = (vaddr_t)bp->b_data - addr;
|
||||
len = round_page(off + len);
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.7 2000/01/20 22:18:59 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.8 2000/03/26 20:42:36 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -303,7 +303,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr= uvm_km_valloc_wait(phys_map, len);
|
||||
@ -344,7 +344,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 = (vaddr_t)bp->b_data - addr;
|
||||
len = round_page(off + len);
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.51 2000/01/20 22:18:59 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.52 2000/03/26 20:42:37 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
@ -119,7 +119,7 @@ vmapbuf(bp, len)
|
||||
* segment boundary to avoid VAC problems!
|
||||
*/
|
||||
bp->b_saveaddr = bp->b_data;
|
||||
uva = trunc_page(bp->b_data);
|
||||
uva = trunc_page((vaddr_t)bp->b_data);
|
||||
off = (vaddr_t)bp->b_data - uva;
|
||||
len = round_page(off + len);
|
||||
kva = uvm_km_valloc_wait(kernel_map, len);
|
||||
@ -161,7 +161,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);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.25 2000/01/20 22:18:59 sommerfeld Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.26 2000/03/26 20:42:37 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
@ -130,7 +130,7 @@ vmapbuf(bp, len)
|
||||
* segment boundary to avoid VAC problems!
|
||||
*/
|
||||
bp->b_saveaddr = bp->b_data;
|
||||
uva = trunc_page(bp->b_data);
|
||||
uva = trunc_page((vaddr_t)bp->b_data);
|
||||
off = (vaddr_t)bp->b_data - uva;
|
||||
len = round_page(off + len);
|
||||
kva = uvm_km_valloc_wait(kernel_map, len);
|
||||
@ -173,7 +173,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);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.75 1999/12/11 17:51:35 ragge Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.76 2000/03/26 20:42:38 kleink Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
@ -351,7 +351,7 @@ pmap_decpteref(pmap, pte)
|
||||
return;
|
||||
index = ((vaddr_t)pte - (vaddr_t)pmap->pm_p0br) >> PGSHIFT;
|
||||
|
||||
pte = (struct pte *)trunc_page(pte);
|
||||
pte = (struct pte *)trunc_page((vaddr_t)pte);
|
||||
#ifdef PMAPDEBUG
|
||||
if (startpmapdebug)
|
||||
printf("pmap_decpteref: pmap %p pte %p index %d refcnt %d\n",
|
||||
@ -691,7 +691,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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.58 2000/03/08 23:49:10 matt Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.59 2000/03/26 20:42:40 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
@ -337,7 +337,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 = (vaddr_t)bp->b_data - faddr;
|
||||
len = round_page(off + len);
|
||||
taddr = uvm_km_valloc_wait(phys_map, len);
|
||||
@ -372,7 +372,7 @@ vunmapbuf(bp, len)
|
||||
return;
|
||||
if ((bp->b_flags & B_PHYS) == 0)
|
||||
panic("vunmapbuf");
|
||||
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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.47 1999/11/13 00:32:21 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.48 2000/03/26 20:42:41 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -640,7 +640,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);
|
||||
@ -693,7 +693,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) {
|
||||
@ -1279,7 +1279,7 @@ pmap_enter(pmap, va, pa, prot, flags)
|
||||
* 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
|
||||
@ -1476,7 +1476,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
|
||||
return (KERN_SUCCESS);
|
||||
}
|
||||
@ -2259,7 +2259,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)
|
||||
@ -2402,7 +2402,8 @@ 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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ibcs2_misc.c,v 1.44 2000/02/27 17:30:10 matt Exp $ */
|
||||
/* $NetBSD: ibcs2_misc.c,v 1.45 2000/03/26 20:42:41 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1998 Scott Bartram
|
||||
@ -1482,7 +1482,7 @@ ibcs2_sys_mmap(p, v, retval)
|
||||
SCARG(&mm, addr) = SCARG(uap, addr);
|
||||
SCARG(&mm, pos) = SCARG(uap, off);
|
||||
|
||||
rp = (void *) round_page(p->p_vmspace->vm_daddr + MAXDSIZ);
|
||||
rp = (void *) round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ);
|
||||
if ((SCARG(&mm, flags) & MAP_FIXED) == 0 &&
|
||||
SCARG(&mm, addr) != 0 && SCARG(&mm, addr) < rp)
|
||||
SCARG(&mm, addr) = rp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osf1_mmap.c,v 1.3 1999/05/05 01:51:34 cgd Exp $ */
|
||||
/* $NetBSD: osf1_mmap.c,v 1.4 2000/03/26 20:42:42 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -174,7 +174,7 @@ osf1_sys_mmap(p, v, retval)
|
||||
* provide a better way to avoid the data region altogether.
|
||||
*/
|
||||
if ((SCARG(&a, flags) & MAP_FIXED) == 0) {
|
||||
vaddr_t addr = round_page(SCARG(&a, addr));
|
||||
vaddr_t addr = round_page((vaddr_t)SCARG(&a, addr));
|
||||
vsize_t size = round_page(SCARG(&a, len));
|
||||
int fixed = 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sunos_misc.c,v 1.101 1999/05/05 20:01:05 thorpej Exp $ */
|
||||
/* $NetBSD: sunos_misc.c,v 1.102 2000/03/26 20:42:42 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -620,8 +620,8 @@ sunos_sys_mmap(p, v, retval)
|
||||
|
||||
if ((SCARG(&ouap, flags) & MAP_FIXED) == 0 &&
|
||||
SCARG(&ouap, addr) != 0 &&
|
||||
SCARG(&ouap, addr) < (void *)round_page(p->p_vmspace->vm_daddr+MAXDSIZ))
|
||||
SCARG(&ouap, addr) = (caddr_t)round_page(p->p_vmspace->vm_daddr+MAXDSIZ);
|
||||
SCARG(&ouap, addr) < (void *)round_page((vaddr_t)p->p_vmspace->vm_daddr+MAXDSIZ))
|
||||
SCARG(&ouap, addr) = (caddr_t)round_page((vaddr_t)p->p_vmspace->vm_daddr+MAXDSIZ);
|
||||
|
||||
SCARG(&ouap, len) = SCARG(uap, len);
|
||||
SCARG(&ouap, prot) = SCARG(uap, prot);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_misc.c,v 1.81 1999/09/07 18:20:19 christos Exp $ */
|
||||
/* $NetBSD: svr4_misc.c,v 1.82 2000/03/26 20:42:43 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -514,7 +514,7 @@ svr4_sys_mmap(p, v, retval)
|
||||
SCARG(&mm, addr) = SCARG(uap, addr);
|
||||
SCARG(&mm, pos) = SCARG(uap, pos);
|
||||
|
||||
rp = (void *) round_page(p->p_vmspace->vm_daddr + MAXDSIZ);
|
||||
rp = (void *) round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ);
|
||||
if ((SCARG(&mm, flags) & MAP_FIXED) == 0 &&
|
||||
SCARG(&mm, addr) != 0 && SCARG(&mm, addr) < rp)
|
||||
SCARG(&mm, addr) = rp;
|
||||
@ -549,7 +549,7 @@ svr4_sys_mmap64(p, v, retval)
|
||||
SCARG(&mm, addr) = SCARG(uap, addr);
|
||||
SCARG(&mm, pos) = SCARG(uap, pos);
|
||||
|
||||
rp = (void *) round_page(p->p_vmspace->vm_daddr + MAXDSIZ);
|
||||
rp = (void *) round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ);
|
||||
if ((SCARG(&mm, flags) & MAP_FIXED) == 0 &&
|
||||
SCARG(&mm, addr) != 0 && SCARG(&mm, addr) < rp)
|
||||
SCARG(&mm, addr) = rp;
|
||||
@ -724,7 +724,7 @@ svr4_sys_break(p, v, retval)
|
||||
int diff;
|
||||
|
||||
old = (vaddr_t) vm->vm_daddr;
|
||||
new = round_page(SCARG(uap, nsize));
|
||||
new = round_page((vaddr_t)SCARG(uap, nsize));
|
||||
diff = new - old;
|
||||
|
||||
DPRINTF(("break(1): old %lx new %lx diff %x\n", old, new, diff));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ultrix_misc.c,v 1.53 1999/08/25 04:53:54 thorpej Exp $ */
|
||||
/* $NetBSD: ultrix_misc.c,v 1.54 2000/03/26 20:42:43 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author)
|
||||
@ -343,8 +343,8 @@ ultrix_sys_mmap(p, v, retval)
|
||||
|
||||
if ((SCARG(&ouap, flags) & MAP_FIXED) == 0 &&
|
||||
SCARG(&ouap, addr) != 0 &&
|
||||
SCARG(&ouap, addr) < (void *)round_page(p->p_vmspace->vm_daddr+MAXDSIZ))
|
||||
SCARG(&ouap, addr) = (void *)round_page(p->p_vmspace->vm_daddr+MAXDSIZ);
|
||||
SCARG(&ouap, addr) < (void *)round_page((vaddr_t)p->p_vmspace->vm_daddr+MAXDSIZ))
|
||||
SCARG(&ouap, addr) = (void *)round_page((vaddr_t)p->p_vmspace->vm_daddr+MAXDSIZ);
|
||||
|
||||
SCARG(&ouap, len) = SCARG(uap, len);
|
||||
SCARG(&ouap, prot) = SCARG(uap, prot);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bhavar.h,v 1.15 1999/10/01 18:17:13 thorpej Exp $ */
|
||||
/* $NetBSD: bhavar.h,v 1.16 2000/03/26 20:42:44 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -57,7 +57,7 @@ struct bha_ccb_group {
|
||||
struct bha_ccb bcg_ccbs[1]; /* determined at run-time */
|
||||
};
|
||||
|
||||
#define BHA_CCB_GROUP(ccb) (struct bha_ccb_group *)(trunc_page(ccb))
|
||||
#define BHA_CCB_GROUP(ccb) (struct bha_ccb_group *)(trunc_page((vaddr_t)ccb))
|
||||
#define BHA_CCB_OFFSET(ccb) ((vaddr_t)(ccb) & PAGE_MASK)
|
||||
|
||||
#define BHA_CCB_SYNC(sc, ccb, ops) \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sysv_shm.c,v 1.53 1999/12/03 21:43:20 ragge Exp $ */
|
||||
/* $NetBSD: sysv_shm.c,v 1.54 2000/03/26 20:42:45 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -283,7 +283,8 @@ sys_shmat(p, v, retval)
|
||||
} else {
|
||||
/* This is just a hint to vm_mmap() about where to put it. */
|
||||
attach_va =
|
||||
round_page(p->p_vmspace->vm_taddr + MAXTSIZ + MAXDSIZ);
|
||||
round_page((vaddr_t)p->p_vmspace->vm_taddr +
|
||||
MAXTSIZ + MAXDSIZ);
|
||||
}
|
||||
shm_handle = shmseg->_shm_internal;
|
||||
uao_reference(shm_handle->shm_object);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_param.h,v 1.24 2000/03/04 08:41:59 ragge Exp $ */
|
||||
/* $NetBSD: vm_param.h,v 1.25 2000/03/26 20:42:45 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -147,9 +147,9 @@ typedef int boolean_t;
|
||||
* for either addresses or counts (i.e., 1 byte rounds to 1 page).
|
||||
*/
|
||||
#define round_page(x) \
|
||||
((vaddr_t)((((vaddr_t)(x)) + PAGE_MASK) & ~PAGE_MASK))
|
||||
(((x) + PAGE_MASK) & ~PAGE_MASK)
|
||||
#define trunc_page(x) \
|
||||
((vaddr_t)(((vaddr_t)(x)) & ~PAGE_MASK))
|
||||
(((x) & ~PAGE_MASK))
|
||||
|
||||
extern psize_t mem_size; /* size of physical memory (bytes) */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user