PERFORCE change 124337 for review

Ulf Lilleengen lulf at FreeBSD.org
Mon Jul 30 08:05:29 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=124337

Change 124337 by lulf at lulf_carrot on 2007/07/30 08:05:11

	IFC

Affected files ...

.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/Makefile.arm#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/isa/clock.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_kse.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_thread.c#6 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_bus.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_domain.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/kernel.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/mutex.h#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/proc.h#6 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/vmmeter.h#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_meter.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_page.c#8 integrate

Differences ...

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/Makefile.arm#3 (text+ko) ====

@@ -1,7 +1,7 @@
 # Makefile.arm -- with config changes.
 # Copyright 1990 W. Jolitz
 #	from: @(#)Makefile.i386	7.1 5/10/91
-# $FreeBSD: src/sys/conf/Makefile.arm,v 1.33 2007/05/16 17:23:53 wkoszek Exp $
+# $FreeBSD: src/sys/conf/Makefile.arm,v 1.34 2007/07/27 14:42:25 cognet Exp $
 #
 # Makefile for FreeBSD
 #
@@ -66,23 +66,27 @@
 FILES_CPU_FUNC =	$S/$M/$M/cpufunc_asm_arm7tdmi.S \
 	$S/$M/$M/cpufunc_asm_arm8.S $S/$M/$M/cpufunc_asm_arm9.S \
 	$S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \
-	$S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S
+	$S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \
+	$S/$M/$M/cpufunc_asm_xscale_c3.S
 trampoline: ${KERNEL_KO}.tramp
 ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c
 	echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h 
 	sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp
 	sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \
 	ldscript.$M.tramp.noheader
