Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc _bus_dma_valloc_skewed(): return a vadd...



details:   https://anonhg.NetBSD.org/src/rev/e0d6599f9d75
branches:  trunk
changeset: 503096:e0d6599f9d75
user:      pk <pk%NetBSD.org@localhost>
date:      Wed Jan 31 15:17:42 2001 +0000

description:
_bus_dma_valloc_skewed(): return a vaddr_t, not error codes; make missing
boundary check return an error, so the caller can decide how to respond.

diffstat:

 sys/arch/sparc/sparc/machdep.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 82ef86cc49e4 -r e0d6599f9d75 sys/arch/sparc/sparc/machdep.c
--- a/sys/arch/sparc/sparc/machdep.c    Wed Jan 31 10:48:18 2001 +0000
+++ b/sys/arch/sparc/sparc/machdep.c    Wed Jan 31 15:17:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.174 2001/01/28 20:48:31 pk Exp $ */
+/*     $NetBSD: machdep.c,v 1.175 2001/01/31 15:17:42 pk Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -1323,8 +1323,11 @@
 #endif
 
        /* XXX - Implement this! */
-       if (boundary)
-               panic("_bus_dma_valloc_skewed: not implemented");
+       if (boundary) {
+               printf("_bus_dma_valloc_skewed: "
+                       "boundary check not implemented");
+               return (0);
+       }
 
        /*
         * First, find a region large enough to contain any aligned chunk
@@ -1332,7 +1335,7 @@
        oversize = size + align - PAGE_SIZE;
        sva = uvm_km_valloc(kernel_map, oversize);
        if (sva == 0)
-               return (ENOMEM);
+               return (0);
 
        /*
         * Compute start of aligned region



Home | Main Index | Thread Index | Old Index