Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sun3/sun3x - vm_offset_t -> [pv]addr_t
details: https://anonhg.NetBSD.org/src/rev/baeb302fd587
branches: trunk
changeset: 514554:baeb302fd587
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Wed Sep 05 12:37:25 2001 +0000
description:
- vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
diffstat:
sys/arch/sun3/sun3x/bus_subr.c | 16 ++++++++--------
sys/arch/sun3/sun3x/clock.c | 6 +++---
sys/arch/sun3/sun3x/dvma.c | 14 +++++++-------
sys/arch/sun3/sun3x/locore2.c | 4 ++--
sys/arch/sun3/sun3x/machdep.c | 20 ++++++++++----------
sys/arch/sun3/sun3x/mem.c | 16 ++++++++--------
sys/arch/sun3/sun3x/obio.c | 8 +++++---
7 files changed, 43 insertions(+), 41 deletions(-)
diffs (truncated from 313 to 300 lines):
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/bus_subr.c
--- a/sys/arch/sun3/sun3x/bus_subr.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/bus_subr.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
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 @@
void bus_tmapout(vp)
void *vp;
{
- vm_offset_t pgva;
+ vaddr_t pgva;
int s;
pgva = m68k_trunc_page(vp);
@@ -139,7 +139,7 @@
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 @@
/* 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 @@
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))
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/clock.c
--- a/sys/arch/sun3/sun3x/clock.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/clock.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
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 @@
*/
void
microtime(tvp)
- register struct timeval *tvp;
+ struct timeval *tvp;
{
int s = splhigh();
static struct timeval lasttime;
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/dvma.c
--- a/sys/arch/sun3/sun3x/dvma.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/dvma.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
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 @@
/*
* 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 @@
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 @@
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...
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/locore2.c
--- a/sys/arch/sun3/sun3x/locore2.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/locore2.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
static void
_vm_init()
{
- vm_offset_t nextva;
+ vaddr_t nextva;
/*
* First preserve our symbol table, which might have been
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/machdep.c
--- a/sys/arch/sun3/sun3x/machdep.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/machdep.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
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 @@
{
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 @@
* 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 @@
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 @@
* 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 @@
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;
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/mem.c
--- a/sys/arch/sun3/sun3x/mem.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/mem.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
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 @@
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)
diff -r 1fd7b3e33e63 -r baeb302fd587 sys/arch/sun3/sun3x/obio.c
--- a/sys/arch/sun3/sun3x/obio.c Wed Sep 05 12:15:21 2001 +0000
+++ b/sys/arch/sun3/sun3x/obio.c Wed Sep 05 12:37:25 2001 +0000
@@ -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 @@
* physical address it maps to (if found).
*/
static struct prom_map {
- vm_offset_t pa, va;
+ paddr_t pa;
+ vaddr_t va;
Home |
Main Index |
Thread Index |
Old Index