+	echo "#include <machine/asm.h>" >tmphack.S
+	echo "ENTRY(_start)" >>tmphack.S
+	echo "bl _startC" >>tmphack.S
 	${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
 	-g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
 	eval $$(stat -s ${KERNEL_KO}.tmp) && \
 	echo "#define KERNSIZE $$st_size" >>opt_kernname.h
 	${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \
-	$S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S ${FILES_CPU_FUNC} \
-	-o ${KERNEL_KO}.tramp
+	tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
+	${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
 	${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \
-	$S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o \
-	${KERNEL_KO}.tramp.noheader 
+	tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
+	${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader 
 	${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
 	${KERNEL_KO}.tramp.bin 
 	${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp 
@@ -95,15 +99,15 @@
 	echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
 	${CC} -O2 -DKZIP -I. -c $S/kern/inflate.c -o inflate-tramp.o
 	${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \
-	-DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \
-	${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp
+	-DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
+	$S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp
 	${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \
-	-DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \
-	${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
+	-DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
+	$S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
 	${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
 	${KERNEL_KO}.gz.tramp.bin
 	rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \
-	inflate-tramp.o
+	inflate-tramp.o tmphack.S
 
 %BEFORE_DEPEND
 

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/isa/clock.c#5 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/isa/clock.c,v 1.238 2007/07/23 09:42:31 dwmalone Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/isa/clock.c,v 1.239 2007/07/27 09:34:42 dwmalone Exp $");
 
 /*
  * Routines to handle clock hardware.
@@ -703,7 +703,8 @@
 #else
 	ct.year += 2000;
 #endif
-	/* Should we set dow = -1 because some clocks don't set it correctly? */
+	/* Set dow = -1 because some clocks don't set it correctly. */
+	ct.dow = -1;
 	if (clock_ct_to_ts(&ct, &ts)) {
 		printf("Invalid time in clock: check and reset the date!\n");
 		return;

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_kse.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_kse.c,v 1.233 2007/07/23 23:16:53 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_kse.c,v 1.234 2007/07/27 09:21:17 attilio Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,6 +82,23 @@
 }
 
 void
+upcall_reap(void)
+{
+	TAILQ_HEAD(, kse_upcall) zupcalls;
+	struct kse_upcall *ku_item, *ku_tmp;
+
+	TAILQ_INIT(&zupcalls);
+	mtx_lock_spin(&kse_lock);
+	if (!TAILQ_EMPTY(&zombie_upcalls)) {
+		TAILQ_CONCAT(&zupcalls, &zombie_upcalls, ku_link);
+		TAILQ_INIT(&zombie_upcalls);
+	}
+	mtx_unlock_spin(&kse_lock);
+	TAILQ_FOREACH_SAFE(ku_item, &zupcalls, ku_link, ku_tmp)
+		uma_zfree(upcall_zone, ku_item);
+}
+
+void
 upcall_remove(struct thread *td)
 {
 

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_thread.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.251 2007/07/23 14:52:21 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.252 2007/07/27 09:21:17 attilio Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -299,6 +299,9 @@
 			td_first = td_next;
 		}
 	}
+#ifdef KSE
+	upcall_reap();
+#endif
 }
 
 /*

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_bus.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.200 2007/05/23 17:28:21 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.201 2007/07/27 11:59:56 rwatson Exp $");
 
 #include "opt_bus.h"
 
@@ -3464,9 +3464,6 @@
 	int error;
 
 	if (dev->parent != NULL) {
-		if ((flags &~ INTR_ENTROPY) == (INTR_TYPE_NET | INTR_MPSAFE) &&
-		    !debug_mpsafenet)
-			flags &= ~INTR_MPSAFE;
 		error = BUS_SETUP_INTR(dev->parent, dev, r, flags,
 		    filter, handler, arg, cookiep);
 		if (error == 0) {

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_domain.c#3 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_domain.c,v 1.49 2007/05/16 20:41:07 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_domain.c,v 1.50 2007/07/27 11:59:56 rwatson Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -211,13 +211,8 @@
 	if (max_linkhdr < 16)		/* XXX */
 		max_linkhdr = 16;
 
-	if (debug_mpsafenet) {
-		callout_init(&pffast_callout, CALLOUT_MPSAFE);
-		callout_init(&pfslow_callout, CALLOUT_MPSAFE);
-	} else {
-		callout_init(&pffast_callout, 0);
-		callout_init(&pfslow_callout, 0);
-	}
+	callout_init(&pffast_callout, CALLOUT_MPSAFE);
+	callout_init(&pfslow_callout, CALLOUT_MPSAFE);
 
 	mtx_lock(&dom_mtx);
 	KASSERT(domain_init_status == 0, ("domaininit called too late!"));

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/kernel.h#2 (text+ko) ====

@@ -39,7 +39,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)kernel.h	8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/sys/kernel.h,v 1.135 2007/04/09 22:29:13 pjd Exp $
+ * $FreeBSD: src/sys/sys/kernel.h,v 1.136 2007/07/27 11:59:57 rwatson Exp $
  */
 
 #ifndef _SYS_KERNEL_H_
@@ -343,11 +343,6 @@
 #define	TUNABLE_STR_FETCH(path, var, size)			\
 	getenv_string((path), (var), (size))
 
-void	net_warn_not_mpsafe(const char *component);
-#define	NET_NEEDS_GIANT(component)					\
-	SYSINIT(__CONCAT(__net_warn_not_mpsafe_, __LINE__),		\
-	    SI_SUB_SETTINGS, SI_ORDER_SECOND, net_warn_not_mpsafe, component);
-
 struct intr_config_hook {
 	TAILQ_ENTRY(intr_config_hook) ich_links;
 	void	(*ich_func)(void *arg);

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/mutex.h#4 (text+ko) ====

@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  *	from BSDI $Id: mutex.h,v 2.7.2.35 2000/04/27 03:10:26 cp Exp $
- * $FreeBSD: src/sys/sys/mutex.h,v 1.98 2007/07/18 20:46:06 jeff Exp $
+ * $FreeBSD: src/sys/sys/mutex.h,v 1.100 2007/07/28 07:31:30 rwatson Exp $
  */
 
 #ifndef _SYS_MUTEX_H_
@@ -397,35 +397,17 @@
 } while (0)
 
 /*
- * Network MPSAFE temporary workarounds.  When debug_mpsafenet
- * is 1 the network is assumed to operate without Giant on the
- * input path and protocols that require Giant must collect it
- * on entry.  When 0 Giant is grabbed in the network interface
- * ISR's and in the netisr path and there is no need to grab
- * the Giant lock.  Note that, unlike PICKUP_GIANT() and
- * DROP_GIANT(), these macros directly wrap mutex operations
- * without special recursion handling.
- *
- * This mechanism is intended as temporary until everything of
- * importance is properly locked.  Note: the semantics for
- * NET_{LOCK,UNLOCK}_GIANT() are not the same as DROP_GIANT()
- * and PICKUP_GIANT(), as they are plain mutex operations
- * without a recursion counter.
+ * With the advent of fine-grained locking, the Giant lock is no longer
+ * required around the network stack.  These macros exist for historical
+ * reasons, allowing conditional acquisition of Giant based on a debugging
+ * setting, and will be removed.
  */
-extern	int debug_mpsafenet;		/* defined in net/netisr.c */
 #define	NET_LOCK_GIANT() do {						\
-	if (!debug_mpsafenet)						\
-		mtx_lock(&Giant);					\
 } while (0)
 #define	NET_UNLOCK_GIANT() do {						\
-	if (!debug_mpsafenet)						\
-		mtx_unlock(&Giant);					\
 } while (0)
 #define	NET_ASSERT_GIANT() do {						\
-	if (!debug_mpsafenet)						\
-		mtx_assert(&Giant, MA_OWNED);				\
 } while (0)
-#define	NET_CALLOUT_MPSAFE	(debug_mpsafenet ? CALLOUT_MPSAFE : 0)
 
 struct mtx_args {
 	struct mtx	*ma_mtx;

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/proc.h#6 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)proc.h	8.15 (Berkeley) 5/19/95
- * $FreeBSD: src/sys/sys/proc.h,v 1.488 2007/07/23 14:52:22 attilio Exp $
+ * $FreeBSD: src/sys/sys/proc.h,v 1.489 2007/07/27 09:21:18 attilio Exp $
  */
 
 #ifndef _SYS_PROC_H_
@@ -871,6 +871,7 @@
 #ifdef KSE
 void	kse_unlink(struct thread *);
 void	kseinit(void);
+void	upcall_reap(void);
 void	upcall_remove(struct thread *td);
 #endif
 void	cpu_set_upcall(struct thread *td, struct thread *td0);

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/vmmeter.h#5 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)vmmeter.h	8.2 (Berkeley) 7/10/94
- * $FreeBSD: src/sys/sys/vmmeter.h,v 1.32 2007/06/10 21:59:13 attilio Exp $
+ * $FreeBSD: src/sys/sys/vmmeter.h,v 1.33 2007/07/27 20:01:21 alc Exp $
  */
 
 #ifndef _SYS_VMMETER_H_
@@ -72,6 +72,7 @@
 	u_int v_pdwakeups;	/* (f) times daemon has awaken from sleep */
 	u_int v_pdpages;	/* (q) pages analyzed by daemon */
 
+	u_int v_tcached;	/* (q) total pages cached */
 	u_int v_dfree;		/* (q) pages freed by daemon */
 	u_int v_pfree;		/* (q) pages freed by exiting processes */
 	u_int v_tfree;		/* (p) total pages freed */

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_meter.c#5 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_meter.c,v 1.95 2007/07/12 22:23:28 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_meter.c,v 1.96 2007/07/27 20:01:21 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -329,6 +329,8 @@
 	&cnt.v_pdwakeups, 0, vcnt, "IU", "Pagedaemon wakeups");
 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdpages, CTLTYPE_UINT|CTLFLAG_RD,
 	&cnt.v_pdpages, 0, vcnt, "IU", "Pagedaemon page scans");
+SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_tcached, CTLTYPE_UINT|CTLFLAG_RD,
+	&cnt.v_tcached, 0, vcnt, "IU", "Total pages cached");
 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_dfree, CTLTYPE_UINT|CTLFLAG_RD,
 	&cnt.v_dfree, 0, vcnt, "IU", "");
 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pfree, CTLTYPE_UINT|CTLFLAG_RD,

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_page.c#8 (text+ko) ====

@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.352 2007/07/14 21:21:17 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.353 2007/07/27 20:01:21 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1363,6 +1363,7 @@
 	}
 	if (VM_PAGE_INQUEUE1(m, PQ_CACHE))
 		return;
+	cnt.v_tcached++;
 
 	/*
 	 * Remove all pmaps and indicate that the page is not


More information about the p4-projects mailing list