Source-Changes-HG archive

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

[src/cherry-xenmp]: src/sys/arch/xen/xen add locking around mmu flush xpq ops



details:   https://anonhg.NetBSD.org/src/rev/ca81c76dc23e
branches:  cherry-xenmp
changeset: 765630:ca81c76dc23e
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sun Aug 21 11:24:10 2011 +0000

description:
add locking around mmu flush xpq ops

diffstat:

 sys/arch/xen/xen/if_xennet_xenbus.c  |  6 ++++--
 sys/arch/xen/xen/xennetback_xenbus.c |  6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (56 lines):

diff -r 67a8e9cd5f3b -r ca81c76dc23e sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Sat Aug 20 19:22:46 2011 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Sun Aug 21 11:24:10 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.51 2011/05/30 13:03:56 joerg Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.51.2.1 2011/08/21 11:24:10 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.51 2011/05/30 13:03:56 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.51.2.1 2011/08/21 11:24:10 cherry Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -663,7 +663,9 @@
                 * those first!
                 */
                s2 = splvm();
+               xpq_queue_lock();
                xpq_flush_queue();
+               xpq_queue_unlock();             
                splx(s2);
                /* now decrease reservation */
                xenguest_handle(reservation.extent_start) = xennet_pages;
diff -r 67a8e9cd5f3b -r ca81c76dc23e sys/arch/xen/xen/xennetback_xenbus.c
--- a/sys/arch/xen/xen/xennetback_xenbus.c      Sat Aug 20 19:22:46 2011 +0000
+++ b/sys/arch/xen/xen/xennetback_xenbus.c      Sun Aug 21 11:24:10 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xennetback_xenbus.c,v 1.46 2011/05/30 14:34:58 joerg Exp $      */
+/*      $NetBSD: xennetback_xenbus.c,v 1.46.2.1 2011/08/21 11:24:10 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.46 2011/05/30 14:34:58 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.46.2.1 2011/08/21 11:24:10 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -1077,7 +1077,9 @@
                         * we flush those first!
                         */
                        int svm = splvm();
+                       xpq_queue_lock();
                        xpq_flush_queue();
+                       xpq_queue_unlock();
                        splx(svm);
                        mclp[-1].args[MULTI_UVMFLAGS_INDEX] =
                            UVMF_TLB_FLUSH|UVMF_ALL;



Home | Main Index | Thread Index | Old Index