Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/arch/xen/i386 Pull up revision 1.8 (requested by bouy...
details: https://anonhg.NetBSD.org/src/rev/6551a14dd855
branches: netbsd-3
changeset: 575940:6551a14dd855
user: tron <tron%NetBSD.org@localhost>
date: Sat May 28 16:28:07 2005 +0000
description:
Pull up revision 1.8 (requested by bouyer in ticket #355):
Always call the xpq_queue*() functions at splvm(), so that it's safe to call
them from interrupt context.
xpq_flush_queue() is called from IPL_NET in if_xennet.c, and
other xpq_queue* functions may be called from interrupt context via
pmap_kenter*(). Should fix port-xen/30153.
Thanks to Jason Thorpe and YAMAMOTO Takashi for enlightments on this issue.
diffstat:
sys/arch/xen/i386/xen_machdep.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r 25b26d56cdc4 -r 6551a14dd855 sys/arch/xen/i386/xen_machdep.c
--- a/sys/arch/xen/i386/xen_machdep.c Sat May 28 16:28:00 2005 +0000
+++ b/sys/arch/xen/i386/xen_machdep.c Sat May 28 16:28:07 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_machdep.c,v 1.6.2.1 2005/04/21 17:09:19 tron Exp $ */
+/* $NetBSD: xen_machdep.c,v 1.6.2.2 2005/05/28 16:28:07 tron Exp $ */
/*
*
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.6.2.1 2005/04/21 17:09:19 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.6.2.2 2005/05/28 16:28:07 tron Exp $");
#include "opt_xen.h"
@@ -94,6 +94,7 @@
{
vaddr_t va;
pt_entry_t *ptp, *maptp;
+ int s;
for (va = base; va < base + entries * sizeof(union descriptor);
va += PAGE_SIZE) {
@@ -104,10 +105,12 @@
entries, ptp, maptp));
PTE_CLEARBITS(ptp, maptp, PG_RW);
}
+ s = splvm();
PTE_UPDATES_FLUSH();
xpq_queue_set_ldt(base, entries);
xpq_flush_queue();
+ splx(s);
}
void
@@ -684,12 +687,14 @@
void
xpq_flush_cache()
{
+ int s = splvm();
XENPRINTK2(("xpq_queue_flush_cache\n"));
xpq_queue[xpq_idx].pa.ptr = MMU_EXTENDED_COMMAND;
xpq_queue[xpq_idx].pa.val = MMUEXT_FLUSH_CACHE;
xpq_increment_idx();
xpq_flush_queue();
+ splx(s);
}
Home |
Main Index |
Thread Index |
Old Index