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 xengnt_more_entries() can be called from in...



details:   https://anonhg.NetBSD.org/src/rev/a08a3bce32c4
branches:  trunk
changeset: 970981:a08a3bce32c4
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Apr 09 15:54:41 2020 +0000

description:
xengnt_more_entries() can be called from interrupt context so use
kmem_intr_alloc()/free() here

diffstat:

 sys/arch/xen/xen/xengnt.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r abb71252bd54 -r a08a3bce32c4 sys/arch/xen/xen/xengnt.c
--- a/sys/arch/xen/xen/xengnt.c Thu Apr 09 15:24:31 2020 +0000
+++ b/sys/arch/xen/xen/xengnt.c Thu Apr 09 15:54:41 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xengnt.c,v 1.29 2020/04/07 09:05:14 jdolecek Exp $      */
+/*      $NetBSD: xengnt.c,v 1.30 2020/04/09 15:54:41 bouyer Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.29 2020/04/07 09:05:14 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.30 2020/04/09 15:54:41 bouyer Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -170,7 +170,7 @@
                return ENOMEM;
 
        sz = nframes_new * sizeof(u_long);
-       pages = kmem_alloc(sz, KM_NOSLEEP);
+       pages = kmem_intr_alloc(sz, KM_NOSLEEP);
        if (pages == NULL)
                return ENOMEM;
 
@@ -209,7 +209,7 @@
                if (setup.status != GNTST_okay) {
                        aprint_error("%s: setup table returned %d\n",
                            __func__, setup.status);
-                       kmem_free(pages, sz);
+                       kmem_intr_free(pages, sz);
                        return ENOMEM;
                }
        }
@@ -244,7 +244,7 @@
                last_gnt_entry++;
        }
        gnt_nr_grant_frames = nframes_new;
-       kmem_free(pages, sz);
+       kmem_intr_free(pages, sz);
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index