Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen balloon_xenbus_attach: use KM_SLEEP for all...



details:   https://anonhg.NetBSD.org/src/rev/f8e769e7a612
branches:  trunk
changeset: 764377:f8e769e7a612
user:      rmind <rmind%NetBSD.org@localhost>
date:      Mon Apr 18 03:04:31 2011 +0000

description:
balloon_xenbus_attach: use KM_SLEEP for allocation.

Note: please do not use KM_NOSLEEP.

diffstat:

 sys/arch/xen/xen/balloon.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (31 lines):

diff -r 4daa87c1b931 -r f8e769e7a612 sys/arch/xen/xen/balloon.c
--- a/sys/arch/xen/xen/balloon.c        Mon Apr 18 02:16:55 2011 +0000
+++ b/sys/arch/xen/xen/balloon.c        Mon Apr 18 03:04:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: balloon.c,v 1.7 2011/04/18 01:36:25 jym Exp $ */
+/* $NetBSD: balloon.c,v 1.8 2011/04/18 03:04:31 rmind Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
 #define BALLOONDEBUG 0
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: balloon.c,v 1.7 2011/04/18 01:36:25 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: balloon.c,v 1.8 2011/04/18 03:04:31 rmind Exp $");
 
 #include <sys/inttypes.h>
 #include <sys/device.h>
@@ -229,11 +229,7 @@
        sysctl_kern_xen_balloon_setup(sc);
 
        /* List of MFNs passed from/to balloon for inflating/deflating */
-       mfn_list = kmem_alloc(BALLOON_DELTA * sizeof(*mfn_list), KM_NOSLEEP);
-       if (mfn_list == NULL) {
-               aprint_error_dev(self, "could not allocate mfn_list\n");
-               goto error;
-       }
+       mfn_list = kmem_alloc(BALLOON_DELTA * sizeof(*mfn_list), KM_SLEEP);
        sc->sc_mfn_list = mfn_list;
 
        /* Setup xenbus node watch callback */



Home | Main Index | Thread Index | Old Index