Source-Changes-HG archive

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

[src/trunk]: src/sys Eliminate few references to ltsleep.



details:   https://anonhg.NetBSD.org/src/rev/80ca45d4b2bd
branches:  trunk
changeset: 764947:80ca45d4b2bd
user:      rmind <rmind%NetBSD.org@localhost>
date:      Fri May 13 22:28:40 2011 +0000

description:
Eliminate few references to ltsleep.

diffstat:

 sys/arch/arm/xscale/ixp425_npe.c |  13 +++----------
 sys/dev/ppbus/ppbus_conf.c       |   6 +++---
 2 files changed, 6 insertions(+), 13 deletions(-)

diffs (62 lines):

diff -r d6a29080f645 -r 80ca45d4b2bd sys/arch/arm/xscale/ixp425_npe.c
--- a/sys/arch/arm/xscale/ixp425_npe.c  Fri May 13 22:22:55 2011 +0000
+++ b/sys/arch/arm/xscale/ixp425_npe.c  Fri May 13 22:28:40 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp425_npe.c,v 1.6 2009/10/26 19:16:55 cegger Exp $    */
+/*     $NetBSD: ixp425_npe.c,v 1.7 2011/05/13 22:28:40 rmind Exp $     */
 
 /*-
  * Copyright (c) 2006 Sam Leffler, Errno Consulting
@@ -62,7 +62,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: ixp425_npe.c,v 1.6 2009/10/26 19:16:55 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425_npe.c,v 1.7 2011/05/13 22:28:40 rmind Exp $");
 
 /*
  * Intel XScale Network Processing Engine (NPE) support.
@@ -1384,15 +1384,8 @@
 {
 
        if (!sc->sc_msgwaiting) {
-#if 0
-               /*
-                * This ltsleep() is dangerous because this function may be
-                * called under interrupt context.
-                */
-               ltsleep(sc, 0, "npemh", 0, &sc->sc_lock);
-#else
+               /* XXX interrupt context - cannot sleep */
                delay(1000);    /* wait 1ms (is it ok?)*/
-#endif
        }
        memcpy(msg, sc->sc_msg, sizeof(sc->sc_msg));
        /* NB: sc_msgwaiting != 1 means the ack fetch failed */
diff -r d6a29080f645 -r 80ca45d4b2bd sys/dev/ppbus/ppbus_conf.c
--- a/sys/dev/ppbus/ppbus_conf.c        Fri May 13 22:22:55 2011 +0000
+++ b/sys/dev/ppbus/ppbus_conf.c        Fri May 13 22:28:40 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ppbus_conf.c,v 1.18 2009/11/11 15:34:37 he Exp $ */
+/* $NetBSD: ppbus_conf.c,v 1.19 2011/05/13 22:28:40 rmind Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppbus_conf.c,v 1.18 2009/11/11 15:34:37 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppbus_conf.c,v 1.19 2011/05/13 22:28:40 rmind Exp $");
 
 #include "opt_ppbus.h"
 #include "opt_ppbus_1284.h"
@@ -155,7 +155,7 @@
                printf("%s: IEEE1284 device found.\n", device_xname(self));
                /*
                 * Detect device ID (interrupts must be disabled because we
-                * cannot do a ltsleep() to wait for it - no context)
+                * cannot do a block to wait for it - no context)
                 */
                if (args.capabilities & PPBUS_HAS_INTR) {
                        int val = 0;



Home | Main Index | Thread Index | Old Index