CVS commit: src/sys/arch/xen

2011-08-10 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Aug 10 21:46:02 UTC 2011

Modified Files:
src/sys/arch/xen/include: hypervisor.h
src/sys/arch/xen/x86: hypervisor_machdep.c
src/sys/arch/xen/xen: evtchn.c

Log Message:
refactor the bitstring/mask operations to be behind an API. Make pending 
interrupt marking cpu aware.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/xen/include/hypervisor.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/xen/x86/hypervisor_machdep.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/xen/xen/evtchn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/include/hypervisor.h
diff -u src/sys/arch/xen/include/hypervisor.h:1.31 src/sys/arch/xen/include/hypervisor.h:1.32
--- src/sys/arch/xen/include/hypervisor.h:1.31	Mon Oct 19 18:41:10 2009
+++ src/sys/arch/xen/include/hypervisor.h	Wed Aug 10 21:46:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor.h,v 1.31 2009/10/19 18:41:10 bouyer Exp $	*/
+/*	$NetBSD: hypervisor.h,v 1.32 2011/08/10 21:46:02 cherry Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -91,6 +91,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #undef u8
@@ -136,7 +137,8 @@
 void hypervisor_mask_event(unsigned int);
 void hypervisor_clear_event(unsigned int);
 void hypervisor_enable_ipl(unsigned int);
-void hypervisor_set_ipending(uint32_t, int, int);
+void hypervisor_set_ipending(struct cpu_info *, 
+			 uint32_t, int, int);
 void hypervisor_machdep_attach(void);
 
 /* 

Index: src/sys/arch/xen/x86/hypervisor_machdep.c
diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.14 src/sys/arch/xen/x86/hypervisor_machdep.c:1.15
--- src/sys/arch/xen/x86/hypervisor_machdep.c:1.14	Wed Mar 30 21:53:58 2011
+++ src/sys/arch/xen/x86/hypervisor_machdep.c	Wed Aug 10 21:46:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor_machdep.c,v 1.14 2011/03/30 21:53:58 jym Exp $	*/
+/*	$NetBSD: hypervisor_machdep.c,v 1.15 2011/08/10 21:46:02 cherry Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.14 2011/03/30 21:53:58 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.15 2011/08/10 21:46:02 cherry Exp $");
 
 #include 
 #include 
@@ -86,13 +86,79 @@
 // #define PORT_DEBUG 4
 // #define EARLY_DEBUG_EVENT
 
+/* callback function type */
+typedef void (*iterate_func_t)(struct cpu_info *, unsigned int,
+			   unsigned int, unsigned int, void *);
+
+static inline void
+evt_iterate_bits(struct cpu_info *ci, volatile unsigned long *pendingl1,
+		 volatile unsigned long *pendingl2, 
+		 volatile unsigned long *mask,
+		 iterate_func_t iterate_pending, void *iterate_args)
+{
+
+	KASSERT(pendingl1 != NULL);
+	KASSERT(pendingl2 != NULL);
+	
+	unsigned long l1, l2;
+	unsigned int l1i, l2i, port;
+
+	l1 = xen_atomic_xchg(pendingl1, 0);
+	while ((l1i = xen_ffs(l1)) != 0) {
+		l1i--;
+		l1 &= ~(1UL << l1i);
+
+		l2 = pendingl2[l1i] & (mask != NULL ? ~mask[l1i] : -1UL);
+
+		if (mask != NULL) xen_atomic_setbits_l(&mask[l1i], l2);
+		xen_atomic_clearbits_l(&pendingl2[l1i], l2);
+
+		while ((l2i = xen_ffs(l2)) != 0) {
+			l2i--;
+			l2 &= ~(1UL << l2i);
+
+			port = (l1i << LONG_SHIFT) + l2i;
+
+			iterate_pending(ci, port, l1i, l2i, iterate_args);
+		}
+	}
+}
+
+/*
+ * Set per-cpu "pending" information for outstanding events that
+ * cannot be processed now.
+ */
+   
+static inline void
+evt_set_pending(struct cpu_info *ci, unsigned int port, unsigned int l1i,
+		unsigned int l2i, void *args)
+{
+
+	KASSERT(args != NULL);
+	KASSERT(ci != NULL);
+
+	int *ret = args;
+
+	if (evtsource[port]) {
+		hypervisor_set_ipending(ci, evtsource[port]->ev_imask,
+		l1i, l2i);
+		evtsource[port]->ev_evcnt.ev_count++;
+		if (*ret == 0 && ci->ci_ilevel <
+		evtsource[port]->ev_maxlevel)
+			*ret = 1;
+	}
+#ifdef DOM0OPS
+	else  {
+		/* set pending event */
+		xenevt_setipending(l1i, l2i);
+	}
+#endif
+}
+
 int stipending(void);
 int
 stipending(void)
 {
-	unsigned long l1;
-	unsigned long l2;
-	unsigned int l1i, l2i, port;
 	volatile shared_info_t *s = HYPERVISOR_shared_info;
 	struct cpu_info *ci;
 	volatile struct vcpu_info *vci;
@@ -120,45 +186,16 @@
 	 * we're only called after STIC, so we know that we'll have to
 	 * STI at the end
 	 */
+
 	while (vci->evtchn_upcall_pending) {
 		cli();
+
 		vci->evtchn_upcall_pending = 0;
-		/* NB. No need for a barrier here -- XCHG is a barrier
-		 * on x86. */
-		l1 = xen_atomic_xchg(&vci->evtchn_pending_sel, 0);
-		while ((l1i = xen_ffs(l1)) != 0) {
-			l1i--;
-			l1 &= ~(1UL << l1i);
-
-			l2 = s->evtchn_pending[l1i] & ~s->evtchn_mask[l1i];
-			/*
-			 * mask and clear event. More efficient than calling
-			 * hypervisor_mask/clear_event for each event.
-			 */
-			xen_atomic_setbits_l(&s->evtchn_mask[l1i], l2);
-			xen_atomic_clearbits_l(&s->evtchn_pending[l1i], l2);
-			while ((l2i = xen_ffs(l2)) != 0) {
-l2i--;
-l2 &= ~(1UL << l2

CVS commit: src/sys/arch/xen/x86

2011-08-10 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Aug 10 20:38:45 UTC 2011

Modified Files:
src/sys/arch/xen/x86: xen_ipi.c

Log Message:
KNF police (rmind@ :-)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/xen/x86/xen_ipi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.2 src/sys/arch/xen/x86/xen_ipi.c:1.3
--- src/sys/arch/xen/x86/xen_ipi.c:1.2	Wed Aug 10 11:39:46 2011
+++ src/sys/arch/xen/x86/xen_ipi.c	Wed Aug 10 20:38:45 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.2 2011/08/10 11:39:46 cherry Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.3 2011/08/10 20:38:45 cherry Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.2 2011/08/10 11:39:46 cherry Exp $"); 
+ * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.3 2011/08/10 20:38:45 cherry Exp $"); 
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.2 2011/08/10 11:39:46 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.3 2011/08/10 20:38:45 cherry Exp $");
 
 #include 
 
@@ -96,14 +96,11 @@
 		ci->ci_ipi_events[bit].ev_count++;
 		if (ipifunc[bit] != NULL) {
 			(*ipifunc[bit])(ci, regs);
-		}
-		else {
+		} else {
 			panic("ipifunc[%d] unsupported!\n", bit);
 			/* NOTREACHED */
 		}
 	}
-
-	return;
 }
 
 /* Must be called once for every cpu that expects to send/recv ipis */
@@ -119,7 +116,8 @@
 	vcpu = ci->ci_cpuid;
 	KASSERT(vcpu < MAX_VIRT_CPUS);
 
-	evtchn = ci->ci_ipi_evtchn = bind_vcpu_to_evtch(vcpu);
+	evtchn = bind_vcpu_to_evtch(vcpu);
+	ci->ci_ipi_evtchn = evtchn;
 
 	KASSERT(evtchn != -1 && evtchn < NR_EVENT_CHANNELS);
 
@@ -130,7 +128,6 @@
 	}
 
 	hypervisor_enable_event(evtchn);
-	return;
 }
 
 /* prefer this to global variable */
@@ -148,8 +145,7 @@
 
 	if (ipimask & ~masks) {
 		return false;
-	}
-	else {
+	} else {
 		return true;
 	}
 
@@ -162,15 +158,14 @@
 
 	KASSERT(ci != NULL || ci != curcpu());
 
-	if (!(ci->ci_flags & CPUF_RUNNING)) {
+	if ((ci->ci_flags & CPUF_RUNNING) != 0) {
 		return ENOENT;
 	}
 
 	evtchn = ci->ci_ipi_evtchn;
-	if (false == valid_ipimask(ipimask)) {
-		panic("xen_send_ipi() called with invalid ipimask\n");
-		/* NOTREACHED */
-	}
+
+	KASSERTMSG(valid_ipimask(ipimask) == true, 
+		("xen_send_ipi() called with invalid ipimask\n"));
 
 	atomic_or_32(&ci->ci_ipis, ipimask);
 	hypervisor_notify_via_evtchn(evtchn);
@@ -184,10 +179,8 @@
 	struct cpu_info *ci, *self = curcpu();
 	CPU_INFO_ITERATOR cii;
 
-	if (false == valid_ipimask(ipimask)) {
-		panic("xen_broadcast_ipi() called with invalid ipimask\n");
-		/* NOTREACHED */
-	}
+	KASSERTMSG(valid_ipimask(ipimask) == true, 
+		("xen_broadcast_ipi() called with invalid ipimask\n"));
 
 	/* 
 	 * XXX-cherry: there's an implicit broadcast sending order
@@ -211,9 +204,6 @@
 			}
 		}
 	}
-
-	return;
-	/* NOTREACHED */
 }
 
 /* MD wrapper for the xcall(9) callback. */
@@ -228,7 +218,6 @@
 		panic("vcpu%" PRIuCPUID "shutdown failed.\n", ci->ci_cpuid);
 	}
 
