diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-17 07:31:28 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-17 07:31:28 +0000 |
commit | 7cbb57eba5664076170d755cd54b71d88b093c0e (patch) | |
tree | ab7aa84468246c727fb48c0d639bf2567e2cf89f /sys | |
parent | 9eee08e5579b1adf67335028b835e1df460fbb93 (diff) |
Get rid of deprecated vm_{offset,size}_t types for good, use {p,v}{addr,size}_t
instead; looked at millert@
Diffstat (limited to 'sys')
47 files changed, 200 insertions, 220 deletions
diff --git a/sys/arch/alpha/include/db_machdep.h b/sys/arch/alpha/include/db_machdep.h index 41ed3499b84..14b512a0a64 100644 --- a/sys/arch/alpha/include/db_machdep.h +++ b/sys/arch/alpha/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.18 2005/01/04 21:14:35 espie Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.19 2005/12/17 07:31:23 miod Exp $ */ /* * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -44,7 +44,7 @@ struct opcode { extern struct opcode opcode[]; /* types the generic ddb module needs */ -typedef vm_offset_t db_addr_t; +typedef vaddr_t db_addr_t; typedef long db_expr_t; typedef struct trapframe db_regs_t; diff --git a/sys/arch/alpha/include/types.h b/sys/arch/alpha/include/types.h index 1dc17772230..03012b5e792 100644 --- a/sys/arch/alpha/include/types.h +++ b/sys/arch/alpha/include/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.16 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: types.h,v 1.17 2005/12/17 07:31:23 miod Exp $ */ /* $NetBSD: types.h,v 1.6 1996/12/05 00:13:47 cgd Exp $ */ /*- @@ -44,9 +44,6 @@ typedef struct label_t { #endif #if __BSD_VISIBLE -typedef unsigned long vm_offset_t; -typedef unsigned long vm_size_t; - typedef unsigned long vaddr_t; typedef unsigned long paddr_t; typedef unsigned long vsize_t; diff --git a/sys/arch/alpha/stand/netboot/netboot.c b/sys/arch/alpha/stand/netboot/netboot.c index 4b49d756230..c058c3f7f5e 100644 --- a/sys/arch/alpha/stand/netboot/netboot.c +++ b/sys/arch/alpha/stand/netboot/netboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netboot.c,v 1.6 2004/07/05 19:59:20 deraadt Exp $ */ +/* $OpenBSD: netboot.c,v 1.7 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: netboot.c,v 1.1 1996/09/18 20:03:12 cgd Exp $ */ /* @@ -55,7 +55,7 @@ char boot_flags[128]; extern char bootprog_name[], bootprog_rev[]; -vm_offset_t ffp_save, ptbr_save; +vaddr_t ffp_save, ptbr_save; int debug; diff --git a/sys/arch/alpha/tc/cfbvar.h b/sys/arch/alpha/tc/cfbvar.h index 05081b2f8be..567df97081b 100644 --- a/sys/arch/alpha/tc/cfbvar.h +++ b/sys/arch/alpha/tc/cfbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cfbvar.h,v 1.6 2002/03/14 01:26:28 millert Exp $ */ +/* $OpenBSD: cfbvar.h,v 1.7 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: cfbvar.h,v 1.1 1996/05/01 23:25:04 cgd Exp $ */ /* @@ -38,16 +38,16 @@ struct fbcursor; struct fbcurpos; struct cfb_devconfig { - vm_offset_t dc_vaddr; /* memory space virtual base address */ - vm_offset_t dc_paddr; /* memory space physical base address */ - vm_offset_t dc_size; /* size of slot memory */ + vaddr_t dc_vaddr; /* memory space virtual base address */ + paddr_t dc_paddr; /* memory space physical base address */ + vsize_t dc_size; /* size of slot memory */ int dc_wid; /* width of frame buffer */ int dc_ht; /* height of frame buffer */ int dc_depth; /* depth, bits per pixel */ int dc_rowbytes; /* bytes in a FB scan line */ - vm_offset_t dc_videobase; /* base of flat frame buffer */ + vaddr_t dc_videobase; /* base of flat frame buffer */ struct raster dc_raster; /* raster description */ struct rcons dc_rcons; /* raster blitter control info */ diff --git a/sys/arch/alpha/tc/sfbvar.h b/sys/arch/alpha/tc/sfbvar.h index f30a3da9b00..6674c2cfcf1 100644 --- a/sys/arch/alpha/tc/sfbvar.h +++ b/sys/arch/alpha/tc/sfbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sfbvar.h,v 1.6 2002/03/14 01:26:28 millert Exp $ */ +/* $OpenBSD: sfbvar.h,v 1.7 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: sfbvar.h,v 1.1 1996/05/01 21:15:51 cgd Exp $ */ /* @@ -38,16 +38,16 @@ struct fbcursor; struct fbcurpos; struct sfb_devconfig { - vm_offset_t dc_vaddr; /* memory space virtual base address */ - vm_offset_t dc_paddr; /* memory space physical base address */ - vm_offset_t dc_size; /* size of slot memory */ + vaddr_t dc_vaddr; /* memory space virtual base address */ + paddr_t dc_paddr; /* memory space physical base address */ + vsize_t dc_size; /* size of slot memory */ int dc_wid; /* width of frame buffer */ int dc_ht; /* height of frame buffer */ int dc_depth; /* depth, bits per pixel */ int dc_rowbytes; /* bytes in a FB scan line */ - vm_offset_t dc_videobase; /* base of flat frame buffer */ + vaddr_t dc_videobase; /* base of flat frame buffer */ struct raster dc_raster; /* raster description */ struct rcons dc_rcons; /* raster blitter control info */ diff --git a/sys/arch/arm/footbridge/isa/isa_io.c b/sys/arch/arm/footbridge/isa/isa_io.c index fbb1253c91f..6d6eba453e5 100644 --- a/sys/arch/arm/footbridge/isa/isa_io.c +++ b/sys/arch/arm/footbridge/isa/isa_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_io.c,v 1.1 2004/02/01 05:09:49 drahn Exp $ */ +/* $OpenBSD: isa_io.c,v 1.2 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: isa_io.c,v 1.2 2002/09/27 15:35:44 provos Exp $ */ /* @@ -221,8 +221,8 @@ struct bus_space isa_mem_bs_tag = { void isa_io_init(isa_io_addr, isa_mem_addr) - vm_offset_t isa_io_addr; - vm_offset_t isa_mem_addr; + vaddr_t isa_io_addr; + vaddr_t isa_mem_addr; { isa_io_bs_tag.bs_cookie = (void *)isa_io_addr; isa_mem_bs_tag.bs_cookie = (void *)isa_mem_addr; @@ -233,16 +233,16 @@ isa_io_init(isa_io_addr, isa_mem_addr) * (e.g. X servers) need to map ISA space directly. use these * functions sparingly! */ -vm_offset_t +vaddr_t isa_io_data_vaddr(void) { - return (vm_offset_t)isa_io_bs_tag.bs_cookie; + return (vaddr_t)isa_io_bs_tag.bs_cookie; } -vm_offset_t +vaddr_t isa_mem_data_vaddr(void) { - return (vm_offset_t)isa_mem_bs_tag.bs_cookie; + return (vaddr_t)isa_mem_bs_tag.bs_cookie; } int diff --git a/sys/arch/arm/include/types.h b/sys/arch/arm/include/types.h index d4d1cb614ee..225dbe72098 100644 --- a/sys/arch/arm/include/types.h +++ b/sys/arch/arm/include/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: types.h,v 1.5 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: types.h,v 1.4 2002/02/28 03:17:25 simonb Exp $ */ /* @@ -54,13 +54,10 @@ typedef struct label_t { /* Used by setjmp & longjmp */ /* NB: This should probably be if defined(_KERNEL) */ #if __BSD_VISIBLE -typedef unsigned long vm_offset_t; -typedef unsigned long vm_size_t; - -typedef vm_offset_t paddr_t; -typedef vm_size_t psize_t; -typedef vm_offset_t vaddr_t; -typedef vm_size_t vsize_t; +typedef unsigned long paddr_t; +typedef unsigned long psize_t; +typedef unsigned long vaddr_t; +typedef unsigned long vsize_t; #endif #define __HAVE_MINIMAL_EMUL diff --git a/sys/arch/cats/cats/cats_machdep.c b/sys/arch/cats/cats/cats_machdep.c index 3bb7695d5d8..8395977f503 100644 --- a/sys/arch/cats/cats/cats_machdep.c +++ b/sys/arch/cats/cats/cats_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cats_machdep.c,v 1.11 2005/02/17 18:07:37 jfb Exp $ */ +/* $OpenBSD: cats_machdep.c,v 1.12 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: cats_machdep.c,v 1.50 2003/10/04 14:28:28 chris Exp $ */ /* @@ -117,12 +117,11 @@ static char bootargs[MAX_BOOT_STRING + 1]; char *boot_args = NULL; char *boot_file = NULL; -vm_offset_t physical_start; -vm_offset_t physical_freestart; -vm_offset_t physical_freeend; -vm_offset_t physical_end; +paddr_t physical_start; +paddr_t physical_freestart; +paddr_t physical_freeend; +paddr_t physical_end; u_int free_pages; -vm_offset_t pagetables_start; int physmem = 0; /*int debug_flags;*/ @@ -137,7 +136,7 @@ pv_addr_t undstack; pv_addr_t abtstack; extern pv_addr_t kernelstack; -vm_offset_t msgbufphys; +paddr_t msgbufphys; extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; @@ -290,9 +289,9 @@ boot(howto) * time with section mappings. */ struct l1_sec_map { - vm_offset_t va; - vm_offset_t pa; - vm_size_t size; + vaddr_t va; + paddr_t pa; + vsize_t size; vm_prot_t prot; int cache; } l1_sec_table[] = { @@ -639,7 +638,7 @@ initarm(bootargs) /* Map the core memory needed before autoconfig */ loop = 0; while (l1_sec_table[loop].size) { - vm_size_t sz; + vsize_t sz; #ifdef VERBOSE_INIT_ARM printf("%08lx -> %08lx @ %08lx\n", l1_sec_table[loop].pa, diff --git a/sys/arch/m68k/include/types.h b/sys/arch/m68k/include/types.h index fb3cde01f21..477d01cb053 100644 --- a/sys/arch/m68k/include/types.h +++ b/sys/arch/m68k/include/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.11 2005/12/14 21:46:31 millert Exp $ */ +/* $OpenBSD: types.h,v 1.12 2005/12/17 07:31:25 miod Exp $ */ /* $NetBSD: types.h,v 1.9 1995/07/06 03:39:38 cgd Exp $ */ /*- @@ -43,9 +43,6 @@ typedef struct label_t { /* consistent with HP-UX */ #endif #if __BSD_VISIBLE -typedef unsigned long vm_offset_t; -typedef unsigned long vm_size_t; - typedef unsigned long vaddr_t; typedef unsigned long paddr_t; typedef unsigned long vsize_t; diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index bd7c519a51f..51a60179283 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.121 2005/11/15 07:02:36 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.122 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */ /* @@ -327,7 +327,7 @@ cpu_startup(void) int vers; int base, residual; vaddr_t minaddr, maxaddr; - vm_size_t size = 0; /* To avoid compiler warning */ + vsize_t size = 0; /* To avoid compiler warning */ int delay; /* diff --git a/sys/arch/macppc/include/powerpc.h b/sys/arch/macppc/include/powerpc.h index 64dca7da010..8395bd297c0 100644 --- a/sys/arch/macppc/include/powerpc.h +++ b/sys/arch/macppc/include/powerpc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: powerpc.h,v 1.7 2005/10/09 14:01:11 drahn Exp $ */ +/* $OpenBSD: powerpc.h,v 1.8 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: powerpc.h,v 1.1 1996/09/30 16:34:30 ws Exp $ */ /* @@ -35,8 +35,8 @@ #define _MACHINE_POWERPC_H_ struct mem_region { - vm_offset_t start; - vm_size_t size; + vaddr_t start; + vsize_t size; }; void mem_regions(struct mem_region **, struct mem_region **); @@ -84,7 +84,7 @@ int ppc_intr_disable(void); struct dumpmem { vaddr_t start; - vm_size_t end; + vsize_t end; }; extern struct dumpmem dumpmem[VM_PHYSSEG_MAX]; extern u_int ndumpmem; diff --git a/sys/arch/macppc/include/vmparam.h b/sys/arch/macppc/include/vmparam.h index 61d7274a860..ace57796122 100644 --- a/sys/arch/macppc/include/vmparam.h +++ b/sys/arch/macppc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.15 2005/04/11 15:13:01 deraadt Exp $ */ +/* $OpenBSD: vmparam.h,v 1.16 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ /*- @@ -75,15 +75,15 @@ /* * Would like to have MAX addresses = 0, but this doesn't (currently) work */ -#define VM_MIN_ADDRESS ((vm_offset_t)0) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xfffff000) +#define VM_MIN_ADDRESS ((vaddr_t)0) +#define VM_MAXUSER_ADDRESS ((vaddr_t)0xfffff000) #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT)) +#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT)) /* ppc_kvm_stolen is so that vm space can be stolen before vm is fully * initialized. */ -extern vm_offset_t ppc_kvm_stolen; +extern vaddr_t ppc_kvm_stolen; #define VM_KERN_ADDRESS_SIZE (PPC_SEGMENT_LENGTH - (32 * 1024 * 1024)) #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + VM_KERN_ADDRESS_SIZE) diff --git a/sys/arch/macppc/macppc/dma.c b/sys/arch/macppc/macppc/dma.c index f0526ab1523..7803b0804dd 100644 --- a/sys/arch/macppc/macppc/dma.c +++ b/sys/arch/macppc/macppc/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.23 2005/10/26 18:57:51 martin Exp $ */ +/* $OpenBSD: dma.c,v 1.24 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -57,7 +57,7 @@ #include <machine/bus.h> int _dmamem_alloc_range( bus_dma_tag_t t, bus_size_t size, bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs, - int nsegs, int *rsegs, int flags, vm_offset_t low, vm_offset_t high); + int nsegs, int *rsegs, int flags, vaddr_t low, vaddr_t high); int _dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct proc *, int, bus_addr_t *, int *, int); /* @@ -440,7 +440,7 @@ int _dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, size_t size, caddr_t *kvap, int flags) { - vm_offset_t va; + vaddr_t va; bus_addr_t addr; int curseg; @@ -481,7 +481,7 @@ _dmamem_unmap(bus_dma_tag_t t, caddr_t kva, size_t size) #endif size = round_page(size); - uvm_km_free(kernel_map, (vm_offset_t)kva, size); + uvm_km_free(kernel_map, (vaddr_t)kva, size); } /* @@ -527,9 +527,9 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off, int _dmamem_alloc_range(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs, - int flags, vm_offset_t low, vm_offset_t high) + int flags, vaddr_t low, vaddr_t high) { - vm_offset_t curaddr, lastaddr; + vaddr_t curaddr, lastaddr; struct vm_page *m; struct pglist mlist; int curseg, error; diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index f3ca919a27e..a959993e491 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.82 2005/11/12 00:23:43 drahn Exp $ */ +/* $OpenBSD: machdep.c,v 1.83 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -491,7 +491,7 @@ cpu_startup() { int sz, i; caddr_t v; - vm_offset_t minaddr, maxaddr; + vaddr_t minaddr, maxaddr; int base, residual; v = (caddr_t)proc0paddr + USPACE; @@ -531,11 +531,11 @@ cpu_startup() residual = 0; } for (i = 0; i < nbuf; i++) { - vm_size_t curbufsize; - vm_offset_t curbuf; + vsize_t curbufsize; + vaddr_t curbuf; struct vm_page *pg; - curbuf = (vm_offset_t)buffers + i * MAXBSIZE; + curbuf = (vaddr_t)buffers + i * MAXBSIZE; curbufsize = PAGE_SIZE * (i < residual ? base + 1 : base); while (curbufsize) { pg = uvm_pagealloc(NULL, 0, NULL, 0); @@ -1222,7 +1222,7 @@ bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) } } -vm_offset_t ppc_kvm_stolen = VM_KERN_ADDRESS_SIZE; +vaddr_t ppc_kvm_stolen = VM_KERN_ADDRESS_SIZE; int bus_mem_add_mapping(bus_addr_t bpa, bus_size_t size, int cacheable, diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c index 0a8d078cfbd..8f421626a0c 100644 --- a/sys/arch/macppc/macppc/mem.c +++ b/sys/arch/macppc/macppc/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.12 2003/10/16 05:03:22 deraadt Exp $ */ +/* $OpenBSD: mem.c,v 1.13 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -104,8 +104,8 @@ mmclose(dev_t dev, int flag, int mode, struct proc *p) int mmrw(dev_t dev, struct uio *uio, int flags) { - vm_offset_t v; - vm_size_t c; + vaddr_t v; + vsize_t c; struct iovec *iov; int error = 0; static caddr_t zeropage; diff --git a/sys/arch/macppc/macppc/ofw_machdep.c b/sys/arch/macppc/macppc/ofw_machdep.c index fb53df2eac7..4258585c8ed 100644 --- a/sys/arch/macppc/macppc/ofw_machdep.c +++ b/sys/arch/macppc/macppc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.26 2005/06/08 19:08:23 drahn Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.27 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -131,9 +131,9 @@ int OF_stdin; */ static int N_mapping; static struct { - vm_offset_t va; + vaddr_t va; int len; - vm_offset_t pa; + paddr_t pa; int mode; } ofw_mapping[256]; @@ -189,8 +189,8 @@ restore_ofw_mapping() ofw_pmap.pm_sr[PPC_KERNEL_SR] = PPC_KERNEL_SEGMENT; for (i = 0; i < N_mapping; i++) { - vm_offset_t pa = ofw_mapping[i].pa; - vm_offset_t va = ofw_mapping[i].va; + paddr_t pa = ofw_mapping[i].pa; + vaddr_t va = ofw_mapping[i].va; int size = ofw_mapping[i].len; if (va < 0xf8000000) /* XXX */ diff --git a/sys/arch/mvme68k/dev/flash.c b/sys/arch/mvme68k/dev/flash.c index 673b216b97f..cb870fb182c 100644 --- a/sys/arch/mvme68k/dev/flash.c +++ b/sys/arch/mvme68k/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.16 2005/11/24 22:43:16 miod Exp $ */ +/* $OpenBSD: flash.c,v 1.17 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -350,9 +350,9 @@ flashread(dev, uio, flags) { int unit = minor(dev); struct flashsoftc *sc = (struct flashsoftc *) flash_cd.cd_devs[unit]; - register vm_offset_t v; - register int c; - register struct iovec *iov; + vaddr_t v; + int c; + struct iovec *iov; int error = 0; while (uio->uio_resid > 0 && error == 0) { @@ -385,9 +385,9 @@ flashwrite(dev, uio, flags) { int unit = minor(dev); struct flashsoftc *sc = (struct flashsoftc *) flash_cd.cd_devs[unit]; - register vm_offset_t v; - register int c, i, r; - register struct iovec *iov; + vaddr_t v; + int c, i, r; + struct iovec *iov; int error = 0; u_char *cmpbuf; int neederase = 0, needwrite = 0; diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c index 708a68ff125..f52f583d86c 100644 --- a/sys/arch/mvme68k/dev/if_ie.c +++ b/sys/arch/mvme68k/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.30 2005/11/24 22:43:16 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.31 2005/12/17 07:31:26 miod Exp $ */ /*- * Copyright (c) 1999 Steve Murphree, Jr. @@ -366,7 +366,7 @@ ie_obreset(arg) ieo->portlow = a >> 16; delay(1000); - pmap_extract(pmap_kernel(), (vm_offset_t)sc->scp, &a); + pmap_extract(pmap_kernel(), (vaddr_t)sc->scp, &a); a |= IE_PORT_NEWSCPADDR; ieo->porthigh = a & 0xffff; t = 0; t = 1; @@ -423,7 +423,7 @@ ieattach(parent, self, aux) /* get the first available etherbuf */ sc->sc_maddr = etherbuf; /* maddr = vaddr */ if (sc->sc_maddr == NULL) panic("ie: too many ethernet boards"); - if (pmap_extract(pmap_kernel(), (vm_offset_t)sc->sc_maddr, &pa) == FALSE) + if (pmap_extract(pmap_kernel(), (vaddr_t)sc->sc_maddr, &pa) == FALSE) panic("ie: pmap_extract"); sc->sc_iobase = (caddr_t)pa; /* iobase = paddr (24 bit) */ @@ -439,7 +439,7 @@ ieattach(parent, self, aux) /*printf("scpV %x iscpV %x scbV %x\n", sc->scp, sc->iscp, sc->scb);*/ sc->scp->ie_bus_use = 0x44; - pmap_extract(pmap_kernel(), (vm_offset_t)sc->iscp, &pa); + pmap_extract(pmap_kernel(), (vaddr_t)sc->iscp, &pa); SWT_32(sc->scp->ie_iscp_ptr, pa); /* * rest of first page is unused (wasted!), rest of ram diff --git a/sys/arch/mvme68k/dev/sbicdma.c b/sys/arch/mvme68k/dev/sbicdma.c index 9ecd0096927..7b7329dc912 100644 --- a/sys/arch/mvme68k/dev/sbicdma.c +++ b/sys/arch/mvme68k/dev/sbicdma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbicdma.c,v 1.12 2004/09/29 19:17:40 miod Exp $ */ +/* $OpenBSD: sbicdma.c,v 1.13 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -163,7 +163,7 @@ sbicdma_dmago(sc, va, count, flags) u_char csr; u_long pa; - pmap_extract(pmap_kernel(), (vm_offset_t)va, &pa); + pmap_extract(pmap_kernel(), (vaddr_t)va, &pa); #ifdef DEBUG if (sbicdma_debug) printf("%s: dmago: va 0x%x pa 0x%x cnt %d flags %x\n", diff --git a/sys/arch/mvme68k/dev/vsreg.h b/sys/arch/mvme68k/dev/vsreg.h index bb179e00e0b..42a2253ebbb 100644 --- a/sys/arch/mvme68k/dev/vsreg.h +++ b/sys/arch/mvme68k/dev/vsreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vsreg.h,v 1.5 2003/09/29 09:08:17 miod Exp $ */ +/* $OpenBSD: vsreg.h,v 1.6 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1990 The Regents of the University of California. @@ -741,12 +741,6 @@ typedef struct ipsg M328_SG vs_alloc_scatter_gather(void); void vs_dealloc_scatter_gather(M328_SG sg); -void vs_link_scatter_gather_element(sg_list_element_t *element, - register vm_offset_t phys_add, - register int len); -void vs_link_scatter_gather_list(sg_list_element_t *list, - register vm_offset_t phys_add, - register int elements); M328_SG vs_build_memory_structure(struct scsi_xfer *xs, M328_IOPB *iopb); #endif /* _M328REG_H_ */ diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 8b620ab133a..239c559fe88 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.93 2005/12/11 17:05:35 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.94 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -118,7 +118,7 @@ char machine[] = MACHINE; /* cpu "architecture" */ struct vm_map *exec_map = NULL; struct vm_map *phys_map = NULL; -extern vm_offset_t avail_end; +extern vaddr_t avail_end; /* * Declare these as initialized data so we can patch them. @@ -197,7 +197,7 @@ caddr_t allocsys(caddr_t); void mvme68k_init() { - extern vm_offset_t avail_start, avail_end; + extern vaddr_t avail_start; /* * Tell the VM system about available physical memory. The @@ -255,7 +255,7 @@ cpu_startup() int base, residual; vaddr_t minaddr, maxaddr; - vm_size_t size; + vsize_t size; #ifdef DEBUG extern int pmapdebug; int opmapdebug = pmapdebug; @@ -268,7 +268,7 @@ cpu_startup() * avail_end was pre-decremented in pmap_bootstrap to compensate. */ for (i = 0; i < btoc(MSGBUFSIZE); i++) - pmap_kenter_pa((vm_offset_t)msgbufp + i * PAGE_SIZE, + pmap_kenter_pa((vaddr_t)msgbufp + i * PAGE_SIZE, avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE); pmap_update(pmap_kernel()); initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE)); @@ -284,7 +284,7 @@ cpu_startup() * Find out how much space we need, allocate it, * and then give everything true virtual addresses. */ - size = (vm_size_t)allocsys((caddr_t)0); + size = (vsize_t)allocsys((caddr_t)0); if ((v = (caddr_t) uvm_km_zalloc(kernel_map, round_page(size))) == 0) panic("startup: no room for tables"); if (allocsys(v) - v != size) @@ -319,7 +319,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 = PAGE_SIZE * ((i < residual) ? (base+1) : base); while (curbufsize) { diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c index 688222b99e9..2a90a1b3b55 100644 --- a/sys/arch/mvme68k/mvme68k/mem.c +++ b/sys/arch/mvme68k/mvme68k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.22 2005/10/27 16:04:08 martin Exp $ */ +/* $OpenBSD: mem.c,v 1.23 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -114,9 +114,9 @@ mmrw(dev, uio, flags) struct uio *uio; int flags; { - register vm_offset_t o, v; - register int c; - register struct iovec *iov; + vaddr_t o, v; + int c; + struct iovec *iov; int error = 0; static int physlock; @@ -153,7 +153,7 @@ mmrw(dev, uio, flags) } #endif - pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, + pmap_enter(pmap_kernel(), (vaddr_t)vmmap, trunc_page(v), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, (uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE) | PMAP_WIRED); @@ -161,8 +161,8 @@ mmrw(dev, uio, flags) o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); - pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, - (vm_offset_t)vmmap + NBPG); + pmap_remove(pmap_kernel(), (vaddr_t)vmmap, + (vaddr_t)vmmap + NBPG); pmap_update(pmap_kernel()); continue; diff --git a/sys/arch/mvme68k/mvme68k/sys_machdep.c b/sys/arch/mvme68k/mvme68k/sys_machdep.c index e234de054d6..ea95554024a 100644 --- a/sys/arch/mvme68k/mvme68k/sys_machdep.c +++ b/sys/arch/mvme68k/mvme68k/sys_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_machdep.c,v 1.18 2005/08/01 11:54:25 miod Exp $ */ +/* $OpenBSD: sys_machdep.c,v 1.19 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -78,7 +78,7 @@ dma_cachectl(addr, len) * Convert to physical address. */ if (pa == 0 || ((int)addr & PGOFSET) == 0) { - pa = kvtop ((vm_offset_t)addr); + pa = kvtop((vaddr_t)addr); } if (inc == 16) { DCFL(pa); diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index 6304314b5e4..a9f12985b3d 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.60 2005/11/12 23:14:03 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.61 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -527,7 +527,7 @@ copyfault: case T_MMUFLT: /* kernel mode page fault */ case T_MMUFLT|T_USER: /* page fault */ { - vm_offset_t va; + vaddr_t va; struct vmspace *vm = NULL; struct vm_map *map; int rv; @@ -561,7 +561,7 @@ copyfault: ftype = VM_PROT_READ | VM_PROT_WRITE; } else vftype = ftype = VM_PROT_READ; - va = trunc_page((vm_offset_t)v); + va = trunc_page((vaddr_t)v); if (map == kernel_map && va == 0) { printf("trap: bad kernel access at %x\n", v); @@ -569,7 +569,7 @@ copyfault: } #ifdef COMPAT_HPUX if (ISHPMMADDR(p, va)) { - vm_offset_t bva; + vaddr_t bva; rv = pmap_mapmulti(map->pmap, va); if (rv) { @@ -700,15 +700,15 @@ writeback(fp, docachepush) if (docachepush) { paddr_t pa; - pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, + pmap_enter(pmap_kernel(), (vaddr_t)vmmap, trunc_page(f->f_fa), VM_PROT_WRITE, VM_PROT_WRITE|PMAP_WIRED); pmap_update(pmap_kernel()); fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF]; bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16); - pmap_extract(pmap_kernel(), (vm_offset_t)fa, &pa); + pmap_extract(pmap_kernel(), (vaddr_t)fa, &pa); DCFL(pa); - pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, - (vm_offset_t)&vmmap[NBPG]); + pmap_remove(pmap_kernel(), (vaddr_t)vmmap, + (vaddr_t)&vmmap[NBPG]); pmap_update(pmap_kernel()); } else printf("WARNING: pid %d(%s) uid %u: CPUSH not done\n", @@ -953,14 +953,14 @@ dumpwb(num, s, a, d) u_int a, d; { register struct proc *p = curproc; - vm_offset_t pa; + paddr_t pa; int tmp; printf(" writeback #%d: VA %x, data %x, SZ=%s, TT=%s, TM=%s\n", num, a, d, f7sz[(s & SSW4_SZMASK) >> 5], f7tt[(s & SSW4_TTMASK) >> 3], f7tm[s & SSW4_TMMASK]); printf(" PA "); - if (pmap_extract(p->p_vmspace->vm_map.pmap, (vm_offset_t)a, &pa) == FALSE) + if (pmap_extract(p->p_vmspace->vm_map.pmap, (vaddr_t)a, &pa) == FALSE) printf("<invalid address>"); else { if (copyin((caddr_t)a, &tmp, sizeof(int)) == 0) diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c index 467e1596c58..30dfdf57234 100644 --- a/sys/arch/mvme68k/mvme68k/vm_machdep.c +++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.39 2005/09/25 22:26:16 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.40 2005/12/17 07:31:26 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -200,7 +200,7 @@ pagemove(from, to, size) caddr_t from, to; size_t size; { - vm_offset_t pa; + paddr_t pa; boolean_t rv; #ifdef DEBUG @@ -208,15 +208,15 @@ pagemove(from, to, size) panic("pagemove"); #endif while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vm_offset_t)from, &pa); + rv = pmap_extract(pmap_kernel(), (vaddr_t)from, &pa); #ifdef DEBUG if (rv == FALSE) panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vm_offset_t)to, NULL) == TRUE) + if (pmap_extract(pmap_kernel(), (vaddr_t)to, NULL) == TRUE) panic("pagemove 3"); #endif - pmap_kremove((vm_offset_t)from, PAGE_SIZE); - pmap_kenter_pa((vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); + pmap_kremove((vaddr_t)from, PAGE_SIZE); + pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); from += PAGE_SIZE; to += PAGE_SIZE; size -= PAGE_SIZE; @@ -270,7 +270,7 @@ kvtop(addr) { paddr_t pa; - if (pmap_extract(pmap_kernel(), (vm_offset_t)addr, &pa) == FALSE) + if (pmap_extract(pmap_kernel(), addr, &pa) == FALSE) panic("kvtop: zero page frame"); return (pa); @@ -286,15 +286,15 @@ kvtop(addr) */ void vmapbuf(bp, siz) - register struct buf *bp; - vm_size_t siz; + struct buf *bp; + vsize_t siz; { - register int npf; - register caddr_t addr; + int npf; + caddr_t addr; struct proc *p; int off; - vm_offset_t kva; - vm_offset_t pa; + vaddr_t kva; + paddr_t pa; #ifdef DIAGNOSTIC if ((bp->b_flags & B_PHYS) == 0) @@ -309,7 +309,7 @@ vmapbuf(bp, siz) bp->b_data = (caddr_t)(kva + off); while (npf--) { if (pmap_extract(vm_map_pmap(&p->p_vmspace->vm_map), - (vm_offset_t)addr, &pa) == FALSE) + (vaddr_t)addr, &pa) == FALSE) panic("vmapbuf: null page frame"); pmap_enter(vm_map_pmap(phys_map), kva, trunc_page(pa), VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); @@ -324,12 +324,12 @@ vmapbuf(bp, siz) */ void vunmapbuf(bp, siz) - register struct buf *bp; - vm_size_t siz; + struct buf *bp; + vsize_t siz; { - register caddr_t addr; - register int npf; - vm_offset_t kva; + caddr_t addr; + int npf; + vaddr_t kva; #ifdef DIAGNOSTIC if ((bp->b_flags & B_PHYS) == 0) @@ -338,7 +338,7 @@ vunmapbuf(bp, siz) addr = bp->b_data; npf = btoc(round_page(bp->b_bcount + ((int)addr & PGOFSET))); - kva = (vm_offset_t)((int)addr & ~PGOFSET); + kva = (vaddr_t)((int)addr & ~PGOFSET); uvm_km_free_wakeup(phys_map, kva, ctob(npf)); bp->b_data = bp->b_saveaddr; bp->b_saveaddr = NULL; diff --git a/sys/arch/mvmeppc/dev/mem.c b/sys/arch/mvmeppc/dev/mem.c index 323a6ae37bb..0f466ec6ab6 100644 --- a/sys/arch/mvmeppc/dev/mem.c +++ b/sys/arch/mvmeppc/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.7 2003/06/02 23:27:53 millert Exp $ */ +/* $OpenBSD: mem.c,v 1.8 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -88,7 +88,7 @@ mmrw(dev, uio, flags) struct uio *uio; int flags; { - vm_offset_t v; + vaddr_t v; u_int c; struct iovec *iov; int error = 0; @@ -110,7 +110,7 @@ mmrw(dev, uio, flags) v = uio->uio_offset; c = uio->uio_resid; /* This doesn't allow device mapping! XXX */ - pmap_real_memory(&v, (vm_size_t *)&c); + pmap_real_memory(&v, (vsize_t *)&c); error = uiomove((caddr_t)v, c, uio); continue; diff --git a/sys/arch/mvmeppc/include/powerpc.h b/sys/arch/mvmeppc/include/powerpc.h index 4b13a038867..2505e197b5e 100644 --- a/sys/arch/mvmeppc/include/powerpc.h +++ b/sys/arch/mvmeppc/include/powerpc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: powerpc.h,v 1.4 2004/01/28 23:50:18 miod Exp $ */ +/* $OpenBSD: powerpc.h,v 1.5 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: powerpc.h,v 1.1 1996/09/30 16:34:30 ws Exp $ */ /* @@ -35,8 +35,8 @@ #define _MACHINE_POWERPC_H_ struct mem_region { - vm_offset_t start; - vm_size_t size; + vaddr_t start; + vsize_t size; }; void mem_regions(struct mem_region **, struct mem_region **); diff --git a/sys/arch/mvmeppc/include/vmparam.h b/sys/arch/mvmeppc/include/vmparam.h index 0304094be49..3f078c85b13 100644 --- a/sys/arch/mvmeppc/include/vmparam.h +++ b/sys/arch/mvmeppc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.14 2005/04/11 15:13:01 deraadt Exp $ */ +/* $OpenBSD: vmparam.h,v 1.15 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ /*- @@ -75,15 +75,15 @@ /* * Would like to have MAX addresses = 0, but this doesn't (currently) work */ -#define VM_MIN_ADDRESS ((vm_offset_t)0) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xfffff000) +#define VM_MIN_ADDRESS ((vaddr_t)0) +#define VM_MAXUSER_ADDRESS ((vaddr_t)0xfffff000) #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT)) +#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT)) /* ppc_kvm_size is so that vm space can be stolen before vm is fully * initialized. */ -extern vm_offset_t ppc_kvm_stolen; +extern vaddr_t ppc_kvm_stolen; #define VM_KERN_ADDRESS_SIZE (PPC_SEGMENT_LENGTH - (32 * 1024 * 1024)) #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + VM_KERN_ADDRESS_SIZE) diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 97a65ac357d..136a530f58b 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.47 2004/11/17 20:26:02 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.48 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -395,7 +395,7 @@ cpu_startup() { int sz, i; caddr_t v; - vm_offset_t minaddr, maxaddr; + vaddr_t minaddr, maxaddr; int base, residual; proc0.p_addr = proc0paddr; @@ -435,11 +435,11 @@ cpu_startup() residual = 0; } for (i = 0; i < nbuf; i++) { - vm_size_t curbufsize; - vm_offset_t curbuf; + vsize_t curbufsize; + vaddr_t curbuf; struct vm_page *pg; - curbuf = (vm_offset_t)buffers + i * MAXBSIZE; + curbuf = (vaddr_t)buffers + i * MAXBSIZE; curbufsize = PAGE_SIZE * (i < residual ? base + 1 : base); while (curbufsize) { pg = uvm_pagealloc(NULL, 0, NULL, 0); diff --git a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c index 539fcbe996a..f0ec63c34a3 100644 --- a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppc1_machdep.c,v 1.15 2004/11/17 20:24:44 miod Exp $ */ +/* $OpenBSD: ppc1_machdep.c,v 1.16 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -59,7 +59,7 @@ unsigned long PPC1_tps(void); int PPC1_clock_read(int *sec, int *min, int *hour, int *day, int *mon, int *yr); int PPC1_clock_write(int sec, int min, int hour, int day, int mon, int yr); -vm_offset_t size_memory(void); +vsize_t size_memory(void); struct firmware ppc1_firmware = { PPC1_mem_regions, @@ -85,20 +85,20 @@ struct mem_region PPC1mem[PPC1_REGIONS + 1], PPC1avail[PPC1_REGIONS + 3]; */ #define MAXPHYSMEM 0x10000000 /* max physical memory */ -vm_offset_t +vsize_t size_memory(void) { volatile unsigned int *look; unsigned int *max; extern char *end; - vm_offset_t total_mem; + vsize_t total_mem; #ifdef USE_BUG - vm_offset_t local_mem; + vsize_t local_mem; #endif #ifdef USE_BUG bugenvrd(); /* read the bug environment */ - local_mem = (vm_offset_t)bug_localmemsize(); + local_mem = (vsize_t)bug_localmemsize(); #endif #define PATTERN 0x5a5a5a5a #define STRIDE (4*1024) /* 4k at a time */ diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h index 9b491d237bc..241c7511fd6 100644 --- a/sys/arch/powerpc/include/db_machdep.h +++ b/sys/arch/powerpc/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.20 2005/01/04 21:14:35 espie Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.21 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */ /* @@ -43,7 +43,7 @@ #define DB_ELF_SYMBOLS #define DB_ELFSIZE 32 -typedef vm_offset_t db_addr_t; /* address - unsigned */ +typedef vaddr_t db_addr_t; /* address - unsigned */ typedef long db_expr_t; /* expression - signed */ struct powerpc_saved_state { struct trapframe tf; diff --git a/sys/arch/powerpc/include/kcore.h b/sys/arch/powerpc/include/kcore.h index a85d9390d51..f3358751568 100644 --- a/sys/arch/powerpc/include/kcore.h +++ b/sys/arch/powerpc/include/kcore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kcore.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */ +/* $OpenBSD: kcore.h,v 1.4 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: kcore.h,v 1.1 1996/09/30 16:34:26 ws Exp $ */ /*- @@ -38,8 +38,8 @@ #define NPHYS_RAM_SEGS 4 typedef struct cpu_kcore_hdr { - vm_offset_t ptable; /* Phys address of page table */ - vm_offset_t potable; /* Phys address of page overflow table */ + paddr_t ptable; /* Phys address of page table */ + paddr_t potable; /* Phys address of page overflow table */ phys_ram_seg_t ram_segs[NPHYS_RAM_SEGS]; } cpu_kcore_hdr_t; diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h index dafc5d78490..67e3c3967ae 100644 --- a/sys/arch/powerpc/include/pmap.h +++ b/sys/arch/powerpc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.40 2005/10/09 14:01:11 drahn Exp $ */ +/* $OpenBSD: pmap.h,v 1.41 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ /*- @@ -129,7 +129,7 @@ void pmap_bootstrap(u_int kernelstart, u_int kernelend); void pmap_pinit(struct pmap *); void pmap_release(struct pmap *); -void pmap_real_memory(vm_offset_t *start, vm_size_t *size); +void pmap_real_memory(vaddr_t *start, vsize_t *size); void switchexit(struct proc *); int pte_spill_v(struct pmap *pm, u_int32_t va, u_int32_t dsisr, int exec_fault); diff --git a/sys/arch/powerpc/include/pte.h b/sys/arch/powerpc/include/pte.h index 3399c422619..652a66471bd 100644 --- a/sys/arch/powerpc/include/pte.h +++ b/sys/arch/powerpc/include/pte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pte.h,v 1.8 2005/10/03 02:18:50 drahn Exp $ */ +/* $OpenBSD: pte.h,v 1.9 2005/12/17 07:31:26 miod Exp $ */ /* $NetBSD: pte.h,v 1.1 1996/09/30 16:34:32 ws Exp $ */ /*- @@ -142,7 +142,7 @@ extern int ptab_cnt; #ifdef _KERNEL #ifndef _LOCORE extern u_int dsisr(void); -extern vm_offset_t dar(void); +extern vaddr_t dar(void); #endif /* _KERNEL */ #endif /* _LOCORE */ #endif /* _POWERPC_PTE_H_ */ diff --git a/sys/arch/powerpc/include/types.h b/sys/arch/powerpc/include/types.h index 78be0235c50..06d6cd0736f 100644 --- a/sys/arch/powerpc/include/types.h +++ b/sys/arch/powerpc/include/types.h @@ -1,5 +1,5 @@ /* $NetBSD: types.h,v 1.1 1996/09/30 16:34:36 ws Exp $ */ -/* $OpenBSD: types.h,v 1.16 2005/12/14 21:46:31 millert Exp $ */ +/* $OpenBSD: types.h,v 1.17 2005/12/17 07:31:26 miod Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -54,9 +54,6 @@ typedef unsigned long long uint64_t; typedef u_int32_t register_t; #if __BSD_VISIBLE -typedef unsigned long vm_size_t; -typedef unsigned long vm_offset_t; - typedef unsigned long vaddr_t; typedef unsigned long paddr_t; typedef unsigned long vsize_t; diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index 91de55a35eb..a6ddbde1610 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.94 2005/11/13 03:56:26 brad Exp $ */ +/* $OpenBSD: pmap.c,v 1.95 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 2001, 2002 Dale Rahn. @@ -2067,7 +2067,7 @@ pmap_protect(pmap_t pm, vaddr_t sva, vaddr_t eva, vm_prot_t prot) * Restrict given range to physical memory */ void -pmap_real_memory(paddr_t *start, vm_size_t *size) +pmap_real_memory(paddr_t *start, vsize_t *size) { struct mem_region *mp; diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index 3a83b497c8e..8c7c3513eca 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.71 2005/10/09 22:33:18 drahn Exp $ */ +/* $OpenBSD: trap.c,v 1.72 2005/12/17 07:31:27 miod Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -313,7 +313,7 @@ trap(struct trapframe *frame) case EXC_DSI: { struct vm_map *map; - vm_offset_t va; + vaddr_t va; int ftype; faultbuf *fb; diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c index c3ff197a4ad..4cf2a8cdaf1 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.39 2005/10/09 14:52:12 drahn Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.40 2005/12/17 07:31:27 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */ /* @@ -78,7 +78,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, size_t stacksize, pcb->pcb_pm = p2->p_vmspace->vm_map.pmap; pmap_extract(pmap_kernel(), - (vm_offset_t)pcb->pcb_pm, (paddr_t *)&pcb->pcb_pmreal); + (vaddr_t)pcb->pcb_pm, (paddr_t *)&pcb->pcb_pmreal); /* * Setup the trap frame for the new process @@ -131,7 +131,7 @@ cpu_swapin(struct proc *p) struct pcb *pcb = &p->p_addr->u_pcb; pmap_extract(pmap_kernel(), - (vm_offset_t)pcb->pcb_pm, (paddr_t *)&pcb->pcb_pmreal); + (vaddr_t)pcb->pcb_pm, (paddr_t *)&pcb->pcb_pmreal); } /* @@ -143,10 +143,10 @@ pagemove(caddr_t from, caddr_t to, size_t size) vaddr_t va; paddr_t pa; - for (va = (vm_offset_t)from; size > 0; size -= NBPG) { + for (va = (vaddr_t)from; size > 0; size -= NBPG) { pmap_extract(pmap_kernel(), va, &pa); pmap_kremove(va, NBPG); - pmap_kenter_pa((vm_offset_t)to, pa, + pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ | VM_PROT_WRITE ); va += NBPG; to += NBPG; @@ -226,17 +226,17 @@ cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, * Map an IO request into kernel virtual address space. */ void -vmapbuf(struct buf *bp, vm_size_t len) +vmapbuf(struct buf *bp, vsize_t len) { - vm_offset_t faddr, taddr, off; - vm_offset_t pa; + vaddr_t faddr, taddr, off; + paddr_t pa; #ifdef DIAGNOSTIC if (!(bp->b_flags & B_PHYS)) panic("vmapbuf"); #endif faddr = trunc_page((vaddr_t)(bp->b_saveaddr = bp->b_data)); - off = (vm_offset_t)bp->b_data - faddr; + off = (vaddr_t)bp->b_data - faddr; len = round_page(off + len); taddr = uvm_km_valloc_wait(phys_map, len); bp->b_data = (caddr_t)(taddr + off); @@ -255,16 +255,16 @@ vmapbuf(struct buf *bp, vm_size_t len) * Free the io map addresses associated with this IO operation. */ void -vunmapbuf(struct buf *bp, vm_size_t len) +vunmapbuf(struct buf *bp, vsize_t len) { - vm_offset_t addr, off; + vaddr_t addr, off; #ifdef DIAGNOSTIC if (!(bp->b_flags & B_PHYS)) panic("vunmapbuf"); #endif addr = trunc_page((vaddr_t)bp->b_data); - off = (vm_offset_t)bp->b_data - addr; + off = (vaddr_t)bp->b_data - addr; len = round_page(off + len); uvm_km_free_wakeup(phys_map, addr, len); bp->b_data = bp->b_saveaddr; diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c index 160df277b6b..031f76d1257 100644 --- a/sys/arch/zaurus/zaurus/zaurus_machdep.c +++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_machdep.c,v 1.21 2005/12/14 15:08:51 uwe Exp $ */ +/* $OpenBSD: zaurus_machdep.c,v 1.22 2005/12/17 07:31:27 miod Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -197,12 +197,11 @@ BootConfig bootconfig; /* Boot config storage */ char *boot_args = NULL; char *boot_file = NULL; -vm_offset_t physical_start; -vm_offset_t physical_freestart; -vm_offset_t physical_freeend; -vm_offset_t physical_end; +paddr_t physical_start; +paddr_t physical_freestart; +paddr_t physical_freeend; +paddr_t physical_end; u_int free_pages; -vm_offset_t pagetables_start; int physmem = 0; /*int debug_flags;*/ @@ -218,7 +217,7 @@ pv_addr_t abtstack; extern pv_addr_t kernelstack; pv_addr_t minidataclean; -vm_offset_t msgbufphys; +paddr_t msgbufphys; extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; @@ -419,7 +418,7 @@ map_io_area(paddr_t pagedir) */ loop = 0; while (l1_sec_table[loop].size) { - vm_size_t sz; + vsize_t sz; #define VERBOSE_INIT_ARM #ifdef VERBOSE_INIT_ARM diff --git a/sys/dev/ic/midway.c b/sys/dev/ic/midway.c index 65ee9fb9937..17f51400d47 100644 --- a/sys/dev/ic/midway.c +++ b/sys/dev/ic/midway.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midway.c,v 1.34 2005/11/09 05:50:25 brad Exp $ */ +/* $OpenBSD: midway.c,v 1.35 2005/12/17 07:31:27 miod Exp $ */ /* (sync'd to midway.c 1.68) */ /* @@ -156,7 +156,7 @@ #if defined(__alpha__) /* XXX XXX NEED REAL DMA MAPPING SUPPORT XXX XXX */ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)(va)) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)(va)) #endif #elif defined(__FreeBSD__) #include <machine/cpufunc.h> /* for rdtsc proto for clock.h below */ diff --git a/sys/dev/pci/if_le_pci.c b/sys/dev/pci/if_le_pci.c index 6818f5bc9a8..98e00e115a7 100644 --- a/sys/dev/pci/if_le_pci.c +++ b/sys/dev/pci/if_le_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le_pci.c,v 1.24 2005/11/23 11:30:14 mickey Exp $ */ +/* $OpenBSD: if_le_pci.c,v 1.25 2005/12/17 07:31:27 miod Exp $ */ /* $NetBSD: if_le_pci.c,v 1.13 1996/10/25 21:33:32 cgd Exp $ */ /*- @@ -71,7 +71,7 @@ #ifdef __alpha__ /* XXX */ /* XXX XXX NEED REAL DMA MAPPING SUPPORT XXX XXX */ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)(va)) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)(va)) #endif int le_pci_match(struct device *, void *, void *); diff --git a/sys/dev/pci/if_lgereg.h b/sys/dev/pci/if_lgereg.h index 65daf1b0537..5a88edfcc52 100644 --- a/sys/dev/pci/if_lgereg.h +++ b/sys/dev/pci/if_lgereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lgereg.h,v 1.4 2004/09/28 04:37:33 brad Exp $ */ +/* $OpenBSD: if_lgereg.h,v 1.5 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -593,5 +593,5 @@ struct lge_softc { #ifdef __alpha__ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)va) #endif diff --git a/sys/dev/pci/if_ngereg.h b/sys/dev/pci/if_ngereg.h index 7d9c8e09ee8..a726a6cedd1 100644 --- a/sys/dev/pci/if_ngereg.h +++ b/sys/dev/pci/if_ngereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ngereg.h,v 1.6 2004/09/28 04:57:48 brad Exp $ */ +/* $OpenBSD: if_ngereg.h,v 1.7 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -718,5 +718,5 @@ struct nge_softc { #ifdef __alpha__ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)va) #endif diff --git a/sys/dev/pci/if_sfreg.h b/sys/dev/pci/if_sfreg.h index a10454d5810..889d29fc4a9 100644 --- a/sys/dev/pci/if_sfreg.h +++ b/sys/dev/pci/if_sfreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sfreg.h,v 1.8 2004/06/01 02:43:28 tedu Exp $ */ +/* $OpenBSD: if_sfreg.h,v 1.9 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1053,5 +1053,5 @@ struct sf_softc { #ifdef __alpha__ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)va) #endif diff --git a/sys/dev/pci/if_stereg.h b/sys/dev/pci/if_stereg.h index 77d0e8651b1..2e6db9ad0a3 100644 --- a/sys/dev/pci/if_stereg.h +++ b/sys/dev/pci/if_stereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stereg.h,v 1.9 2005/04/21 06:48:05 fgsch Exp $ */ +/* $OpenBSD: if_stereg.h,v 1.10 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -539,5 +539,5 @@ struct ste_mii_frame { #ifdef __alpha__ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)va) #endif diff --git a/sys/dev/pci/if_tlreg.h b/sys/dev/pci/if_tlreg.h index d871e50ad67..7765a284a88 100644 --- a/sys/dev/pci/if_tlreg.h +++ b/sys/dev/pci/if_tlreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tlreg.h,v 1.8 2003/06/30 02:52:51 avsm Exp $ */ +/* $OpenBSD: if_tlreg.h,v 1.9 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 1997, 1998 @@ -597,5 +597,5 @@ struct tl_stats { #ifdef __alpha__ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)va) #endif diff --git a/sys/dev/pci/if_wbreg.h b/sys/dev/pci/if_wbreg.h index 6bd85dc4b65..4cb6cff01bf 100644 --- a/sys/dev/pci/if_wbreg.h +++ b/sys/dev/pci/if_wbreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wbreg.h,v 1.7 2004/05/19 11:37:00 brad Exp $ */ +/* $OpenBSD: if_wbreg.h,v 1.8 2005/12/17 07:31:27 miod Exp $ */ /* * Copyright (c) 1997, 1998 @@ -459,5 +459,5 @@ struct wb_softc { #ifdef __alpha__ #undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) +#define vtophys(va) alpha_XXX_dmamap((vaddr_t)va) #endif |