Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/shark Purge vm_offset_t.



details:   https://anonhg.NetBSD.org/src/rev/e6713640178d
branches:  trunk
changeset: 572494:e6713640178d
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Jan 05 10:25:43 2005 +0000

description:
Purge vm_offset_t.

diffstat:

 sys/arch/shark/isa/isa_io.c            |   16 +-
 sys/arch/shark/isa/isa_shark_machdep.c |    6 +-
 sys/arch/shark/ofw/ofrom.c             |   17 +-
 sys/arch/shark/ofw/ofw.c               |  253 ++++++++++++++++----------------
 sys/arch/shark/shark/pccons.c          |   47 +++---
 sys/arch/shark/shark/shark_machdep.c   |   18 +-
 6 files changed, 181 insertions(+), 176 deletions(-)

diffs (truncated from 991 to 300 lines):

diff -r c8c95786562a -r e6713640178d sys/arch/shark/isa/isa_io.c
--- a/sys/arch/shark/isa/isa_io.c       Wed Jan 05 10:10:54 2005 +0000
+++ b/sys/arch/shark/isa/isa_io.c       Wed Jan 05 10:25:43 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_io.c,v 1.3 2003/07/15 03:36:01 lukem Exp $ */
+/*     $NetBSD: isa_io.c,v 1.4 2005/01/05 10:25:43 tsutsui Exp $       */
 
 /*
  * Copyright 1997
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.3 2003/07/15 03:36:01 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.4 2005/01/05 10:25:43 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -223,8 +223,8 @@
 
 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;
@@ -235,16 +235,16 @@
  * (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 -r c8c95786562a -r e6713640178d sys/arch/shark/isa/isa_shark_machdep.c
--- a/sys/arch/shark/isa/isa_shark_machdep.c    Wed Jan 05 10:10:54 2005 +0000
+++ b/sys/arch/shark/isa/isa_shark_machdep.c    Wed Jan 05 10:25:43 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_shark_machdep.c,v 1.4 2003/07/15 03:36:01 lukem Exp $      */
+/*     $NetBSD: isa_shark_machdep.c,v 1.5 2005/01/05 10:25:43 tsutsui Exp $    */
 
 /*
  * Copyright 1997
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_shark_machdep.c,v 1.4 2003/07/15 03:36:01 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_shark_machdep.c,v 1.5 2005/01/05 10:25:43 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -213,7 +213,7 @@
 
 /* isa_init() might eventually become the ISA attach routine */
 void
