- vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t - remove register prefixes
This commit is contained in:
parent
0637b20a58
commit
573961b5bb
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_subr.c,v 1.20 2001/04/24 04:31:14 thorpej Exp $ */
|
||||
/* $NetBSD: bus_subr.c,v 1.21 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -59,7 +59,7 @@
|
|||
label_t *nofault;
|
||||
|
||||
/* These are defined in pmap.c */
|
||||
extern vm_offset_t tmp_vpages[];
|
||||
extern vaddr_t tmp_vpages[];
|
||||
extern int tmp_vpages_inuse;
|
||||
|
||||
static const struct {
|
||||
|
@ -88,7 +88,7 @@ void *
|
|||
bus_tmapin(bustype, pa)
|
||||
int bustype, pa;
|
||||
{
|
||||
vm_offset_t pgva;
|
||||
vaddr_t pgva;
|
||||
int off, s;
|
||||
|
||||
if ((bustype < 0) || (bustype >= BUS__NTYPES))
|
||||
|
@ -118,7 +118,7 @@ bus_tmapin(bustype, pa)
|
|||
void bus_tmapout(vp)
|
||||
void *vp;
|
||||
{
|
||||
vm_offset_t pgva;
|
||||
vaddr_t pgva;
|
||||
int s;
|
||||
|
||||
pgva = m68k_trunc_page(vp);
|
||||
|
@ -139,7 +139,7 @@ void *
|
|||
bus_mapin(bustype, pa, sz)
|
||||
int bustype, pa, sz;
|
||||
{
|
||||
vm_offset_t va;
|
||||
vaddr_t va;
|
||||
int off;
|
||||
|
||||
if ((bustype < 0) || (bustype >= BUS__NTYPES))
|
||||
|
@ -152,7 +152,7 @@ bus_mapin(bustype, pa, sz)
|
|||
|
||||
/* Borrow PROM mappings if we can. */
|
||||
if (bustype == BUS_OBIO) {
|
||||
va = (vm_offset_t) obio_find_mapping(pa, sz);
|
||||
va = (vaddr_t) obio_find_mapping(pa, sz);
|
||||
if (va != 0)
|
||||
goto done;
|
||||
}
|
||||
|
@ -178,10 +178,10 @@ bus_mapout(ptr, sz)
|
|||
void *ptr;
|
||||
int sz;
|
||||
{
|
||||
vm_offset_t va;
|
||||
vaddr_t va;
|
||||
int off;
|
||||
|
||||
va = (vm_offset_t)ptr;
|
||||
va = (vaddr_t)ptr;
|
||||
|
||||
/* If it was a PROM mapping, do NOT free it! */
|
||||
if ((va >= SUN3X_MONSTART) && (va < SUN3X_MONEND))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.18 2001/02/03 12:40:59 tsutsui Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.19 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
|
@ -276,7 +276,7 @@ set_clk_mode(on, off, enable_clk)
|
|||
u_char on, off;
|
||||
int enable_clk;
|
||||
{
|
||||
register u_char interreg;
|
||||
u_char interreg;
|
||||
|
||||
/*
|
||||
* If we have not yet mapped the register,
|
||||
|
@ -426,7 +426,7 @@ clock_intr(cf)
|
|||
*/
|
||||
void
|
||||
microtime(tvp)
|
||||
register struct timeval *tvp;
|
||||
struct timeval *tvp;
|
||||
{
|
||||
int s = splhigh();
|
||||
static struct timeval lasttime;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dvma.c,v 1.20 2001/08/31 04:44:57 simonb Exp $ */
|
||||
/* $NetBSD: dvma.c,v 1.21 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -172,13 +172,13 @@ dvma_mapin(kmem_va, len, canwait)
|
|||
int len, canwait;
|
||||
{
|
||||
void * dvma_addr;
|
||||
vm_offset_t kva, tva;
|
||||
register int npf, s;
|
||||
vaddr_t kva, tva;
|
||||
int npf, s;
|
||||
paddr_t pa;
|
||||
long off, pn;
|
||||
boolean_t rv;
|
||||
|
||||
kva = (u_long)kmem_va;
|
||||
kva = (vaddr_t)kmem_va;
|
||||
#ifdef DIAGNOSTIC
|
||||
/*
|
||||
* Addresses below VM_MIN_KERNEL_ADDRESS are not part of the kernel
|
||||
|
@ -191,7 +191,7 @@ dvma_mapin(kmem_va, len, canwait)
|
|||
/*
|
||||
* Calculate the offset of the data buffer from a page boundary.
|
||||
*/
|
||||
off = (int)kva & PGOFSET;
|
||||
off = kva & PGOFSET;
|
||||
kva -= off; /* Truncate starting address to nearest page. */
|
||||
len = round_page(len + off); /* Round the buffer length to pages. */
|
||||
npf = btoc(len); /* Determine the number of pages to be mapped. */
|
||||
|
@ -295,7 +295,7 @@ dvma_malloc(bytes)
|
|||
size_t bytes;
|
||||
{
|
||||
void *new_mem, *dvma_mem;
|
||||
vm_size_t new_size;
|
||||
vsize_t new_size;
|
||||
|
||||
if (!bytes)
|
||||
return NULL;
|
||||
|
@ -315,7 +315,7 @@ dvma_free(addr, size)
|
|||
void *addr;
|
||||
size_t size;
|
||||
{
|
||||
vm_size_t sz = m68k_round_page(size);
|
||||
vsize_t sz = m68k_round_page(size);
|
||||
|
||||
dvma_mapout(addr, sz);
|
||||
/* XXX: need kmem address to free it...
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore2.c,v 1.24 2001/02/22 07:11:13 chs Exp $ */
|
||||
/* $NetBSD: locore2.c,v 1.25 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -148,7 +148,7 @@ _save_symtab()
|
|||
static void
|
||||
_vm_init()
|
||||
{
|
||||
vm_offset_t nextva;
|
||||
vaddr_t nextva;
|
||||
|
||||
/*
|
||||
* First preserve our symbol table, which might have been
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.72 2001/08/31 04:44:57 simonb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.73 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -110,7 +110,7 @@ int fputype;
|
|||
caddr_t msgbufaddr;
|
||||
|
||||
/* Virtual page frame for /dev/mem (see mem.c) */
|
||||
vm_offset_t vmmap;
|
||||
vaddr_t vmmap;
|
||||
|
||||
/*
|
||||
* safepri is a safe priority for sleep to set for a spin-wait
|
||||
|
@ -182,9 +182,9 @@ cpu_startup()
|
|||
{
|
||||
caddr_t v;
|
||||
int sz, i;
|
||||
vm_size_t size;
|
||||
vsize_t size;
|
||||
int base, residual;
|
||||
vm_offset_t minaddr, maxaddr;
|
||||
vaddr_t minaddr, maxaddr;
|
||||
char pbuf[9];
|
||||
|
||||
/*
|
||||
|
@ -229,12 +229,12 @@ cpu_startup()
|
|||
* in that they usually occupy more virtual memory than physical.
|
||||
*/
|
||||
size = MAXBSIZE * nbuf;
|
||||
if (uvm_map(kernel_map, (vm_offset_t *) &buffers, round_page(size),
|
||||
if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(size),
|
||||
NULL, UVM_UNKNOWN_OFFSET, 0,
|
||||
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
|
||||
UVM_ADV_NORMAL, 0)) != 0)
|
||||
panic("startup: cannot allocate VM for buffers");
|
||||
minaddr = (vm_offset_t)buffers;
|
||||
minaddr = (vaddr_t)buffers;
|
||||
if ((bufpages / nbuf) >= btoc(MAXBSIZE)) {
|
||||
/* don't want to alloc more physical mem than needed */
|
||||
bufpages = btoc(MAXBSIZE) * nbuf;
|
||||
|
@ -242,8 +242,8 @@ cpu_startup()
|
|||
base = bufpages / nbuf;
|
||||
residual = bufpages % nbuf;
|
||||
for (i = 0; i < nbuf; i++) {
|
||||
vm_size_t curbufsize;
|
||||
vm_offset_t curbuf;
|
||||
vsize_t curbufsize;
|
||||
vaddr_t curbuf;
|
||||
struct vm_page *pg;
|
||||
|
||||
/*
|
||||
|
@ -252,7 +252,7 @@ cpu_startup()
|
|||
* for the first "residual" buffers, and then we allocate
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vm_offset_t) buffers + (i * MAXBSIZE);
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
|
@ -629,7 +629,7 @@ dumpsys()
|
|||
struct sun3x_kcore_hdr *sh;
|
||||
phys_ram_seg_t *crs_p;
|
||||
char *vaddr;
|
||||
vm_offset_t paddr;
|
||||
paddr_t paddr;
|
||||
int psize, todo, seg, segsz;
|
||||
daddr_t blkno;
|
||||
int error = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mem.c,v 1.19 2001/04/24 04:31:15 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.20 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -64,7 +64,7 @@
|
|||
#include <sun3/sun3/machdep.h>
|
||||
|
||||
/* XXX - Put this in pmap_pvt.h or something? */
|
||||
extern vm_offset_t avail_start;
|
||||
extern paddr_t avail_start;
|
||||
|
||||
#define mmread mmrw
|
||||
cdev_decl(mm);
|
||||
|
@ -101,9 +101,9 @@ mmrw(dev, uio, flags)
|
|||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
register struct iovec *iov;
|
||||
register vm_offset_t o, v;
|
||||
register int c, rw;
|
||||
struct iovec *iov;
|
||||
vaddr_t o, v;
|
||||
int c, rw;
|
||||
int error = 0;
|
||||
static int physlock;
|
||||
vm_prot_t prot;
|
||||
|
@ -299,10 +299,10 @@ promacc(va, len, rw)
|
|||
caddr_t va;
|
||||
int len, rw;
|
||||
{
|
||||
vm_offset_t sva, eva;
|
||||
vaddr_t sva, eva;
|
||||
|
||||
sva = (vm_offset_t)va;
|
||||
eva = (vm_offset_t)va + len;
|
||||
sva = (vaddr_t)va;
|
||||
eva = (vaddr_t)va + len;
|
||||
|
||||
/* Test for the most common case first. */
|
||||
if (sva < SUN3X_PROM_BASE)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: obio.c,v 1.12 2000/11/02 21:18:03 tsutsui Exp $ */
|
||||
/* $NetBSD: obio.c,v 1.13 2001/09/05 12:37:25 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -222,7 +222,8 @@ obio_submatch(parent, cf, aux)
|
|||
* physical address it maps to (if found).
|
||||
*/
|
||||
static struct prom_map {
|
||||
vm_offset_t pa, va;
|
||||
paddr_t pa;
|
||||
vaddr_t va;
|
||||
} prom_mappings[] = {
|
||||
{ OBIO_ENABLEREG, 0 }, /* regs: Sys ENA, Bus ERR, etc. */
|
||||
{ OBIO_ZS_KBD_MS, 0 }, /* Keyboard and Mouse */
|
||||
|
@ -268,7 +269,8 @@ static void
|
|||
save_prom_mappings __P((void))
|
||||
{
|
||||
int *mon_pte;
|
||||
vm_offset_t va, pa;
|
||||
vaddr_t va;
|
||||
paddr_t pa;
|
||||
int i;
|
||||
|
||||
/* Note: mon_ctbl[0] maps SUN3X_MON_KDB_BASE */
|
||||
|
|
Loading…
Reference in New Issue