PERFORCE change 147612 for review
Julian Elischer
julian at FreeBSD.org
Sat Aug 16 22:09:23 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=147612
Change 147612 by julian at julian_trafmon1 on 2008/08/16 22:08:53
IFC at 147609
devel an this are now in step again
Affected files ...
.. //depot/projects/vimage/src/sys/cam/scsi/scsi_all.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/pci/pci_pci.c#9 integrate
.. //depot/projects/vimage/src/sys/i386/i386/swtch.s#6 integrate
.. //depot/projects/vimage/src/sys/kern/vfs_cache.c#10 integrate
Differences ...
==== //depot/projects/vimage/src/sys/cam/scsi/scsi_all.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.52 2008/08/07 17:25:05 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.53 2008/08/16 21:26:58 ken Exp $");
#include <sys/param.h>
@@ -65,7 +65,7 @@
#endif /* !_KERNEL */
/*
- * This is the default number of seconds we wait for devices to settle
+ * This is the default number of milliseconds we wait for devices to settle
* after a SCSI bus reset.
*/
#ifndef SCSI_DELAY
==== //depot/projects/vimage/src/sys/dev/pci/pci_pci.c#9 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.52 2008/08/16 20:18:40 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.53 2008/08/16 21:51:54 imp Exp $");
/*
* PCI:PCI bridge support.
@@ -464,7 +464,6 @@
}
} else if (!ok) {
ok = 1; /* subtractive bridge: always ok */
-#if 1
if (pcib_is_nonprefetch_open(sc)) {
if (start < sc->membase && end > sc->memlimit) {
start = sc->membase;
@@ -477,7 +476,6 @@
end = sc->pmemlimit;
}
}
-#endif
}
if (end < start) {
device_printf(dev, "memory: end (%lx) < start (%lx)\n",
==== //depot/projects/vimage/src/sys/i386/i386/swtch.s#6 (text+ko) ====
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/i386/i386/swtch.s,v 1.156 2007/08/22 05:06:14 jkoshy Exp $
+ * $FreeBSD: src/sys/i386/i386/swtch.s,v 1.157 2008/08/16 21:38:46 kmacy Exp $
*/
#include "opt_npx.h"
@@ -88,7 +88,7 @@
movl 8(%esp),%ecx /* New thread */
movl TD_PCB(%ecx),%edx
movl PCB_CR3(%edx),%eax
- movl %eax,%cr3 /* new address space */
+ LOAD_CR3(%eax)
/* set bit in new pm_active */
movl TD_PROC(%ecx),%eax
movl P_VMSPACE(%eax), %ebx
@@ -181,10 +181,10 @@
cmpl %eax,IdlePTD /* Kernel address space? */
#endif
je sw0
- movl %cr3,%ebx /* The same address space? */
+ READ_CR3(%ebx) /* The same address space? */
cmpl %ebx,%eax
je sw0
- movl %eax,%cr3 /* new address space */
+ LOAD_CR3(%eax) /* new address space */
movl %esi,%eax
movl PCPU(CPUID),%esi
SETOP %eax,TD_LOCK(%edi) /* Switchout td_lock */
@@ -211,6 +211,18 @@
SETOP %esi,TD_LOCK(%edi) /* Switchout td_lock */
sw1:
BLOCK_SPIN(%ecx)
+#ifdef XEN
+ pushl %eax
+ pushl %ecx
+ pushl %edx
+ call xen_handle_thread_switch
+ popl %edx
+ popl %ecx
+ popl %eax
+ /*
+ * XXX set IOPL
+ */
+#else
/*
* At this point, we've switched address spaces and are ready
* to load up the rest of the next context.
@@ -259,7 +271,7 @@
movl 12(%esi), %ebx
movl %eax, 8(%edi)
movl %ebx, 12(%edi)
-
+#endif
/* Restore context. */
movl PCB_EBX(%edx),%ebx
movl PCB_ESP(%edx),%esp
@@ -285,7 +297,7 @@
movl _default_ldt,%eax
cmpl PCPU(CURRENTLDT),%eax
je 2f
- lldt _default_ldt
+ LLDT(_default_ldt)
movl %eax,PCPU(CURRENTLDT)
jmp 2f
1:
@@ -389,7 +401,7 @@
* parent's npx state for forks by forgetting to reload.
*/
pushfl
- cli
+ CLI
movl PCPU(FPCURTHREAD),%eax
testl %eax,%eax
je 1f
==== //depot/projects/vimage/src/sys/kern/vfs_cache.c#10 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_cache.c,v 1.122 2008/07/31 16:57:41 csjp Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_cache.c,v 1.123 2008/08/16 21:48:10 alfred Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -199,10 +199,12 @@
/* Scan hash tables for applicable entries */
for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) {
+ CACHE_LOCK();
count = 0;
LIST_FOREACH(ncp, ncpp, nc_hash) {
count++;
}
+ CACHE_UNLOCK();
error = SYSCTL_OUT(req, &count, sizeof(count));
if (error)
return (error);
@@ -231,9 +233,11 @@
/* Scan hash tables for applicable entries */
for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) {
count = 0;
+ CACHE_LOCK();
LIST_FOREACH(ncp, ncpp, nc_hash) {
count++;
}
+ CACHE_UNLOCK();
if (count)
used++;
if (maxlength < count)
More information about the p4-projects
mailing list