-	return;
 }
 
 static void
@@ -242,7 +231,6 @@
 #else
 	npxsave_cpu(true);
 #endif /* __x86_64__ */
-	return;
 }
 
 static void
@@ -291,7 +279,6 @@
 	KASSERT(intrf != NULL);
 
 	xc_ipi_handler();
-	return;
 }
 
 void
@@ -304,7 +291,7 @@
 	if (ci) {
 		if (0 != xen_send_ipi(ci, XEN_IPI_XCALL)) {
 			panic("xen_send_ipi(XEN_IPI_XCALL) failed\n");
-		};
+		}
 	} else {
 		xen_broadcast_ipi(XEN_IPI_XCALL);
 	}



CVS commit: src/sys/fs/union

2011-08-10 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 10 15:56:01 UTC 2011

Modified Files:
src/sys/fs/union: union_subr.c

Log Message:
Update the (shared) v_interlock if the upper node changes.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/fs/union/union_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.45 src/sys/fs/union/union_subr.c:1.46
--- src/sys/fs/union/union_subr.c:1.45	Wed Aug 10 06:19:54 2011
+++ src/sys/fs/union/union_subr.c	Wed Aug 10 15:56:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_subr.c,v 1.45 2011/08/10 06:19:54 hannken Exp $	*/
+/*	$NetBSD: union_subr.c,v 1.46 2011/08/10 15:56:01 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.45 2011/08/10 06:19:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.46 2011/08/10 15:56:01 hannken Exp $");
 
 #include 
 #include 
@@ -223,6 +223,12 @@
 
 		un->un_uppervp = uppervp;
 		un->un_uppersz = VNOVAL;
+		/* Update union vnode interlock. */
+		if (uppervp != NULL) {
+			mutex_obj_hold(uppervp->v_interlock);
+			uvm_obj_setlock(&UNIONTOV(un)->v_uobj,
+			uppervp->v_interlock);
+		}
 	}
 
 	if (docache && (ohash != nhash)) {



CVS commit: src/sbin/newfs_v7fs

2011-08-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Aug 10 12:13:20 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: newfs_v7fs.c

Log Message:
Sync usage with man page.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sbin/newfs_v7fs/newfs_v7fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/newfs_v7fs.c
diff -u src/sbin/newfs_v7fs/newfs_v7fs.c:1.2 src/sbin/newfs_v7fs/newfs_v7fs.c:1.3
--- src/sbin/newfs_v7fs/newfs_v7fs.c:1.2	Wed Aug 10 11:31:49 2011
+++ src/sbin/newfs_v7fs/newfs_v7fs.c	Wed Aug 10 12:13:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: newfs_v7fs.c,v 1.2 2011/08/10 11:31:49 uch Exp $ */
+/*	$NetBSD: newfs_v7fs.c,v 1.3 2011/08/10 12:13:20 wiz Exp $ */
 
 /*-
  * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: newfs_v7fs.c,v 1.2 2011/08/10 11:31:49 uch Exp $");
+__RCSID("$NetBSD: newfs_v7fs.c,v 1.3 2011/08/10 12:13:20 wiz Exp $");
 #endif /* not lint */
 
 #include 
@@ -233,10 +233,8 @@
 usage(void)
 {
 
-	(void)fprintf(stderr, "usage: \n%s [-vP] [-n maxfile]"
-	" [-B endian] special\n", getprogname());
-	(void)fprintf(stderr, "%s -F -s partsize [-vPZ] [-n maxfile]"
-	" [-B endian] file\n", getprogname());
+	(void)fprintf(stderr, "usage: \n%s [-FZ] [-B byte-order]"
+	" [-n inodes] [-s sectors] [-V verbose] special\n", getprogname());
 
 	exit(EXIT_FAILURE);
 }



CVS commit: src/sys/arch

2011-08-10 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Aug 10 11:39:46 UTC 2011

Modified Files:
src/sys/arch/amd64/amd64: fpu.c machdep.c
src/sys/arch/i386/isa: npx.c
src/sys/arch/x86/x86: x86_machdep.c
src/sys/arch/xen/conf: files.xen
src/sys/arch/xen/include: intr.h
Added Files:
src/sys/arch/xen/x86: xen_ipi.c

Log Message:
xen ipi infrastructure


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amd64/amd64/fpu.c
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/i386/isa/npx.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/xen/conf/files.xen
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/xen/include/intr.h
cvs rdiff -u -r0 -r1.2 src/sys/arch/xen/x86/xen_ipi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/fpu.c
diff -u src/sys/arch/amd64/amd64/fpu.c:1.35 src/sys/arch/amd64/amd64/fpu.c:1.36
--- src/sys/arch/amd64/amd64/fpu.c:1.35	Fri Jul  1 19:24:14 2011
+++ src/sys/arch/amd64/amd64/fpu.c	Wed Aug 10 11:39:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.35 2011/07/01 19:24:14 dyoung Exp $	*/
+/*	$NetBSD: fpu.c,v 1.36 2011/08/10 11:39:44 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -100,7 +100,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.35 2011/07/01 19:24:14 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.36 2011/08/10 11:39:44 cherry Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -406,7 +406,11 @@
 			break;
 		}
 		splx(s);
+#ifdef XEN
+		xen_send_ipi(oci, XEN_IPI_SYNCH_FPU);
+#else /* XEN */
 		x86_send_ipi(oci, X86_IPI_SYNCH_FPU);
+#endif
 		while (pcb->pcb_fpcpu == oci && ticks == hardclock_ticks) {
 			x86_pause();
 			spins++;

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.162 src/sys/arch/amd64/amd64/machdep.c:1.163
--- src/sys/arch/amd64/amd64/machdep.c:1.162	Sun Jul 17 15:16:58 2011
+++ src/sys/arch/amd64/amd64/machdep.c	Wed Aug 10 11:39:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.162 2011/07/17 15:16:58 jym Exp $	*/
+/*	$NetBSD: machdep.c,v 1.163 2011/08/10 11:39:45 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.162 2011/07/17 15:16:58 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.163 2011/08/10 11:39:45 cherry Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -719,7 +719,11 @@
 #endif /* XEN */
 	}
 
+#ifdef XEN
+	xen_broadcast_ipi(XEN_IPI_HALT);
+#else /* XEN */
 	x86_broadcast_ipi(X86_IPI_HALT);
+#endif
 
 	if (howto & RB_HALT) {
 #if NACPICA > 0

Index: src/sys/arch/i386/isa/npx.c
diff -u src/sys/arch/i386/isa/npx.c:1.140 src/sys/arch/i386/isa/npx.c:1.141
--- src/sys/arch/i386/isa/npx.c:1.140	Tue Jun  7 14:53:03 2011
+++ src/sys/arch/i386/isa/npx.c	Wed Aug 10 11:39:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: npx.c,v 1.140 2011/06/07 14:53:03 bouyer Exp $	*/
+/*	$NetBSD: npx.c,v 1.141 2011/08/10 11:39:45 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.140 2011/06/07 14:53:03 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.141 2011/08/10 11:39:45 cherry Exp $");
 
 #if 0
 #define IPRINTF(x)	printf x
@@ -719,7 +719,11 @@
 			break;
 		}
 		splx(s);
+#ifdef XEN
+		xen_send_ipi(oci, XEN_IPI_SYNCH_FPU);
+#else /* XEN */
 		x86_send_ipi(oci, X86_IPI_SYNCH_FPU);
+#endif
 		while (pcb->pcb_fpcpu == oci &&
 		ticks == hardclock_ticks) {
 			x86_pause();

Index: src/sys/arch/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.53 src/sys/arch/x86/x86/x86_machdep.c:1.54
--- src/sys/arch/x86/x86/x86_machdep.c:1.53	Mon Aug  1 11:26:31 2011
+++ src/sys/arch/x86/x86/x86_machdep.c	Wed Aug 10 11:39:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.53 2011/08/01 11:26:31 jmcneill Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.54 2011/08/10 11:39:45 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.53 2011/08/01 11:26:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.54 2011/08/10 11:39:45 cherry Exp $");
 
 #include "opt_modular.h"
 #include "opt_physmem.h"
@@ -204,10 +204,13 @@
 	if (l == ci->ci_data.cpu_idlelwp) {
 		if (ci == cur)
 			return;
-#ifndef XEN /* XXX review when Xen gets MP support */
-		if (x86_cpu_idle_ipi != false)
+		if (x86_cpu_idle_ipi != false) {
+#ifdef XEN
+			xen_send_ipi(ci, XEN_IPI_KICK);
+#else /* XEN */
 			x86_send_ipi(ci, 0);
-#endif
+#endif /* XEN */
+		}
 		return;
 	}
 
@@ -228,7 +231,11 @@
 		return;
 	}
 	if ((flags & RESCHED_IMMED) != 0) {
+#ifdef XEN
+		xen_send_ipi(ci, XEN_IPI_KICK);
+#else /* XEN */
 		x8

CVS commit: src

2011-08-10 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Wed Aug 10 11:31:49 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c newfs_v7fs.8 newfs_v7fs.c newfs_v7fs.h
src/usr.sbin/makefs: v7fs.c v7fs_makefs.h
src/usr.sbin/makefs/v7fs: v7fs_estimate.c v7fs_populate.c

Log Message:
newfs_v7fs(8)'s -v and -P options are obsolete. changed to newfs(8) compatible 
-V option.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/newfs_v7fs/main.c
cvs rdiff -u -r1.2 -r1.3 src/sbin/newfs_v7fs/newfs_v7fs.8
cvs rdiff -u -r1.1 -r1.2 src/sbin/newfs_v7fs/newfs_v7fs.c \
src/sbin/newfs_v7fs/newfs_v7fs.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makefs/v7fs.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makefs/v7fs_makefs.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makefs/v7fs/v7fs_estimate.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makefs/v7fs/v7fs_populate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.9 src/sbin/newfs_v7fs/main.c:1.10
--- src/sbin/newfs_v7fs/main.c:1.9	Tue Aug  9 11:18:28 2011
+++ src/sbin/newfs_v7fs/main.c	Wed Aug 10 11:31:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.9 2011/08/09 11:18:28 uch Exp $	*/
+/*	$NetBSD: main.c,v 1.10 2011/08/10 11:31:49 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.9 2011/08/09 11:18:28 uch Exp $");
+__RCSID("$NetBSD: main.c,v 1.10 2011/08/10 11:31:49 uch Exp $");
 #endif /* not lint */
 
 #include 
@@ -54,7 +54,8 @@
 #include "newfs_v7fs.h"
 #include "progress.h" /*../sbin/fsck */
 
-#define	VPRINTF(fmt, args...)	{ if (verbose) printf(fmt, ##args); }
+#define	VPRINTF(lv, fmt, args...)	{ if (v7fs_newfs_verbose >= lv)	\
+	printf(fmt, ##args); }
 
 static v7fs_daddr_t
 determine_ilist_size(v7fs_daddr_t volume_size, int32_t files)
@@ -170,14 +171,14 @@
 		progress(0);
 		if (j == (int32_t)fs->superblock.volume_size)
 		{
-			VPRINTF("\nlast freeblock #%d\n",
+			VPRINTF(4, "\nlast freeblock #%d\n",
 			(*val32)(fb->freeblock[i + 1]));
 
 			memmove(fb->freeblock + 1, fb->freeblock + i + 1, k *
 			sizeof(v7fs_daddr_t));
 			fb->freeblock[0] = 0; /* Terminate link; */
 			fb->nfreeblock = (*val16)(k + 1);
-			VPRINTF("last freeblock contains #%d\n",
+			VPRINTF(4, "last freeblock contains #%d\n",
 			(*val16)(fb->nfreeblock));
 			fs->io.write(fs->io.cookie, buf, listblk);
 			return 0;
@@ -207,7 +208,7 @@
 	int32_t i, j;
 
 	/* Setup ilist. (ilist must be zero filled. becuase of they are free) */
-	VPRINTF("Zero clear ilist.\n");
+	VPRINTF(4, "Zero clear ilist.\n");
 	progress(&(struct progress_arg){ .label = "zero ilist", .tick =
 	ilist_size / PROGRESS_BAR_GRANULE });
 	memset(buf, 0, sizeof buf);
@@ -218,7 +219,7 @@
 #ifndef HAVE_NBTOOL_CONFIG_H
 	progress_done();
 #endif
-	VPRINTF("\n");
+	VPRINTF(4, "\n");
 
 	/* Construct superblock */
 	sb = &fs->superblock;
@@ -227,14 +228,14 @@
 	sb->update_time = time(NULL);
 
 	/* fill free inode cache. */
-	VPRINTF("Setup inode cache.\n");
+	VPRINTF(4, "Setup inode cache.\n");
 	sb->nfreeinode = V7FS_MAX_FREEINODE;
 	for (i = V7FS_MAX_FREEINODE - 1, j = V7FS_ROOT_INODE; i >= 0; i--, j++)
 		sb->freeinode[i] = j;
 	sb->total_freeinode = ilist_size * V7FS_INODE_PER_BLOCK - 1;
 
 	/* fill free block cache. */
-	VPRINTF("Setup free block cache.\n");
+	VPRINTF(4, "Setup free block cache.\n");
 	sb->nfreeblock = V7FS_MAX_FREEBLOCK;
 	for (i = V7FS_MAX_FREEBLOCK - 1, j = sb->datablock_start_sector; i >= 0;
 	i--, j++)
@@ -251,7 +252,7 @@
 	}
 
 	/* Construct freeblock list */
-	VPRINTF("Setup whole freeblock list.\n");
+	VPRINTF(4, "Setup whole freeblock list.\n");
 	progress(&(struct progress_arg){ .label = "freeblock list", .tick =
 	(volume_size - sb->datablock_start_sector) / PROGRESS_BAR_GRANULE});
 	blk = sb->freeblock[0];
@@ -261,7 +262,7 @@
 	progress_done();
 #endif
 
-	VPRINTF("done.\n");
+	VPRINTF(4, "done.\n");
 
 	return 0;
 }
@@ -283,7 +284,7 @@
 
 	ilist_size = determine_ilist_size(volume_size, maxfile);
 
-	VPRINTF("volume size=%d, ilist size=%d, endian=%d, NAME_MAX=%d\n",
+	VPRINTF(1, "volume size=%d, ilist size=%d, endian=%d, NAME_MAX=%d\n",
 	volume_size, ilist_size, mount->endian, V7FS_NAME_MAX);
 
 	/* Setup I/O ops. */

Index: src/sbin/newfs_v7fs/newfs_v7fs.8
diff -u src/sbin/newfs_v7fs/newfs_v7fs.8:1.2 src/sbin/newfs_v7fs/newfs_v7fs.8:1.3
--- src/sbin/newfs_v7fs/newfs_v7fs.8:1.2	Mon Jun 27 13:50:31 2011
+++ src/sbin/newfs_v7fs/newfs_v7fs.8	Wed Aug 10 11:31:49 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: newfs_v7fs.8,v 1.2 2011/06/27 13:50:31 wiz Exp $
+.\"	$NetBSD: newfs_v7fs.8,v 1.3 2011/08/10 11:31:49 uch Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -64,10 +64,11 @@
 .Nd construct a new 7th Edition(V7) File System
 .Sh SYNOPSIS
 .Nm
-.Op Fl FPvZ
+.Op Fl FZ
 .Op Fl B A

CVS commit: src/external/mit/xorg/tools

2011-08-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Aug 10 10:34:49 UTC 2011

Modified Files:
src/external/mit/xorg/tools/fc-cache: Makefile
src/external/mit/xorg/tools/mkfontscale: Makefile

Log Message:
Disable bzip2 support in freetype on xorg tools build.
Fixes PR xsrc/45223 (xorg tools build fails on CentOS due to
lack of bz2 support).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/tools/fc-cache/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/tools/mkfontscale/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/tools/fc-cache/Makefile
diff -u src/external/mit/xorg/tools/fc-cache/Makefile:1.4 src/external/mit/xorg/tools/fc-cache/Makefile:1.5
--- src/external/mit/xorg/tools/fc-cache/Makefile:1.4	Sat Jul 23 23:42:02 2011
+++ src/external/mit/xorg/tools/fc-cache/Makefile	Wed Aug 10 10:34:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/07/23 23:42:02 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2011/08/10 10:34:48 tsutsui Exp $
 
 NOMAN=		1
 
@@ -39,8 +39,8 @@
 .PATH:	${FREETYPE}/src/gzip
 SRCS.freetype+=	ftgzip.c
 
-.PATH:	${FREETYPE}/src/bzip2
-SRCS.freetype+=	ftbzip2.c
+#.PATH:	${FREETYPE}/src/bzip2
+#SRCS.freetype+=	ftbzip2.c
 
 .PATH:	${FREETYPE}/src/lzw
 SRCS.freetype+=	ftlzw.c
@@ -100,12 +100,14 @@
 		-DFT2_BUILD_LIBRARY \
 		-DXML_BYTE_ORDER=0 -DHAVE_MEMMOVE=1 \
 		-DHAVE_STDINT_H -DHAVE_RANDOM -DDARWIN_NO_CARBON
+HOST_CPPFLAGS+=	-DFT_CONFIG_OPTION_DISABLE_BZIP2
 HOST_CPPFLAGS+=	-I${FONTCONFIG} -I${FREETYPE} \
 		-I${FREETYPE}/include -I${EXPAT}/lib \
 		-I${FONTCONFIG}/../include \
 		-I${DESTDIR}${X11INCDIR} -I.
 
-LDADD=	-lz -lbz2
+LDADD=	-lz
+#LDADD+=	-lbz2
 
 FCARCH_DEPFILE=	fc-cache.c
 .include "../../lib/fontconfig/src/Makefile.fcarch"

Index: src/external/mit/xorg/tools/mkfontscale/Makefile
diff -u src/external/mit/xorg/tools/mkfontscale/Makefile:1.3 src/external/mit/xorg/tools/mkfontscale/Makefile:1.4
--- src/external/mit/xorg/tools/mkfontscale/Makefile:1.3	Sat Jul 23 23:42:02 2011
+++ src/external/mit/xorg/tools/mkfontscale/Makefile	Wed Aug 10 10:34:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/07/23 23:42:02 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/08/10 10:34:48 tsutsui Exp $
 
 NOMAN=		1
 
@@ -31,8 +31,8 @@
 .PATH:	${FREETYPE}/src/gzip
 SRCS.freetype+=	ftgzip.c
 
-.PATH:	${FREETYPE}/src/bzip2
-SRCS.freetype+=	ftbzip2.c
+#.PATH:	${FREETYPE}/src/bzip2
+#SRCS.freetype+=	ftbzip2.c
 
 .PATH:	${FREETYPE}/src/lzw
 SRCS.freetype+=	ftlzw.c
@@ -78,11 +78,13 @@
 
 SRCS+=	${SRCS.mkfontscale} ${SRCS.freetype} ${SRCS.fontenc}
 
-LDADD=	-lz -lbz2
+LDADD=	-lz
+#LDADD+=	-lbz2
 
 HOST_CPPFLAGS=	-DFONTENC_NO_LIBFONT -DXFREE86_FT2 -DFONTENC_NO_LIBFONT \
 		-DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON \
 		-DFONT_ENCODINGS_DIRECTORY=\"${X11FONTDIR}/encodings/encodings.dir\"
+HOST_CPPFLAGS+=	-DFT_CONFIG_OPTION_DISABLE_BZIP2
 HOST_CPPFLAGS+=	-I${FREETYPE}/include -I${DESTDIR}${X11INCDIR} \
 		-I${DESTDIR}${X11INCDIR}/freetype2
 #		-I${X11SRCDIR.xc}/include/fonts



CVS commit: xsrc/external/mit/freetype/dist/include/freetype/config

2011-08-10 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Wed Aug 10 10:32:19 UTC 2011

Modified Files:
xsrc/external/mit/freetype/dist/include/freetype/config: ftoption.h

Log Message:
Make it possible to disable #define FT_CONFIG_OPTION_USER_BZIP2
setting by -DFT_CONFIG_OPTION_DISABLE_BZIP2 for tools build
on systems which don't have native bzip2 support.
Ok'ed by mrg@ in PR xsrc/45223.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/freetype/dist/include/freetype/config/ftoption.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/freetype/dist/include/freetype/config/ftoption.h
diff -u xsrc/external/mit/freetype/dist/include/freetype/config/ftoption.h:1.2 xsrc/external/mit/freetype/dist/include/freetype/config/ftoption.h:1.3
--- xsrc/external/mit/freetype/dist/include/freetype/config/ftoption.h:1.2	Sat Jul 23 23:30:59 2011
+++ xsrc/external/mit/freetype/dist/include/freetype/config/ftoption.h	Wed Aug 10 10:32:19 2011
@@ -200,7 +200,9 @@
   /*   */
   /*   Define this macro if you want to enable this `feature'. */
   /*   */
+#ifndef FT_CONFIG_OPTION_DISABLE_BZIP2
 #define FT_CONFIG_OPTION_USE_BZIP2
+#endif
 
 
   /*/



CVS commit: src/sys/arch/xen

2011-08-10 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Aug 10 09:50:37 UTC 2011

Modified Files:
src/sys/arch/xen/include: xenpmap.h
src/sys/arch/xen/x86: x86_xpmap.c

Log Message:
Introduce locking primitives for Xen pte operations, and xen helper calls for 
MP related MMU ops


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/xen/include/xenpmap.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/xen/x86/x86_xpmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/include/xenpmap.h
diff -u src/sys/arch/xen/include/xenpmap.h:1.27 src/sys/arch/xen/include/xenpmap.h:1.28
--- src/sys/arch/xen/include/xenpmap.h:1.27	Fri Apr 29 22:45:41 2011
+++ src/sys/arch/xen/include/xenpmap.h	Wed Aug 10 09:50:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xenpmap.h,v 1.27 2011/04/29 22:45:41 jym Exp $	*/
+/*	$NetBSD: xenpmap.h,v 1.28 2011/08/10 09:50:37 cherry Exp $	*/
 
 /*
  *
@@ -36,6 +36,8 @@
 
 #define	INVALID_P2M_ENTRY	(~0UL)
 
+void xpq_queue_lock(void);
+void xpq_queue_unlock(void);
 void xpq_queue_machphys_update(paddr_t, paddr_t);
 void xpq_queue_invlpg(vaddr_t);
 void xpq_queue_pte_update(paddr_t, pt_entry_t);
@@ -46,6 +48,13 @@
 void xpq_queue_pin_table(paddr_t, int);
 void xpq_queue_unpin_table(paddr_t);
 int  xpq_update_foreign(paddr_t, pt_entry_t, int);
+void xen_vcpu_mcast_invlpg(vaddr_t, vaddr_t, uint32_t);
+void xen_vcpu_bcast_invlpg(vaddr_t, vaddr_t);
+void xen_mcast_tlbflush(uint32_t);
+void xen_bcast_tlbflush(void);
+void xen_mcast_invlpg(vaddr_t, uint32_t);
+void xen_bcast_invlpg(vaddr_t);
+
 
 #define xpq_queue_pin_l1_table(pa)	\
 	xpq_queue_pin_table(pa, MMUEXT_PIN_L1_TABLE)

Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.28 src/sys/arch/xen/x86/x86_xpmap.c:1.29
--- src/sys/arch/xen/x86/x86_xpmap.c:1.28	Wed Jun 15 20:50:02 2011
+++ src/sys/arch/xen/x86/x86_xpmap.c	Wed Aug 10 09:50:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_xpmap.c,v 1.28 2011/06/15 20:50:02 rmind Exp $	*/
+/*	$NetBSD: x86_xpmap.c,v 1.29 2011/08/10 09:50:37 cherry Exp $	*/
 
 /*
  * Copyright (c) 2006 Mathieu Ropert 
@@ -69,7 +69,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.28 2011/06/15 20:50:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.29 2011/08/10 09:50:37 cherry Exp $");
 
 #include "opt_xen.h"
 #include "opt_ddb.h"
@@ -77,6 +77,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -152,7 +153,9 @@
 		pmap_pte_clearbits(ptp, PG_RW);
 	}
 	s = splvm();
+	xpq_queue_lock();
 	xpq_queue_set_ldt(base, entries);
+	xpq_queue_unlock();
 	splx(s);
 }
 
@@ -163,12 +166,27 @@
 #define XPQUEUE_SIZE 2048
 static mmu_update_t xpq_queue[XPQUEUE_SIZE];
 static int xpq_idx = 0;
+static struct simplelock xpq_lock = SIMPLELOCK_INITIALIZER;
 
 void
+xpq_queue_lock(void)
+{
+	simple_lock(&xpq_lock);
+}
+
+void
+xpq_queue_unlock(void)
+{
+	simple_unlock(&xpq_lock);
+}
+
+/* Must be called with xpq_lock held */
+void
 xpq_flush_queue(void)
 {
 	int i, ok, ret;
 
+	KASSERT(simple_lock_held(&xpq_lock));
 	XENPRINTK2(("flush queue %p entries %d\n", xpq_queue, xpq_idx));
 	for (i = 0; i < xpq_idx; i++)
 		XENPRINTK2(("%d: 0x%08" PRIx64 " 0x%08" PRIx64 "\n", i,
@@ -187,10 +205,12 @@
 	xpq_idx = 0;
 }
 
+/* Must be called with xpq_lock held */
 static inline void
 xpq_increment_idx(void)
 {
 
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_idx++;
 	if (__predict_false(xpq_idx == XPQUEUE_SIZE))
 		xpq_flush_queue();
@@ -201,6 +221,7 @@
 {
 	XENPRINTK2(("xpq_queue_machphys_update ma=0x%" PRIx64 " pa=0x%" PRIx64
 	"\n", (int64_t)ma, (int64_t)pa));
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_queue[xpq_idx].ptr = ma | MMU_MACHPHYS_UPDATE;
 	xpq_queue[xpq_idx].val = (pa - XPMAP_OFFSET) >> PAGE_SHIFT;
 	xpq_increment_idx();
@@ -214,6 +235,7 @@
 {
 
 	KASSERT((ptr & 3) == 0);
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_queue[xpq_idx].ptr = (paddr_t)ptr | MMU_NORMAL_PT_UPDATE;
 	xpq_queue[xpq_idx].val = val;
 	xpq_increment_idx();
@@ -226,6 +248,7 @@
 xpq_queue_pt_switch(paddr_t pa)
 {
 	struct mmuext_op op;
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_flush_queue();
 
 	XENPRINTK2(("xpq_queue_pt_switch: 0x%" PRIx64 " 0x%" PRIx64 "\n",
@@ -240,6 +263,8 @@
 xpq_queue_pin_table(paddr_t pa, int lvl)
 {
 	struct mmuext_op op;
+
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_flush_queue();
 
 	XENPRINTK2(("xpq_queue_pin_l%d_table: %#" PRIxPADDR "\n",
@@ -256,6 +281,8 @@
 xpq_queue_unpin_table(paddr_t pa)
 {
 	struct mmuext_op op;
+
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_flush_queue();
 
 	XENPRINTK2(("xpq_queue_unpin_table: %#" PRIxPADDR "\n", pa));
@@ -269,6 +296,8 @@
 xpq_queue_set_ldt(vaddr_t va, uint32_t entries)
 {
 	struct mmuext_op op;
+
+	KASSERT(simple_lock_held(&xpq_lock));
 	xpq_flush_queue();
 
 	XENPRINTK2(("xpq_queue_set_ldt\n"));
@@ -284,6 +313,8 @@
 xpq_queue_tlb_flush(void)
 {
 	struct mmuext_op op;
+
+	KASSERT(simple_lock_held(&xpq_l

CVS commit: src/doc

2011-08-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 10 09:42:29 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
fix root.cache


To generate a diff of this commit:
cvs rdiff -u -r1.857 -r1.858 src/doc/3RDPARTY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.857 src/doc/3RDPARTY:1.858
--- src/doc/3RDPARTY:1.857	Wed Aug  3 14:04:46 2011
+++ src/doc/3RDPARTY	Wed Aug 10 05:42:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.857 2011/08/03 18:04:46 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.858 2011/08/10 09:42:28 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -949,8 +949,8 @@
 Beta versions are available from Purdue (ftp.cs.purdue.edu:/pub/RCS).
 
 Package:	root.cache
-Version:	2008121200 (Dec 12, 2008)
-Current Vers:	2008121200 (Dec 12, 2008)
+Version:	2011060800 (Jun 8, 2011)
+Current Vers:	2011060800 (Jun 8, 2011)
 Maintainer:	InterNIC
 Archive Site:	ftp://ftp.internic.net/domain/named.root
 Home Page:	ftp://ftp.internic.net/domain/named.root



CVS commit: src/external/bsd/pcc/libexec/ccom

2011-08-10 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Aug 10 08:10:39 UTC 2011

Modified Files:
src/external/bsd/pcc/libexec/ccom: Makefile

Log Message:
disable some warnings to appease gcc-4.5


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/pcc/libexec/ccom/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pcc/libexec/ccom/Makefile
diff -u src/external/bsd/pcc/libexec/ccom/Makefile:1.9 src/external/bsd/pcc/libexec/ccom/Makefile:1.10
--- src/external/bsd/pcc/libexec/ccom/Makefile:1.9	Tue Jun  7 13:30:35 2011
+++ src/external/bsd/pcc/libexec/ccom/Makefile	Wed Aug 10 08:10:39 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2011/06/07 13:30:35 plunky Exp $
+#	$NetBSD: Makefile,v 1.10 2011/08/10 08:10:39 plunky Exp $
 
 WARNS?=	2
 
@@ -28,6 +28,9 @@
 CPPFLAGS+=	-I${PCC_DIST}/arch/${TARGMACH}
 CPPFLAGS+=	-I${PCC_DIST}/cc/ccom
 
+COPTS.scan.c+=	-Wno-unused
+COPTS.pftn.c+=	-Wno-uninitialized
+
 DPSRCS=	external.c
 
 MKEXTDIR!=	cd ../mkext && ${PRINTOBJDIR}



CVS commit: src/external/bsd/pcc/dist/pcc/mip

2011-08-10 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Aug 10 08:09:38 UTC 2011

Modified Files:
src/external/bsd/pcc/dist/pcc/mip: common.c

Log Message:
use offsetof() rather than rolling our own, to appease gcc 4.5


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/pcc/dist/pcc/mip/common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pcc/dist/pcc/mip/common.c
diff -u src/external/bsd/pcc/dist/pcc/mip/common.c:1.1.1.3 src/external/bsd/pcc/dist/pcc/mip/common.c:1.2
--- src/external/bsd/pcc/dist/pcc/mip/common.c:1.1.1.3	Thu Jun  3 18:57:53 2010
+++ src/external/bsd/pcc/dist/pcc/mip/common.c	Wed Aug 10 08:09:38 2011
@@ -1,5 +1,5 @@
 /*	Id: common.c,v 1.92 2010/03/27 23:46:12 mickey Exp 	*/	
-/*	$NetBSD: common.c,v 1.1.1.3 2010/06/03 18:57:53 plunky Exp $	*/
+/*	$NetBSD: common.c,v 1.2 2011/08/10 08:09:38 plunky Exp $	*/
 /*
  * Copyright (c) 2003 Anders Magnusson (ra...@ludd.luth.se).
  * All rights reserved.
@@ -60,6 +60,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -470,7 +471,7 @@
 	} a2;
 };
 
-#define ALIGNMENT ((long)&((struct balloc *)0)->a2)
+#define ALIGNMENT offsetof(struct balloc, a2)
 #define	ROUNDUP(x) (((x) + ((ALIGNMENT)-1)) & ~((ALIGNMENT)-1))
 
 static char *allocpole;



CVS commit: src/external/bsd/pcc/dist/pcc/cc/ccom

2011-08-10 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Aug 10 08:08:39 UTC 2011

Modified Files:
src/external/bsd/pcc/dist/pcc/cc/ccom: pftn.c

Log Message:
fix up some undefined behaviour, to appease gcc 4.5


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c
diff -u src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c:1.5 src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c:1.6
--- src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c:1.5	Thu Jun  3 19:07:59 2010
+++ src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c	Wed Aug 10 08:08:39 2011
@@ -1,5 +1,5 @@
 /*	Id: pftn.c,v 1.280 2010/05/23 19:52:04 ragge Exp 	*/	
-/*	$NetBSD: pftn.c,v 1.5 2010/06/03 19:07:59 plunky Exp $	*/
+/*	$NetBSD: pftn.c,v 1.6 2011/08/10 08:08:39 plunky Exp $	*/
 /*
  * Copyright (c) 2003 Anders Magnusson (ra...@ludd.luth.se).
  * All rights reserved.
@@ -3056,7 +3056,7 @@
 	case PLUS:
 		if (li && ri) {
 			p = buildtree(PLUS, l, r);
-			p->n_type = p->n_type += (FIMAG-FLOAT);
+			p->n_type += (FIMAG-FLOAT);
 		} else {
 			/* If one is imaginary and one is real, make complex */
 			if (li)
@@ -3073,7 +3073,7 @@
 	case MINUS:
 		if (li && ri) {
 			p = buildtree(MINUS, l, r);
-			p->n_type = p->n_type += (FIMAG-FLOAT);
+			p->n_type += (FIMAG-FLOAT);
 		} else if (li) {
 			q = cxstore(mxtyp);
 			p = buildtree(ASSIGN, structref(ccopy(q), DOT, real),
@@ -3097,7 +3097,7 @@
 		if (li && ri)
 			p = buildtree(UMINUS, p, NIL);
 		if (li ^ ri)
-			p->n_type = p->n_type += (FIMAG-FLOAT);
+			p->n_type += (FIMAG-FLOAT);
 		break;
 
 	case DIV:
@@ -3105,7 +3105,7 @@
 		if (ri && !li)
 			p = buildtree(UMINUS, p, NIL);
 		if (li ^ ri)
-			p->n_type = p->n_type += (FIMAG-FLOAT);
+			p->n_type += (FIMAG-FLOAT);
 		break;
 	default:
 		cerror("imop");



CVS commit: src/distrib/sets/lists/comp

2011-08-10 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Aug 10 07:56:59 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: md.bebox

Log Message:
Obsolete some include files.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/comp/md.bebox

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/md.bebox
diff -u src/distrib/sets/lists/comp/md.bebox:1.34 src/distrib/sets/lists/comp/md.bebox:1.35
--- src/distrib/sets/lists/comp/md.bebox:1.34	Sun Jul 17 20:54:31 2011
+++ src/distrib/sets/lists/comp/md.bebox	Wed Aug 10 07:56:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.bebox,v 1.34 2011/07/17 20:54:31 joerg Exp $
+# $NetBSD: md.bebox,v 1.35 2011/08/10 07:56:59 kiyohara Exp $
 ./usr/include/beboxcomp-c-include
 ./usr/include/bebox/_G_config.h			comp-obsolete		obsolete
 ./usr/include/bebox/ansi.h			comp-c-include
@@ -37,11 +37,11 @@
 ./usr/include/bebox/lock.h			comp-c-include
 ./usr/include/bebox/math.h			comp-c-include
 ./usr/include/bebox/mcontext.h			comp-c-include
-./usr/include/bebox/mouse.h			comp-c-include
+./usr/include/bebox/mouse.h			comp-obsolete		obsolete
 ./usr/include/bebox/mutex.h			comp-c-include
 ./usr/include/bebox/param.h			comp-c-include
 ./usr/include/bebox/pcb.h			comp-c-include
-./usr/include/bebox/pccons.h			comp-c-include
+./usr/include/bebox/pccons.h			comp-obsolete		obsolete
 ./usr/include/bebox/pio.h			comp-obsolete		obsolete
 ./usr/include/bebox/pmap.h			comp-c-include
 ./usr/include/bebox/pmc.h			comp-c-include