Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips Make this 64-bit paddr_t friendly.



details:   https://anonhg.NetBSD.org/src/rev/e0bbe3fdf55c
branches:  trunk
changeset: 554574:e0bbe3fdf55c
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Oct 29 23:52:22 2003 +0000

description:
Make this 64-bit paddr_t friendly.

diffstat:

 sys/arch/mips/mips/bus_dma.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r d49f58795233 -r e0bbe3fdf55c sys/arch/mips/mips/bus_dma.c
--- a/sys/arch/mips/mips/bus_dma.c      Wed Oct 29 23:41:49 2003 +0000
+++ b/sys/arch/mips/mips/bus_dma.c      Wed Oct 29 23:52:22 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.9 2003/06/29 22:28:36 fvdl Exp $ */
+/*     $NetBSD: bus_dma.c,v 1.10 2003/10/29 23:52:22 simonb Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.9 2003/06/29 22:28:36 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.10 2003/10/29 23:52:22 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -128,7 +128,8 @@
     int *segp, int first)
 {
        bus_size_t sgsize;
-       bus_addr_t curaddr, lastaddr, baddr, bmask;
+       bus_size_t bmask;
+       paddr_t baddr, curaddr, lastaddr;
        vaddr_t vaddr = (vaddr_t)buf;
        int seg;
 
@@ -587,7 +588,7 @@
 #ifdef DIAGNOSTIC
                if (curaddr < low || curaddr >= high) {
                        printf("uvm_pglistalloc returned non-sensical"
-                           " address 0x%lx\n", curaddr);
+                           " address 0x%llx\n", (uint64_t)curaddr);
                        panic("_bus_dmamem_alloc");
                }
 #endif
@@ -733,7 +734,7 @@
                        continue;
                }
 
-               return (mips_btop((caddr_t)segs[i].ds_addr + off));
+               return (mips_btop((paddr_t)segs[i].ds_addr + off));
        }
 
        /* Page not found. */



Home | Main Index | Thread Index | Old Index