Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Only allow the bus_dmamem_alloc() code to sleep ...



details:   https://anonhg.NetBSD.org/src/rev/666ba4317bec
branches:  trunk
changeset: 533331:666ba4317bec
user:      drochner <drochner%NetBSD.org@localhost>
date:      Thu Jun 27 18:37:10 2002 +0000

description:
Only allow the bus_dmamem_alloc() code to sleep if no physically contigous
pages are insisted in.
Atm, the pglistalloc code does the same automatically, but this might change.

diffstat:

 sys/dev/pci/agp.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7ef930daef10 -r 666ba4317bec sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Thu Jun 27 18:34:32 2002 +0000
+++ b/sys/dev/pci/agp.c Thu Jun 27 18:37:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp.c,v 1.14 2002/01/22 17:29:36 augustss Exp $        */
+/*     $NetBSD: agp.c,v 1.15 2002/06/27 18:37:10 drochner Exp $        */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.14 2002/01/22 17:29:36 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.15 2002/06/27 18:37:10 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -518,7 +518,8 @@
                        return ENOMEM;
                if (bus_dmamem_alloc(sc->as_dmat, mem->am_size, PAGE_SIZE, 0,
                                     segs, nseg, &mem->am_nseg,
-                                    BUS_DMA_WAITOK) != 0) {
+                                    contigpages > 1 ?
+                                    BUS_DMA_NOWAIT : BUS_DMA_WAITOK) != 0) {
                        free(segs, M_AGP);
                        continue;
                }



Home | Main Index | Thread Index | Old Index