-isa_init(vm_offset_t isa_io_addr, vm_offset_t isa_mem_addr)
+isa_init(vaddr_t isa_io_addr, vaddr_t isa_mem_addr)
 {
   /* initialize the bus space functions */
   isa_io_init(isa_io_addr, isa_mem_addr);
diff -r c8c95786562a -r e6713640178d sys/arch/shark/ofw/ofrom.c
--- a/sys/arch/shark/ofw/ofrom.c        Wed Jan 05 10:10:54 2005 +0000
+++ b/sys/arch/shark/ofw/ofrom.c        Wed Jan 05 10:25:43 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofrom.c,v 1.11 2003/07/15 03:36:02 lukem Exp $ */
+/*     $NetBSD: ofrom.c,v 1.12 2005/01/05 10:25:43 tsutsui Exp $       */
 
 /*
  * Copyright 1998
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.11 2003/07/15 03:36:02 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.12 2005/01/05 10:25:43 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -54,8 +54,8 @@
 struct ofrom_softc {
        struct device   sc_dev;
        int             enabled;
-       vm_offset_t     base;
-       vm_size_t       size;
+       paddr_t         base;
+       paddr_t         size;
 };
 
 int ofromprobe __P((struct device *, struct cfdata *, void *));
@@ -143,7 +143,8 @@
        struct ofrom_softc *sc;
        int c, error = 0, unit = minor(dev);
        struct iovec *iov;
-       vm_offset_t o, v;
+       paddr_t v;
+       psize_t o;
        extern int physlock;
        extern char *memhook;
 
@@ -182,15 +183,15 @@
                        break;
 
                v = sc->base + uio->uio_offset;
-               pmap_enter(pmap_kernel(), (vm_offset_t)memhook,
+               pmap_enter(pmap_kernel(), (vaddr_t)memhook,
                    trunc_page(v), uio->uio_rw == UIO_READ ?
                    VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED);
                pmap_update(pmap_kernel());
                o = uio->uio_offset & PGOFSET;
                c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
                error = uiomove((caddr_t)memhook + o, c, uio);
-               pmap_remove(pmap_kernel(), (vm_offset_t)memhook,
-                   (vm_offset_t)memhook + PAGE_SIZE);
+               pmap_remove(pmap_kernel(), (vaddr_t)memhook,
+                   (vaddr_t)memhook + PAGE_SIZE);
                pmap_update(pmap_kernel());
        }
 
diff -r c8c95786562a -r e6713640178d sys/arch/shark/ofw/ofw.c
--- a/sys/arch/shark/ofw/ofw.c  Wed Jan 05 10:10:54 2005 +0000
+++ b/sys/arch/shark/ofw/ofw.c  Wed Jan 05 10:25:43 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw.c,v 1.33 2003/11/05 10:09:10 scw Exp $     */
+/*     $NetBSD: ofw.c,v 1.34 2005/01/05 10:25:43 tsutsui Exp $ */
 
 /*
  * Copyright 1997
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.33 2003/11/05 10:09:10 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.34 2005/01/05 10:25:43 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -111,7 +111,7 @@
  */
 extern void dump_spl_masks  __P((void));
 extern void dumpsys        __P((void));
-extern void dotickgrovelling __P((vm_offset_t));
+extern void dotickgrovelling __P((vaddr_t));
 #if defined(SHARK) && (NPC > 0)
 extern void shark_screen_cleanup __P((int));
 #endif
@@ -127,10 +127,10 @@
  *  Exported variables
  */
 /* These should all be in a meminfo structure. */
-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;
 int physmem;
 pv_addr_t systempage;
@@ -141,10 +141,10 @@
 pv_addr_t abtstack;
 pv_addr_t kernelstack;
 
-vm_offset_t msgbufphys;
+paddr_t msgbufphys;
 
 /* for storage allocation, used to be local to ofw_construct_proc0_addrspace */
-static vm_offset_t  virt_freeptr;          
+static vaddr_t  virt_freeptr;      
 
 int ofw_callbacks = 0;         /* debugging counter */
 
@@ -157,42 +157,42 @@
  */
 
 struct mem_region {
-       vm_offset_t start;
-       vm_size_t size;
+       paddr_t start;
+       psize_t size;
 };
 
 struct mem_translation {
-       vm_offset_t virt;
-       vm_size_t size;
-       vm_offset_t phys;
+       vaddr_t virt;
+       vsize_t size;
+       paddr_t phys;
        unsigned int mode;
 };
 
 struct isa_range {
-       vm_offset_t isa_phys_hi;
-       vm_offset_t isa_phys_lo;
-       vm_offset_t parent_phys_start;
-       vm_size_t   isa_size;
+       paddr_t isa_phys_hi;
+       paddr_t isa_phys_lo;
+       paddr_t parent_phys_start;
+       psize_t isa_size;
 };
 
 struct vl_range {
-       vm_offset_t vl_phys_hi;
-       vm_offset_t vl_phys_lo;
-       vm_offset_t parent_phys_start;
-       vm_size_t   vl_size;
+       paddr_t vl_phys_hi;
+       paddr_t vl_phys_lo;
+       paddr_t parent_phys_start;
+       psize_t vl_size;
 };
 
 struct vl_isa_range {
-       vm_offset_t isa_phys_hi;
-       vm_offset_t isa_phys_lo;
-       vm_offset_t parent_phys_hi;
-       vm_offset_t parent_phys_lo;
-       vm_size_t   isa_size;
+       paddr_t isa_phys_hi;
+       paddr_t isa_phys_lo;
+       paddr_t parent_phys_hi;
+       paddr_t parent_phys_lo;
+       psize_t isa_size;
 };
 
 struct dma_range {
-       vm_offset_t start;
-       vm_size_t   size;
+       paddr_t start;
+       psize_t   size;
 };
 
 struct ofw_cbargs {
@@ -222,21 +222,21 @@
 static void ofw_construct_proc0_addrspace __P((pv_addr_t *));
 static void ofw_getphysmeminfo __P((void));
 static void ofw_getvirttranslations __P((void));
-static void *ofw_malloc(vm_size_t size);
-static void ofw_claimpages __P((vm_offset_t *, pv_addr_t *, vm_size_t));
-static void ofw_discardmappings __P ((vm_offset_t, vm_offset_t, vm_size_t));
+static void *ofw_malloc(vsize_t size);
+static void ofw_claimpages __P((vaddr_t *, pv_addr_t *, vsize_t));
+static void ofw_discardmappings __P ((vaddr_t, vaddr_t, vsize_t));
 static int ofw_mem_ihandle  __P((void));
 static int ofw_mmu_ihandle  __P((void));
-static vm_offset_t ofw_claimphys __P((vm_offset_t, vm_size_t, vm_offset_t));
+static paddr_t ofw_claimphys __P((paddr_t, psize_t, paddr_t));
 #if 0
-static vm_offset_t ofw_releasephys __P((vm_offset_t, vm_size_t));
+static paddr_t ofw_releasephys __P((paddr_t, psize_t));
 #endif
-static vm_offset_t ofw_claimvirt __P((vm_offset_t, vm_size_t, vm_offset_t));
-static void ofw_settranslation __P ((vm_offset_t, vm_offset_t, vm_size_t, int));
+static vaddr_t ofw_claimvirt __P((vaddr_t, vsize_t, vaddr_t));
+static void ofw_settranslation __P ((vaddr_t, paddr_t, vsize_t, int));
 static void ofw_initallocator __P((void));
-static void ofw_configisaonly __P((vm_offset_t *, vm_offset_t *));
-static void ofw_configvl __P((int, vm_offset_t *, vm_offset_t *));
-static vm_offset_t ofw_valloc __P((vm_offset_t, vm_offset_t));
+static void ofw_configisaonly __P((paddr_t *, paddr_t *));
+static void ofw_configvl __P((int, paddr_t *, paddr_t *));
+static vaddr_t ofw_valloc __P((vsize_t, vaddr_t));
 
 
 /*
@@ -556,11 +556,12 @@
 #endif
 }
 
-vm_offset_t
+paddr_t
 ofw_getcleaninfo(void)
 {
        int cpu;
-       vm_offset_t vclean, pclean;
+       vaddr_t vclean;
+       paddr_t pclean;
 
        if ((cpu = OF_finddevice("/cpu")) == -1)
                panic("no /cpu from OFW");



Home | Main Index | Thread Index | Old Index