CVS commit: src/usr.bin/tn3270

2010-01-16 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 17 04:15:42 UTC 2010

Removed Files:
src/usr.bin/tn3270: Makefile Makefile.inc

Log Message:
Remove some leftover bits of tn3270 that got left behind.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r0 src/usr.bin/tn3270/Makefile
cvs rdiff -u -r1.12 -r0 src/usr.bin/tn3270/Makefile.inc

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



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sun Jan 17 00:20:14 UTC 2010

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
fix print format for EPC in cache error format string


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.18 -r1.26.36.1.2.19 \
src/sys/arch/mips/mips/mipsX_subr.S

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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.18 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.19
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.18	Sat Jan 16 20:56:33 2010
+++ src/sys/arch/mips/mips/mipsX_subr.S	Sun Jan 17 00:20:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.18 2010/01/16 20:56:33 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.19 2010/01/17 00:20:14 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -1128,7 +1128,7 @@
 	eret
 
 #if defined(MIPS64_XLS)
-	MSG("cache error @ EPC %#x\nL1D_CACHE_ERROR_LOG %#lx\nL1D_CACHE_INTERRUPT %#lx\nstatus %#x, cause %#x");
+	MSG("cache error @ EPC %#lx\nL1D_CACHE_ERROR_LOG %#lx\nL1D_CACHE_INTERRUPT %#lx\nstatus %#x, cause %#x");
 #else
 	MSG("cache error @ EPC 0x%x ErrCtl 0x%x CacheErr 0x%x");
 #endif



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sun Jan 17 00:11:11 UTC 2010

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpunode.c
rmixl_cpunodevar.h

Log Message:
cpunode driver represents CPU node in device tree


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_cpunode.c \
src/sys/arch/mips/rmi/rmixl_cpunodevar.h

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

Added files:

Index: src/sys/arch/mips/rmi/rmixl_cpunode.c
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_cpunode.c:1.1.2.1
--- /dev/null	Sun Jan 17 00:11:11 2010
+++ src/sys/arch/mips/rmi/rmixl_cpunode.c	Sun Jan 17 00:11:11 2010
@@ -0,0 +1,141 @@
+/*	$NetBSD: rmixl_cpunode.c,v 1.1.2.1 2010/01/17 00:11:11 cliff Exp $	*/
+
+/*
+ * Copyright (c) 1994,1995 Mark Brinicombe.
+ * Copyright (c) 1994 Brini.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *	This product includes software developed by Brini.
+ * 4. The name of the company nor the name of the author may be used to
+ *endorse or promote products derived from this software without specific
+ *prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * RiscBSD kernel project
+ *
+ * mainbus.c
+ *
+ * cpunode configuration
+ *
+ * Created  : 15/12/94
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpunode.c,v 1.1.2.1 2010/01/17 00:11:11 cliff Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include "locators.h"
+
+static int  cpunode_match(device_t,  cfdata_t, void *);
+static void cpunode_attach(device_t,  device_t,  void *);
+static int  cpunode_print_core(void *, const char *);
+
+CFATTACH_DECL_NEW(cpunode, sizeof(struct cpunode_softc),
+	cpunode_match, cpunode_attach, NULL, NULL);
+
+static int
+cpunode_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct mainbus_attach_args *ma = aux;
+
+	/* XXX for now attach one node only */
+	if (ma->ma_node != 0)
+		return 0;
+
+	return 1;
+}
+
+static void
+cpunode_attach(device_t parent, device_t self, void *aux)
+{
+	u_int sz;
+	u_int ncores;
+	struct cpunode_softc *sc = device_private(self);
+	struct mainbus_attach_args *ma = aux;
+	struct cpunode_attach_args na;
+
+	aprint_naive("\n");
+	aprint_normal("\n");
+
+	sc->sc_dev = self;
+	sc->sc_node = ma->ma_node;
+	sc->sc_attached = 1;
+
+	switch (mycpu->cpu_cidflags & MIPS_CIDFL_RMI_TYPE) {
+	case CIDFL_RMI_TYPE_XLR:
+	case CIDFL_RMI_TYPE_XLS:
+		/*
+		 * L2 is unified on XLR, XLS
+		 */
+		sz = (size_t)MIPS_CIDFL_RMI_L2SZ(mycpu->cpu_cidflags);
+		aprint_normal("%s: %dKB/32B %d-banked 8-way set associative"
+			" unified L2 cache\n", device_xname(self),
+			sz/1024, sz/(256 * 1024));
+		break;
+	case CIDFL_RMI_TYPE_XLP:
+		/* TBD */
+		break;
+	}
+
+	ncores = MIPS_CIDFL_RMI_NTHREADS(mycpu->cpu_cidflags);
+	aprint_normal("%s: %d %s on node\n", device_xname(self), ncores,
+		ncores == 1 ? "core" : "cores");
+
+	/*
+	 * Attach cpu (RMI thread) devices
+	 */
+	for (int i=0; i < ncores; i++) {
+		na.na_name = "cpucore";
+		na.na_node = ma->ma_node;
+		na.na_core = i;
+		config_found(self, &na, cpunode_print_core);
+	}
+
+	/*
+	 * Attach obio
+	 */
+	na.na_name = "obio";
+	config_found(self, &na, NULL);
+}
+
+static int
+cpunode_print_core(void *aux, const char *pnp)
+{
+	struct cpunode_attach_args *na = aux;
+
+	if (pnp != NULL)
+		aprint_normal("%s:", pnp);
+	aprint_normal(" core %d", na->na_core);
+
+	return (UNCONF);
+}
Index: src/sys/arch/mips/rmi/rmixl_cpunodevar.h
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_cpunodevar.h:1.1.

CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/rmixl

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sun Jan 17 00:02:00 UTC 2010

Modified Files:
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c

Log Message:
- get cpu wakeup info from firmware
- reserve the cpu_wakeup_info shared memory area from uvm
- initialize cpu_model from mycpu->cpu_name
- dont disable all non-0 threads if MULTIPROCESSOR


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/arch/evbmips/rmixl/machdep.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/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.13 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.14
--- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.13	Fri Jan  8 08:01:22 2010
+++ src/sys/arch/evbmips/rmixl/machdep.c	Sun Jan 17 00:02:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.1.2.13 2010/01/08 08:01:22 cliff Exp $	*/
+/*	$NetBSD: machdep.c,v 1.1.2.14 2010/01/17 00:02:00 cliff Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.13 2010/01/08 08:01:22 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.14 2010/01/17 00:02:00 cliff Exp $");
 
 #include "opt_ddb.h"
 #include "opt_com.h"
@@ -251,6 +251,13 @@
 static u_int ram_seg_resv(phys_ram_seg_t *, u_int, u_quad_t, u_quad_t);
 void rmixlfw_mmap_print(rmixlfw_mmap_t *);
 
+#ifdef MULTIPROCESSOR
+void rmixl_get_wakeup_info(struct rmixl_config *);
+#ifdef MACHDEP_DEBUG
+static void rmixl_wakeup_info_print(volatile rmixlfw_cpu_wakeup_info_t *);
+#endif
+#endif
+
 
 /*
  * safepri is a safe priority for sleep to set for a spin-wait during
@@ -272,7 +279,9 @@
 	phys_ram_seg_t vm_clusters[VM_PHYSSEG_MAX];
 	extern char edata[], end[];
 
+#ifndef MULTIPROCESSOR
 	rmixl_mtcr(0, 1);		/* disable all threads except #0 */
+#endif
 
 	r = rmixl_mfcr(0x300);
 	r &= ~__BIT(14);		/* disabled Unaligned Access */
@@ -297,6 +306,10 @@
 	 */
 	mips_vector_init();
 
+	/* mips_vector_init initialized mycpu */
+	strcpy(cpu_model, mycpu->cpu_name);
+
+	/* get system info from firmware */
 	memsize = rmixlfw_init(infop);
 
 	/* set the VM page size */
@@ -314,6 +327,14 @@
 	printf("\nNetBSD/rmixl\n");
 	printf("memsize = %#lx\n", memsize);
 
+#if defined(MULTIPROCESSOR) && defined(MACHDEP_DEBUG)
+	rmixl_wakeup_info_print(rcp->rc_cpu_wakeup_info);
+	rmixl_wakeup_info_print(rcp->rc_cpu_wakeup_info + 1);
+	printf("cpu_wakeup_info %p, cpu_wakeup_end %p\n",
+		rcp->rc_cpu_wakeup_info,
+		rcp->rc_cpu_wakeup_end);
+#endif
+
 	rmixl_physaddr_init();
 
 	/*
@@ -376,6 +397,19 @@
 	vm_cluster_cnt = ram_seg_resv(vm_clusters, vm_cluster_cnt,
 		0x1FC0, 0x1FC0+NBPG);
 
+#ifdef MULTIPROCEESOR
+	/* reserve the cpu_wakeup_info area */
+	vm_cluster_cnt = ram_seg_resv(vm_clusters, vm_cluster_cnt,
+		(u_quad_t)trunc_page(rcp->rc_cpu_wakeup_info),
+		(u_quad_t)round_page(rcp->rc_cpu_wakeup_end));
+#endif
+
+#if 0
+	/* reserve everything > 4GB */
+	vm_cluster_cnt = ram_seg_resv(vm_clusters, vm_cluster_cnt,
+		0x1, (u_quad_t)~0);
+#endif
+
 	/*
 	 * Load vm_clusters[] into the VM system.
 	 */
@@ -585,7 +619,9 @@
 {
 	struct rmixl_config *rcp = &rmixl_configuration;
 
-	strcpy(cpu_model, "RMI XLS616ATX VIIA");	/* XXX */
+#ifdef MULTIPROCESSOR
+	rmixl_get_wakeup_info(rcp);
+#endif
 
 	infop |= MIPS_KSEG0_START;
 	rmixlfw_info = *(rmixlfw_info_t *)(intptr_t)infop;
@@ -777,6 +813,107 @@
 	return sum;
 }
 
+#ifdef MULTIPROCESSOR
+/*
+ * firmware passes wakeup info structure in CP0 OS Scratch reg #7
+ * they do not explicitly give us the size of the wakeup area.
+ * we "know" that firmware loader sets wip->gp thusly:
+ *   gp = stack_start[vcpu] = round_page(wakeup_end) + (vcpu * (PAGE_SIZE * 2))
+ * so
+ *   round_page(wakeup_end) == gp - (vcpu * (PAGE_SIZE * 2))
+ * Only the "master" cpu runs this function, so
+ *   vcpu = wip->master_cpu
+ */
+void
+rmixl_get_wakeup_info(struct rmixl_config *rcp)
+{
+	volatile rmixlfw_cpu_wakeup_info_t *wip;
+	int32_t scratch_7;
+	intptr_t end;
+
+	__asm__ volatile(
+		".set push""\n"
+		".set noreorder"			"\n"
+		".set mips64""\n" 
+		"dmfc0	%0, $22, 7"			"\n"
+		".set pop""\n"
+			: "=r"(scratch_7));
+
+	wip = (volatile rmixlfw_cpu_wakeup_info_t *)
+			(intptr_t)scratch_7;
+	end = wip->entry.gp - (wip->master_cpu & (PAGE_SIZE * 2));;
+
+	if (wip->valid == 1) {
+		rcp->rc_cpu_wakeup_end = (const void *)end;
+		rcp->rc_cpu_wakeup_info = wip;
+	}
+};
+
+#ifdef MACHDEP_DEBUG
+static void
+rmixl_wakeup_info_print(volatile rmixlfw_cpu_wakeup_info_t *wip)
+{
+	int i;
+
+	printf("%s: wip %p\n", __func__, wip);
+
+	printf("cpu_status %#x\n",  wip->cpu_status);
+	printf("valid: %d\n", wip->valid);
+	printf("entry: addr %#x, args %#x, sp %#"PRIx64", gp %#"PRIx64"\n",
+		wip->entry.addr,
+		wip->entry.args,
+		wip->entry.sp,
+		wip->entry.gp);
+	printf("master_cpu %d\n", wip->master_cpu);
+	printf("master_

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sun Jan 17 00:01:39 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_firmware.h

Log Message:
- add struct rmixlfw_cpu_wakeup_info and related


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_firmware.h

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/mips/rmi/rmixl_firmware.h
diff -u src/sys/arch/mips/rmi/rmixl_firmware.h:1.1.2.2 src/sys/arch/mips/rmi/rmixl_firmware.h:1.1.2.3
--- src/sys/arch/mips/rmi/rmixl_firmware.h:1.1.2.2	Mon Nov  9 10:02:48 2009
+++ src/sys/arch/mips/rmi/rmixl_firmware.h	Sun Jan 17 00:01:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_firmware.h,v 1.1.2.2 2009/11/09 10:02:48 cliff Exp $	*/
+/*	$NetBSD: rmixl_firmware.h,v 1.1.2.3 2010/01/17 00:01:39 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -128,4 +128,65 @@
 	} entry[RMIXLFW_MMAP_MAX_MMAPS];
 } rmixlfw_mmap_t;
 
+#define XLR_ARGV_BUF_SIZE	256
+#define XLR_ENV_BUF_SIZE	256
+#define XLR_MAX_ARGV		32
+#define XLR_MAX_ENV		32
+#define MAX_ELF_SEGMENTS	16
+#define MAX_TLB_MAPPINGS	16
+
+struct lib_cpu_tlb_mapping {
+	int page_size;
+	int asid;
+	int coherency;
+	int attr;
+	uint32_t virt;
+	uint64_t phys;
+};
+
+struct core_segment_info
+{
+	uint64_t vaddr;
+	uint64_t memsz;
+	uint32_t flags;
+};
+
+typedef struct rmixlfw_cpu_wakeup_info {
+	volatile uint32_t cpu_status;
+	int valid;			/* structure is valid */
+	struct {
+		int32_t addr;
+		int32_t args;
+		uint64_t sp;
+		uint64_t gp;
+	} entry;
+	u_int master_cpu;
+	uint32_t master_cpu_mask;
+	uint32_t buddy_cpu_mask;
+	uint32_t psb_os_cpu_map;
+	int argc;
+	uint32_t argv[XLR_MAX_ARGV];		/* pointers ... */
+	char argv_buf[XLR_ARGV_BUF_SIZE];	/* ... storage */
+	int valid_tlb_entries;;
+	struct lib_cpu_tlb_mapping tlb_map[MAX_TLB_MAPPINGS];
+	struct core_segment_info seg_info[MAX_ELF_SEGMENTS];
+	int envc;
+	uint32_t envs[XLR_MAX_ENV];   
+	char env_buf[XLR_ENV_BUF_SIZE];
+	uint32_t app_mode; 
+	int32_t printk_lock;
+	int kseg_master;
+	int32_t kuseg_reentry_function;
+	uint32_t kuseg_reentry_args;
+	uint64_t app_shared_mem_addr;
+	uint64_t app_shared_mem_size;
+	uint64_t app_shared_mem_orig;
+	int32_t loader_lock;
+	int32_t global_wakeup_mask;
+	union {
+		uint32_t unused_0;
+		struct vcpu_extended_info *vcpu_extended_info;
+	};
+} rmixlfw_cpu_wakeup_info_t;
+
 #endif	/* _ARCH_MIPS_RMI_RMIXL_FIRMWARE_H_ */



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sun Jan 17 00:01:23 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlreg.h

Log Message:
- fix RMIXL_PIC_IPIBASE register bits


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/rmi/rmixlreg.h

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/mips/rmi/rmixlreg.h
diff -u src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.6 src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.7
--- src/sys/arch/mips/rmi/rmixlreg.h:1.1.2.6	Sun Jan  3 08:37:07 2010
+++ src/sys/arch/mips/rmi/rmixlreg.h	Sun Jan 17 00:01:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixlreg.h,v 1.1.2.6 2010/01/03 08:37:07 cliff Exp $	*/
+/*	$NetBSD: rmixlreg.h,v 1.1.2.7 2010/01/17 00:01:23 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -371,9 +371,11 @@
 #define RMIXL_PIC_IPIBASE_NMI		__BIT(8)
 #define RMIXL_PIC_IPIBASE_ID		__BITS(31,16)
 #define RMIXL_PIC_IPIBASE_ID_RESb	__BITS(31,23)
-#define RMIXL_PIC_IPIBASE_ID_CPU	__BITS(22,20)	/* Physical CPU ID */
+#define RMIXL_PIC_IPIBASE_ID_CORE	__BITS(22,20)	/* Physical CPU ID */
+#define RMIXL_PIC_IPIBASE_ID_CORE_SHIFT		20
 #define RMIXL_PIC_IPIBASE_ID_RESc	__BITS(19,18)
-#define RMIXL_PIC_IPIBASE_ID_THREAD	__BITS(22,20)	/* Thread ID */
+#define RMIXL_PIC_IPIBASE_ID_THREAD	__BITS(17,16)	/* Thread ID */
+#define RMIXL_PIC_IPIBASE_ID_THREAD_SHIFT	16
 #define RMIXL_PIC_IPIBASE_ID_RESV	\
 		(RMIXL_PIC_IPIBASE_ID_RESa|RMIXL_PIC_IPIBASE_ID_RESb	\
 		|RMIXL_PIC_IPIBASE_ID_RESc)



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sun Jan 17 00:00:55 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlvar.h

Log Message:
- add cpu wakeup info pointers


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/arch/mips/rmi/rmixlvar.h

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/mips/rmi/rmixlvar.h
diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.10 src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.11
--- src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.10	Sun Jan 10 02:48:47 2010
+++ src/sys/arch/mips/rmi/rmixlvar.h	Sun Jan 17 00:00:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixlvar.h,v 1.1.2.10 2010/01/10 02:48:47 matt Exp $	*/
+/*	$NetBSD: rmixlvar.h,v 1.1.2.11 2010/01/17 00:00:55 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static inline bool
 cpu_rmixl(const struct pridtab *ct)
@@ -117,6 +118,9 @@
 	struct extent		*rc_pcie_mem_ex;
 	struct extent		*rc_pcie_io_ex;
 	int			 rc_mallocsafe;
+	volatile struct rmixlfw_cpu_wakeup_info
+*rc_cpu_wakeup_info;
+	const void		*rc_cpu_wakeup_end;
 };
 
 extern struct rmixl_config rmixl_configuration;



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:50:59 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_mainbus.c

Log Message:
- mainbus now attaches cpunode's


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/arch/mips/rmi/rmixl_mainbus.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/mips/rmi/rmixl_mainbus.c
diff -u src/sys/arch/mips/rmi/rmixl_mainbus.c:1.1.2.5 src/sys/arch/mips/rmi/rmixl_mainbus.c:1.1.2.6
--- src/sys/arch/mips/rmi/rmixl_mainbus.c:1.1.2.5	Wed Jan 13 09:56:10 2010
+++ src/sys/arch/mips/rmi/rmixl_mainbus.c	Sat Jan 16 23:50:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_mainbus.c,v 1.1.2.5 2010/01/13 09:56:10 cliff Exp $	*/
+/*	$NetBSD: rmixl_mainbus.c,v 1.1.2.6 2010/01/16 23:50:59 cliff Exp $	*/
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_mainbus.c,v 1.1.2.5 2010/01/13 09:56:10 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_mainbus.c,v 1.1.2.6 2010/01/16 23:50:59 cliff Exp $");
 
 #include 
 #include 
@@ -57,9 +57,12 @@
 
 static int  mainbusmatch(device_t,  cfdata_t, void *);
 static void mainbusattach(device_t,  device_t,  void *);
-static int  mainbus_print_core(void *, const char *);
+static int  mainbus_node_alloc(struct mainbus_softc *, int);
+static int  mainbus_search(device_t, cfdata_t, const int *, void *);
+static int  mainbus_print(void *, const char *);
 
-CFATTACH_DECL_NEW(mainbus, 0, mainbusmatch, mainbusattach, NULL, NULL);
+CFATTACH_DECL_NEW(mainbus, sizeof(struct mainbus_softc),
+	mainbusmatch, mainbusattach, NULL, NULL);
 
 static int mainbus_found;
 
@@ -74,59 +77,81 @@
 static void
 mainbusattach(device_t parent, device_t self, void *aux)
 {
-	u_int sz;
-	u_int ncores;
-	struct mainbus_attach_args aa;
+	struct mainbus_softc *sc = device_private(self);
 
 	aprint_naive("\n");
 	aprint_normal("\n");
 
-	mainbus_found = 1;
-
-	switch (mycpu->cpu_cidflags & MIPS_CIDFL_RMI_TYPE) {
-	case CIDFL_RMI_TYPE_XLR:
-	case CIDFL_RMI_TYPE_XLS:
-		/*
-		 * L2 is unified on XLR, XLS
-		 */
-		sz = (size_t)MIPS_CIDFL_RMI_L2SZ(mycpu->cpu_cidflags);
-		aprint_normal("%s: %dKB/32B %d-banked 8-way set associative"
-			" unified L2 cache\n", device_xname(self),
-			sz/1024, sz/(256 * 1024));
-		break;
-	case CIDFL_RMI_TYPE_XLP:
-		/* TBD */
-		break;
-	}
+	sc->sc_dev = self;
+	sc->sc_node_next = 0;
+	sc->sc_node_mask = 0;
 
-	ncores = MIPS_CIDFL_RMI_NTHREADS(mycpu->cpu_cidflags);
-	aprint_normal("%s: %d %s on chip\n", device_xname(self), ncores,
-		ncores == 1 ? "core" : "cores");
-
-	/*
-	 * Attach cpu (RMI thread) devices
-	 */
-	for (int i=0; i < ncores; i++) {
-		aa.ma_name = "cpucore";
-		aa.ma_core = i;
-		config_found(self, &aa, mainbus_print_core);
-	}
+	mainbus_found = 1;
 
 	/*
-	 * Attach obio
+	 * attach mainbus devices 
 	 */
-	aa.ma_name = "obio";
-	config_found(self, &aa, NULL);
+config_search_ia(mainbus_search, self, "mainbus", mainbus_print);
 }
 
 static int
-mainbus_print_core(void *aux, const char *pnp)
+mainbus_print(void *aux, const char *pnp)
 {
-	struct mainbus_attach_args *aa = aux;
+	struct mainbus_attach_args *ma = aux;
 
 	if (pnp != NULL)
 		aprint_normal("%s:", pnp);
-	aprint_normal(" core %d", aa->ma_core);
+	aprint_normal(" node %d", ma->ma_node);
 
 	return (UNCONF);
 }
+
+static int
+mainbus_node_alloc(struct mainbus_softc *sc, int node)
+{
+	uint64_t bit;
+
+	if (node == MAINBUSCF_NODE_DEFAULT) {
+		for (node=sc->sc_node_next; node < 64; node++) {
+			bit = 1 << node;
+			if ((sc->sc_node_mask & bit) == 0) {
+sc->sc_node_mask |= bit;
+sc->sc_node_next = node + 1;
+return node;
+			}
+		}
+		panic("%s: node mask underflow", __func__);   
+	} else {
+		if (node >= 64) 
+			panic("%s: node >= 64", __func__);   
+		if (node < 0)
+			panic("%s: bad node %d", __func__, node);   
+		bit = 1 << node;
+		if ((sc->sc_node_mask & bit) == 0) {
+			sc->sc_node_mask |= bit;
+			sc->sc_node_next = node + 1;
+			return node;
+		} else {
+			panic("%s: node %d already used\n",
+__func__, node);
+		}
+	}
+
+	/*NOTREACHED*/
+	return -1;	/* as if */
+}
+
+static int
+mainbus_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
+{
+	struct mainbus_softc *sc = device_private(parent);
+	struct mainbus_attach_args ma;
+
+	ma.ma_node = mainbus_node_alloc(sc, cf->cf_loc[MAINBUSCF_NODE]);
+
+	if (config_match(parent, cf, &ma) > 0)
+		config_attach(parent, cf, &ma, mainbus_print);
+
+	return 0;
+}
+



CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/rmixl

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:50:33 UTC 2010

Modified Files:
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: autoconf.h

Log Message:
- add struct mainbus_softc
- struct mainbus_attach_args loses ma_core, gets ma_node


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbmips/rmixl/autoconf.h

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/evbmips/rmixl/autoconf.h
diff -u src/sys/arch/evbmips/rmixl/autoconf.h:1.1.2.1 src/sys/arch/evbmips/rmixl/autoconf.h:1.1.2.2
--- src/sys/arch/evbmips/rmixl/autoconf.h:1.1.2.1	Wed Jan 13 09:40:09 2010
+++ src/sys/arch/evbmips/rmixl/autoconf.h	Sat Jan 16 23:50:32 2010
@@ -1,11 +1,17 @@
-/*	$NetBSD: autoconf.h,v 1.1.2.1 2010/01/13 09:40:09 cliff Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.1.2.2 2010/01/16 23:50:32 cliff Exp $	*/
 
 #ifndef _EVBMIPS_RMIXL_AUTOCONF_H_
 #define _EVBMIPS_RMIXL_AUTOCONF_H_
 
+struct mainbus_softc {
+	device_t	sc_dev;
+	int		sc_node_next;
+	uint64_t	sc_node_mask;
+};
+
 struct mainbus_attach_args {
 	const char *ma_name;
-	int		ma_core;
+	int		ma_node;
 };
 
 #endif	/* _EVBMIPS_RMIXL_AUTOCONF_H_ */



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/conf

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:50:05 UTC 2010

Modified Files:
src/sys/arch/mips/conf [matt-nb5-mips64]: files.rmixl

Log Message:
- cpucore and cpu config info moved here from to arch/evbmips/conf/files.rmixl
- obio now attaches to cpunode instead of mainbus


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/mips/conf/files.rmixl

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/mips/conf/files.rmixl
diff -u src/sys/arch/mips/conf/files.rmixl:1.1.2.7 src/sys/arch/mips/conf/files.rmixl:1.1.2.8
--- src/sys/arch/mips/conf/files.rmixl:1.1.2.7	Mon Dec 14 07:23:07 2009
+++ src/sys/arch/mips/conf/files.rmixl	Sat Jan 16 23:50:04 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rmixl,v 1.1.2.7 2009/12/14 07:23:07 cliff Exp $
+#	$NetBSD: files.rmixl,v 1.1.2.8 2010/01/16 23:50:04 cliff Exp $
 #
 # Configuration info for RMI XLP, XLR, XLS
 #
@@ -6,10 +6,26 @@
 file	arch/mips/rmi/rmixl_intr.c
 file	arch/mips/rmi/rmixl_subr.S
 
+
+# node is parent of one or more core
+device	cpunode { [ core = -1] }
+attach	cpunode at mainbus
+file	arch/mips/rmi/rmixl_cpunode.c		cpunode
+
+# core is parent of one or more cpu
+device	cpucore { [ thread = -1] }
+attach	cpucore at cpunode
+file	arch/mips/rmi/rmixl_cpucore.c		cpucore
+
+# each cpu is a RMI 'thread' or 'vCPU'
+device	cpu
+attach	cpu at cpucore
+file	arch/mips/rmi/rmixl_cpu.c		cpu
+
 # OBIO: offsets are from System Bridge Controller base
 define obio { [addr=-1], [size=0], [intr=-1], [mult=1] }
 device	obio: obio
-attach	obio at mainbus
+attach	obio at cpunode
 file	arch/mips/rmi/rmixl_obio.c		obio needs-count
 filearch/mips/rmi/rmixl_obio_eb_space.c	obio
 filearch/mips/rmi/rmixl_obio_el_space.c	obio



CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:49:32 UTC 2010

Modified Files:
src/sys/arch/evbmips/conf [matt-nb5-mips64]: files.rmixl

Log Message:
- remove mainbus locator 'core', add mainbus locator 'node'
- cpucore and cpu config info moved to arch/mips/conf/files.rmixl


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/evbmips/conf/files.rmixl

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/evbmips/conf/files.rmixl
diff -u src/sys/arch/evbmips/conf/files.rmixl:1.1.2.3 src/sys/arch/evbmips/conf/files.rmixl:1.1.2.4
--- src/sys/arch/evbmips/conf/files.rmixl:1.1.2.3	Wed Jan 13 09:41:32 2010
+++ src/sys/arch/evbmips/conf/files.rmixl	Sat Jan 16 23:49:32 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rmixl,v 1.1.2.3 2010/01/13 09:41:32 cliff Exp $
+#	$NetBSD: files.rmixl,v 1.1.2.4 2010/01/16 23:49:32 cliff Exp $
 
 file	arch/evbmips/rmixl/autoconf.c
 file	arch/evbmips/rmixl/machdep.c
@@ -12,18 +12,10 @@
 file	arch/mips/mips/softintr.c
 
 # The autoconfiguration root.
-device	mainbus { [core = -1] }
+device	mainbus { [node = -1] }
 attach	mainbus at root
 file	arch/mips/rmi/rmixl_mainbus.c		mainbus
 
-device	cpucore { [ thread = -1] }
-attach	cpucore at mainbus
-file	arch/evbmips/rmixl/cpucore.c		cpucore
-
-device	cpu
-attach	cpu at cpucore
-file	arch/evbmips/rmixl/cpu.c		cpu
-
 # Machine-independent I2O drivers.
 include "dev/i2o/files.i2o"
 



CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:49:10 UTC 2010

Modified Files:
src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLSATX

Log Message:
- cpunode attaches to mainbus
- cpucore and obio now attache to cpunode


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/evbmips/conf/XLSATX

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/evbmips/conf/XLSATX
diff -u src/sys/arch/evbmips/conf/XLSATX:1.1.2.3 src/sys/arch/evbmips/conf/XLSATX:1.1.2.4
--- src/sys/arch/evbmips/conf/XLSATX:1.1.2.3	Wed Jan 13 09:40:56 2010
+++ src/sys/arch/evbmips/conf/XLSATX	Sat Jan 16 23:49:10 2010
@@ -1,8 +1,8 @@
-#	$NetBSD: XLSATX,v 1.1.2.3 2010/01/13 09:40:56 cliff Exp $
+#	$NetBSD: XLSATX,v 1.1.2.4 2010/01/16 23:49:10 cliff Exp $
 
 include 	"arch/evbmips/conf/std.rmixl"
 
-#ident 		"XLSATX-$Revision: 1.1.2.3 $"
+#ident 		"XLSATX-$Revision: 1.1.2.4 $"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
@@ -130,9 +130,10 @@
 
 
 mainbus0 	at root
-cpucore*	at mainbus? core ?
+cpunode*	at mainbus? node ?
+cpucore*	at cpunode? core ?
 cpu*		at cpucore? thread ?
-obio0		at mainbus?
+obio0		at cpunode?
 com0		at obio0	addr 0x14000 mult 4 intr 9
 options		COM_REGMAP
 rmixl_pcie0	at obio0



CVS commit: [matt-nb5-mips64] src/sys/arch

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:48:41 UTC 2010

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpucorevar.h
Removed Files:
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: cpucorevar.h

Log Message:
- moved arch/evbmips/rmixl/cpucorevar.h to arch/mips/rmi/rmixl_cpucorevar.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r0 src/sys/arch/evbmips/rmixl/cpucorevar.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_cpucorevar.h

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

Added files:

Index: src/sys/arch/mips/rmi/rmixl_cpucorevar.h
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.1.2.1
--- /dev/null	Sat Jan 16 23:48:41 2010
+++ src/sys/arch/mips/rmi/rmixl_cpucorevar.h	Sat Jan 16 23:48:41 2010
@@ -0,0 +1,18 @@
+/*	$NetBSD: rmixl_cpucorevar.h,v 1.1.2.1 2010/01/16 23:48:41 cliff Exp $	q*/
+
+#ifndef _ARCH_MIPS_RMI_RMIXL_CPUCOREVAR_H_
+#define _ARCH_MIPS_RMI_RMIXL_CPUCOREVAR_H_
+
+struct cpucore_softc {
+	device_t	sc_dev;
+	bool		sc_attached;
+	u_int		sc_core;
+};
+
+struct cpucore_attach_args {
+	const char *ca_name;
+	int		ca_core;
+	int		ca_thread;
+};
+
+#endif	/* _ARCH_MIPS_RMI_RMIXL_CPUCOREVAR_H_ */



CVS commit: [matt-nb5-mips64] src/sys/arch

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:48:16 UTC 2010

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpucore.c
Removed Files:
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: cpucore.c

Log Message:
- moved arch/evbmips/rmixl/cpucore.c to arch/mips/rmi/rmixl_cpucore.c


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r0 src/sys/arch/evbmips/rmixl/cpucore.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_cpucore.c

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

Added files:

Index: src/sys/arch/mips/rmi/rmixl_cpucore.c
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_cpucore.c:1.1.2.1
--- /dev/null	Sat Jan 16 23:48:16 2010
+++ src/sys/arch/mips/rmi/rmixl_cpucore.c	Sat Jan 16 23:48:16 2010
@@ -0,0 +1,119 @@
+/*	$NetBSD: rmixl_cpucore.c,v 1.1.2.1 2010/01/16 23:48:16 cliff Exp $	*/
+
+/*
+ * Copyright 2002 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Simon Burge for Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *  This product includes software developed for the NetBSD Project by
+ *  Wasabi Systems, Inc.
+ * 4. The name of Wasabi Systems, Inc. may not be used to endorse
+ *or promote products derived from this software without specific prior
+ *written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "locators.h"
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpucore.c,v 1.1.2.1 2010/01/16 23:48:16 cliff Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static int	cpucore_match(device_t, cfdata_t, void *);
+static void	cpucore_attach(device_t, device_t, void *);
+static int	cpucore_print(void *, const char *);
+
+CFATTACH_DECL_NEW(cpucore, sizeof(struct cpucore_softc),
+	cpucore_match, cpucore_attach, NULL, NULL);
+
+static int
+cpucore_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct cpunode_attach_args *na = aux;
+	int core = cf->cf_loc[CPUNODECF_CORE];
+
+	if (strncmp(na->na_name, cf->cf_name, strlen(cf->cf_name)) == 0
+#ifndef MULTIPROCESSOR
+	&& na->na_core == 0
+#endif
+	&& (core == CPUNODECF_CORE_DEFAULT || core == na->na_core))
+		return 1;
+
+	return 0;
+}
+
+static void
+cpucore_attach(device_t parent, device_t self, void *aux)
+{
+	struct cpucore_softc * const sc = device_private(self);
+	struct cpunode_attach_args *na = aux;
+	struct cpucore_attach_args ca;
+	u_int nthreads;
+
+	sc->sc_dev = self;
+	sc->sc_core = na->na_core;
+
+	aprint_normal("\n");
+	aprint_normal_dev(self, "%lu.%02luMHz (hz cycles = %lu, "
+	"delay divisor = %lu)\n",
+	curcpu()->ci_cpu_freq / 100,
+	(curcpu()->ci_cpu_freq % 100) / 1,
+	curcpu()->ci_cycles_per_hz, curcpu()->ci_divisor_delay);
+
+	aprint_normal("%s: ", device_xname(self));
+	cpu_identify(self);
+
+	nthreads = MIPS_CIDFL_RMI_NTHREADS(mycpu->cpu_cidflags);
+	aprint_normal_dev(self, "%d %s on core\n", nthreads,
+		nthreads == 1 ? "thread" : "threads");
+
+	/*
+	 * Attach CPU (RMI thread contexts) devices
+	 */
+	for (int i=0; i < nthreads; i++) {
+		ca.ca_name = "cpu";
+		ca.ca_thread = i;
+		ca.ca_core = sc->sc_core;
+		config_found(self, &ca, cpucore_print);
+	}
+}
+
+static int
+cpucore_print(void *aux, const char *pnp)
+{
+	struct cpucore_attach_args *ca = aux;
+
+	if (pnp != NULL)
+		aprint_normal("%s:", pnp);
+	aprint_normal(" thread %d", ca->ca_thread);
+
+	return (UNCONF);
+}



CVS commit: [matt-nb5-mips64] src/sys/arch

2010-01-16 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Jan 16 23:47:30 UTC 2010

Added Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpu.c
Removed Files:
src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: cpu.c

Log Message:
- moved arch/evbmips/rmixl/cpu.c to arch/mips/rmi/rmixl_cpu.c


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r0 src/sys/arch/evbmips/rmixl/cpu.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixl_cpu.c

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

Added files:

Index: src/sys/arch/mips/rmi/rmixl_cpu.c
diff -u /dev/null src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.1
--- /dev/null	Sat Jan 16 23:47:30 2010
+++ src/sys/arch/mips/rmi/rmixl_cpu.c	Sat Jan 16 23:47:30 2010
@@ -0,0 +1,105 @@
+/*	$NetBSD: rmixl_cpu.c,v 1.1.2.1 2010/01/16 23:47:30 cliff Exp $	*/
+
+/*
+ * Copyright 2002 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Simon Burge for Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *  This product includes software developed for the NetBSD Project by
+ *  Wasabi Systems, Inc.
+ * 4. The name of Wasabi Systems, Inc. may not be used to endorse
+ *or promote products derived from this software without specific prior
+ *written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "locators.h"
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.1 2010/01/16 23:47:30 cliff Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static int	cpu_match(device_t, cfdata_t, void *);
+static void	cpu_attach(device_t, device_t, void *);
+
+CFATTACH_DECL_NEW(cpu, 0, cpu_match, cpu_attach, NULL, NULL);
+
+static int
+cpu_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct cpucore_attach_args *ca = aux;
+	int thread = cf->cf_loc[CPUCORECF_THREAD];
+
+	if (strncmp(ca->ca_name, cf->cf_name, strlen(cf->cf_name)) == 0
+#ifndef MULTIPROCESSOR
+	&& ca->ca_thread == 0
+#endif
+	&& (thread == CPUCORECF_THREAD_DEFAULT || thread == ca->ca_thread))
+			return 1;
+
+	return 0;
+}
+
+static void
+cpu_attach(device_t parent, device_t self, void *aux)
+{
+	struct cpucore_attach_args *ca = aux;
+	if (ca->ca_thread == 0 && ca->ca_core == 0) {
+		struct cpu_info * const ci = curcpu();
+		ci->ci_dev = self;
+		self->dv_private = ci;
+#ifdef MULTIPROCESSOR
+	} else {
+		struct pglist pglist;
+
+		/*
+		 * Grab a page from the first 256MB to use to store
+		 * exception vectors and cpu_info for this cpu.
+		 */
+		error = uvm_pglistalloc(PAGE_SIZE,
+		0, 0x1000,
+		PAGE_SIZE, PAGE_SIZE, &pglist, 1, false);
+		if (error) {
+			aprint_error(": failed to allocte exception vectors\n");
+			return;
+		}
+
+		const paddr_t pa = VM_PAGE_TO_PHYS(TAILQ_FIRST(&pglist));
+		const vaddr_t va = MIPS_PHYS_TO_KSEG0(pa);
+		struct cpu_info * const ci = (void *) (va + 0x400);
+		memset(va, 0, PAGE_SIZE);
+		ci->ci_ebase = va;
+		ci->ci_ebase_pa = pa;
+		ci->ci_dev = self;
+		self->dv_private = ci;
+#endif
+	}
+	aprint_normal("\n");
+}



CVS commit: src/usr.bin/unifdef

2010-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 16 21:26:59 UTC 2010

Modified Files:
src/usr.bin/unifdef: unifdef.c
Removed Files:
src/usr.bin/unifdef: stdbool.h

Log Message:
- we don't need stdbool.h anymore.
- the previous fix for the negative index logic was wrong, fix it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/usr.bin/unifdef/stdbool.h
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/unifdef/unifdef.c

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

Modified files:

Index: src/usr.bin/unifdef/unifdef.c
diff -u src/usr.bin/unifdef/unifdef.c:1.15 src/usr.bin/unifdef/unifdef.c:1.16
--- src/usr.bin/unifdef/unifdef.c:1.15	Mon Jul 13 15:05:41 2009
+++ src/usr.bin/unifdef/unifdef.c	Sat Jan 16 16:26:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: unifdef.c,v 1.15 2009/07/13 19:05:41 roy Exp $	*/
+/*	$NetBSD: unifdef.c,v 1.16 2010/01/16 21:26:59 christos Exp $	*/
 
 /*
  * Copyright (c) 1985, 1993
@@ -77,7 +77,7 @@
 #endif
 #ifdef __IDSTRING
 __IDSTRING(Berkeley, "@(#)unifdef.c	8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.15 2009/07/13 19:05:41 roy Exp $");
+__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.16 2010/01/16 21:26:59 christos Exp $");
 __IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.161 2003/07/01 15:32:48 fanf2 Exp $");
 #endif
 #endif /* not lint */
@@ -760,7 +760,7 @@
 			return (LT_IF);
 		cp = skipcomment(cp);
 		sym = findsym(cp);
-		if (sym < 0 || !symlist)
+		if (sym < 0 || symlist)
 			return (LT_IF);
 		*valp = (value[sym] != NULL);
 		cp = skipsym(cp);
@@ -771,7 +771,7 @@
 	} else if (!endsym(*cp)) {
 		debug("eval%d symbol", ops - eval_ops);
 		sym = findsym(cp);
-		if (sym < 0 || !symlist)
+		if (sym < 0 || symlist)
 			return (LT_IF);
 		if (value[sym] == NULL)
 			*valp = 0;



CVS commit: src/sys/arch/ofppc/ofppc

2010-01-16 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 16 21:05:28 UTC 2010

Modified Files:
src/sys/arch/ofppc/ofppc: machdep.c

Log Message:
Allow compilation without rtas device being configured.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/ofppc/ofppc/machdep.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/ofppc/ofppc/machdep.c
diff -u src/sys/arch/ofppc/ofppc/machdep.c:1.107 src/sys/arch/ofppc/ofppc/machdep.c:1.108
--- src/sys/arch/ofppc/ofppc/machdep.c:1.107	Tue Nov 11 06:46:43 2008
+++ src/sys/arch/ofppc/ofppc/machdep.c	Sat Jan 16 21:05:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.107 2008/11/11 06:46:43 dyoung Exp $	*/
+/*	$NetBSD: machdep.c,v 1.108 2010/01/16 21:05:28 phx Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2008/11/11 06:46:43 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2010/01/16 21:05:28 phx Exp $");
 
 #include 
 #include 
@@ -70,7 +70,9 @@
 void ofppc_bootstrap_console(void);
 
 extern u_int l2cr_config;
+#if (NRTAS > 0)
 extern int machine_has_rtas;
+#endif
 
 struct model_data modeldata;
 
@@ -212,8 +214,10 @@
 {
 	static int syncing;
 	static char str[256];
-	int junk;
 	char *ap = str, *ap1 = ap;
+#if (NRTAS > 0)
+	int junk;
+#endif
 
 	boothowto = howto;
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
@@ -226,9 +230,11 @@
 		doshutdownhooks();
 		pmf_system_shutdown(boothowto);
 		aprint_normal("halted\n\n");
+#if (NRTAS > 0)
 		if ((howto & 0x800) && machine_has_rtas &&
 		rtas_has_func(RTAS_FUNC_POWER_OFF))
 			rtas_call(RTAS_FUNC_POWER_OFF, 2, 1, 0, 0, &junk);
+#endif
 		ppc_exit();
 	}
 	if (!cold && (howto & RB_DUMP))
@@ -238,11 +244,12 @@
 	pmf_system_shutdown(boothowto);
 	aprint_normal("rebooting\n\n");
 
+#if (NRTAS > 0)
 	if (machine_has_rtas && rtas_has_func(RTAS_FUNC_SYSTEM_REBOOT)) {
 		rtas_call(RTAS_FUNC_SYSTEM_REBOOT, 0, 1, &junk);
 		for(;;);
 	}
-
+#endif
 	if (what && *what) {
 		if (strlen(what) > sizeof str - 5)
 			aprint_normal("boot string too large, ignored\n");



CVS commit: [matt-nb5-mips64] src/sys/arch/mips

2010-01-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 16 20:56:33 UTC 2010

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: asm.h
src/sys/arch/mips/mips [matt-nb5-mips64]: genassym.cf locore_mips1.S
mips32_subr.S mips3_subr.S mips5900_subr.S mips64_subr.S
mipsX_subr.S mips_machdep.c

Log Message:
Rework the exception code.  All the exceptions (except for mips3_5900) are
now padded to 128 bytes each and placed in the right order so they can be
copied with one memcpy.  This also allows us to branch to unused space space
since the relative locations will remain the same.

When leaving the exception vectors, k1 will now always contain the address
of CURLWP for that CPU.  The rest of the exception code no longer needs (and
is not allowed to) to access CPUVAR(CURLWP).

kill outofworld and just let trap panic, if it can.  Allow for sb1_subr.S
or rmixl_subr.S in the future.  Fix TLB read/write code.


To generate a diff of this commit:
cvs rdiff -u -r1.40.38.10 -r1.40.38.11 src/sys/arch/mips/include/asm.h
cvs rdiff -u -r1.44.12.8 -r1.44.12.9 src/sys/arch/mips/mips/genassym.cf
cvs rdiff -u -r1.64.26.1.2.3 -r1.64.26.1.2.4 \
src/sys/arch/mips/mips/locore_mips1.S
cvs rdiff -u -r1.3 -r1.3.96.1 src/sys/arch/mips/mips/mips32_subr.S \
src/sys/arch/mips/mips/mips3_subr.S src/sys/arch/mips/mips/mips64_subr.S
cvs rdiff -u -r1.4 -r1.4.96.1 src/sys/arch/mips/mips/mips5900_subr.S
cvs rdiff -u -r1.26.36.1.2.17 -r1.26.36.1.2.18 \
src/sys/arch/mips/mips/mipsX_subr.S
cvs rdiff -u -r1.205.4.1.2.1.2.25 -r1.205.4.1.2.1.2.26 \
src/sys/arch/mips/mips/mips_machdep.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/mips/include/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.40.38.10 src/sys/arch/mips/include/asm.h:1.40.38.11
--- src/sys/arch/mips/include/asm.h:1.40.38.10	Fri Jan 15 06:46:58 2010
+++ src/sys/arch/mips/include/asm.h	Sat Jan 16 20:56:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.40.38.10 2010/01/15 06:46:58 matt Exp $	*/
+/*	$NetBSD: asm.h,v 1.40.38.11 2010/01/16 20:56:33 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -240,11 +240,13 @@
 #ifdef __STDC__
 #define	VECTOR_END(x)			\
 	EXPORT(x ## _end);		\
-	END(x)
+	END(x);\
+	.org _C_LABEL(x) + 0x80
 #else
 #define	VECTOR_END(x)			\
 	EXPORT(x/**/_end);		\
-	END(x)
+	END(x);\
+	.org _C_LABEL(x) + 0x80
 #endif
 
 /*

Index: src/sys/arch/mips/mips/genassym.cf
diff -u src/sys/arch/mips/mips/genassym.cf:1.44.12.8 src/sys/arch/mips/mips/genassym.cf:1.44.12.9
--- src/sys/arch/mips/mips/genassym.cf:1.44.12.8	Fri Jan 15 06:46:59 2010
+++ src/sys/arch/mips/mips/genassym.cf	Sat Jan 16 20:56:33 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.44.12.8 2010/01/15 06:46:59 matt Exp $
+#	$NetBSD: genassym.cf,v 1.44.12.9 2010/01/16 20:56:33 matt Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -318,3 +318,8 @@
 define	CPU_INFO_CURLWP		offsetof(struct cpu_info, ci_curlwp)
 define	CPU_INFO_FPCURLWP	offsetof(struct cpu_info, ci_fpcurlwp)
 define	CPU_INFO_PMAP_SEGBASE	offsetof(struct cpu_info, ci_pmap_segbase)
+
+define	TLBMASK_HI		offsetof(struct tlbmask, tlb_hi)
+define	TLBMASK_LO0		offsetof(struct tlbmask, tlb_lo0)
+define	TLBMASK_LO1		offsetof(struct tlbmask, tlb_lo1)
+define	TLBMASK_MASK		offsetof(struct tlbmask, tlb_mask)

Index: src/sys/arch/mips/mips/locore_mips1.S
diff -u src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.3 src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.4
--- src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.3	Fri Jan 15 06:46:59 2010
+++ src/sys/arch/mips/mips/locore_mips1.S	Sat Jan 16 20:56:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_mips1.S,v 1.64.26.1.2.3 2010/01/15 06:46:59 matt Exp $	*/
+/*	$NetBSD: locore_mips1.S,v 1.64.26.1.2.4 2010/01/16 20:56:33 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -132,6 +132,7 @@
 		#  we dont have to shift
 	lw	k0, 0(k0)			# get the function address
 	nop
+	lw	k1, CPUVAR(CURLWP)		# get the current lwp
 	j	k0# jump to the function
 	nop
 	.set	at
@@ -921,10 +922,10 @@
 	tlbr	# Read from the TLB
 	mfc0	t2, MIPS_COP_0_TLB_HI		# fetch the hi entry
 	mfc0	t3, MIPS_COP_0_TLB_LOW		# fetch the low entry
-	sw	zero, 0(a1)
-	sw	t2, 4(a1)
-	sw	t3, 8(a1)
-	sw	zero, 12(a1)
+	sw	t2, TLBMASK_HI(a1)
+	sw	t3, TLBMASK_LO0(a1)
+	sw	zero, TLBMASK_LO1(a1)
+	sw	zero, TLBMASK_MASK(a1)
 
 	mtc0	t0, MIPS_COP_0_TLB_HI		# restore PID
 	j	ra

Index: src/sys/arch/mips/mips/mips32_subr.S
diff -u src/sys/arch/mips/mips/mips32_subr.S:1.3 src/sys/arch/mips/mips/mips32_subr.S:1.3.96.1
--- src/sys/arch/mips/mips/mips32_subr.S:1.3	Sun Dec 11 12:18:09 2005
+++ src/sys/arch/mips/mips/mips32_subr.S	Sat Jan 16 20:56:33 2010
@@ -1,9 +1,13 @@
-/*	$NetBSD: mips32_subr.S,v 1.3 2005/12/11 12:18:09 christos Exp $	*/
+/*	$NetBSD: mips32_subr.S,v 1.3.96.1 2010/01/16 20:56:33 matt Exp $	*/
 
 #undef MIPS1
 #u

CVS commit: src/sys/rump/net/rumptest

2010-01-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan 16 20:47:01 UTC 2010

Modified Files:
src/sys/rump/net/rumptest: rumptest_net.c

Log Message:
* add option to use bpf to dump response
* randomize local address to avoid poor confused peers due to us
  "rebooting" quite rapidly when testing.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/net/rumptest/rumptest_net.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/rump/net/rumptest/rumptest_net.c
diff -u src/sys/rump/net/rumptest/rumptest_net.c:1.13 src/sys/rump/net/rumptest/rumptest_net.c:1.14
--- src/sys/rump/net/rumptest/rumptest_net.c:1.13	Fri Jan 15 18:38:16 2010
+++ src/sys/rump/net/rumptest/rumptest_net.c	Sat Jan 16 20:47:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumptest_net.c,v 1.13 2010/01/15 18:38:16 pooka Exp $	*/
+/*	$NetBSD: rumptest_net.c,v 1.14 2010/01/16 20:47:01 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -35,14 +35,21 @@
 #include 
 
 #include 
+#include 
+#include 
 #include 
+#include 
 #include 
+#include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -66,12 +73,14 @@
  *
  * The usability is likely to be improved later.
  */
-#define MYADDR "10.181.181.11"
+#define MYADDR "10.181.181.0"
 #define MYBCAST "10.181.181.255"
 #define MYMASK "255.255.255.0"
 #define MYGW "10.181.181.1"
 #define IFNAME "virt0" /* XXX: hardcoded */
 
+static in_addr_t myaddr, youraddr;
+
 static void
 configure_interface(void)
 {
@@ -97,13 +106,18 @@
 	if (s == -1)
 		err(1, "configuration socket");
 
+	srandom(time(NULL));
+	myaddr = inet_addr(MYADDR);
+	myaddr = htonl(ntohl(myaddr) + (random() % 126 + 1));
+
 	/* fill out struct ifaliasreq */
 	memset(&ia, 0, sizeof(ia));
 	strcpy(ia.ifra_name, IFNAME);
 	sin = (struct sockaddr_in *)&ia.ifra_addr;
 	sin->sin_family = AF_INET;
 	sin->sin_len = sizeof(struct sockaddr_in);
-	sin->sin_addr.s_addr = inet_addr(MYADDR);
+	sin->sin_addr.s_addr = myaddr;
+	printf("using address %s\n", inet_ntoa(sin->sin_addr));
 
 	sin = (struct sockaddr_in *)&ia.ifra_broadaddr;
 	sin->sin_family = AF_INET;
@@ -190,6 +204,118 @@
 	printf("total mbufs: %d\n", totalmbuf);
 }
 
+static void
+dobpfread(void)
+{
+	struct bpf_program bpf_prog;
+	struct bpf_insn bpf_ins;
+	struct bpf_hdr *bhdr;
+	void *buf;
+	struct ifreq ifr;
+	int bpfd;
+	u_int bpflen, x;
+
+	bpfd = rump_sys_open("/dev/bpf", O_RDWR);
+	if (bpfd == -1)
+		err(1, "bpf open");
+
+	if (rump_sys_ioctl(bpfd, BIOCGBLEN, &bpflen) == -1)
+		err(1, "BIOCGBLEN");
+
+	buf = malloc(bpflen);
+	if (buf == NULL)
+		err(1, "malloc bpfbuf");
+
+	memset(&ifr, 0, sizeof(ifr));
+	strcpy(ifr.ifr_name, IFNAME);
+
+	if (rump_sys_ioctl(bpfd, BIOCSETIF, &ifr) == -1)
+		err(1, "BIOCSETIF");
+
+	/* accept all packets up to 9000 bytes */
+	memset(&bpf_ins, 0, sizeof(bpf_ins));
+	bpf_ins.code = BPF_RET + BPF_K;
+	bpf_ins.k = 9000;
+	bpf_prog.bf_len = 1;
+	bpf_prog.bf_insns = &bpf_ins;
+	if (rump_sys_ioctl(bpfd, BIOCSETF, &bpf_prog) == -1)
+		err(1, "BIOCSETF");
+
+	/* we want all packets delivered immediately */
+	x = 1;
+	if (rump_sys_ioctl(bpfd, BIOCIMMEDIATE, &x) == -1)
+		err(1, "BIOCIMMEDIATE");
+
+
+	for (;;) {
+		char fmt[64];
+		struct ether_header *ehdr;
+		struct ip *ip;
+		struct tcphdr *tcph;
+		ssize_t n;
+
+		memset(buf, 0, bpflen);
+		n = rump_sys_read(bpfd, buf, bpflen);
+		if (n == 0) {
+			printf("EOF\n");
+			exit(0);
+		} else if (n == -1) {
+			err(1, "read");
+		}
+
+		bhdr = buf;
+		while (bhdr->bh_caplen) {
+			printf("got packet, caplen %d\n", bhdr->bh_caplen);
+			ehdr = (void *)((uint8_t *)bhdr + bhdr->bh_hdrlen);
+			switch (ntohs(ehdr->ether_type)) {
+			case ETHERTYPE_ARP:
+printf("ARP\n");
+break;
+			case ETHERTYPE_IP:
+printf("IP, ");
+ip = (void *)((uint8_t *)ehdr + sizeof(*ehdr));
+printf("version %d, proto ", ip->ip_v);
+if (ip->ip_p == IPPROTO_TCP)
+	printf("TCP");
+else if (ip->ip_p == IPPROTO_UDP)
+	printf("UDP");
+else
+	printf("unknown");
+printf("\n");
+
+/*
+ * if it's the droids we're looking for,
+ * print segment contents.
+ */
+if (ip->ip_src.s_addr != youraddr ||
+ip->ip_dst.s_addr != myaddr ||
+ip->ip_p != IPPROTO_TCP)
+	break;
+tcph = (void *)((uint8_t *)ip + (ip->ip_hl<<2));
+if (ntohs(tcph->th_sport) != 80)
+	break;
+
+printf("requested data:\n");
+sprintf(fmt, "%%%ds\n",
+ntohs(ip->ip_len) - (ip->ip_hl<<2));
+printf(fmt, (char *)tcph + (tcph->th_off<<2));
+
+break;
+			case ETHERTYPE_IPV6:
+printf("IPv6\n");
+break;
+			default:
+printf("unknown type 0x%04x\n",
+ntohs(ehdr->ether_type));
+break;
+			}
+
+			bhdr = (void *)((uint8_t *)bhdr +
+			BPF_WORDALIGN(bhdr->bh_hdrlen + bhdr->bh_caplen));
+		}
+	}
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -

CVS commit: src/share/man/man4

2010-01-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan 16 18:47:50 UTC 2010

Modified Files:
src/share/man/man4: bpf.4

Log Message:
update type of bh_tstamp


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/share/man/man4/bpf.4

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

Modified files:

Index: src/share/man/man4/bpf.4
diff -u src/share/man/man4/bpf.4:1.41 src/share/man/man4/bpf.4:1.42
--- src/share/man/man4/bpf.4:1.41	Fri Jun  5 08:40:51 2009
+++ src/share/man/man4/bpf.4	Sat Jan 16 18:47:50 2010
@@ -1,6 +1,6 @@
 .\" -*- nroff -*-
 .\"
-.\"	$NetBSD: bpf.4,v 1.41 2009/06/05 08:40:51 jnemeth Exp $
+.\"	$NetBSD: bpf.4,v 1.42 2010/01/16 18:47:50 pooka Exp $
 .\"
 .\" Copyright (c) 1990, 1991, 1992, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -24,7 +24,7 @@
 .\" This document is derived in part from the enet man page (enet.4)
 .\" distributed with 4.3BSD Unix.
 .\"
-.Dd August 4, 2006
+.Dd January 16, 2010
 .Dt BPF 4
 .Os
 .Sh NAME
@@ -348,7 +348,7 @@
 .Xr read 2 :
 .Bd -literal -offset indent
 struct bpf_hdr {
-	struct timeval bh_tstamp;
+	struct bpf_timeval bh_tstamp;
 	uint32_t bh_caplen;
 	uint32_t bh_datalen;
 	uint16_t bh_hdrlen;
@@ -359,6 +359,10 @@
 .Bl -tag -width bh_datalen -offset indent
 .It Va bh_tstamp
 The time at which the packet was processed by the packet filter.
+This structure differs from the standard
+.Vt struct timeval
+in that both members are of type
+.Vt long .
 .It Va bh_caplen
 The length of the captured portion of the packet.
 This is the minimum of



CVS commit: src/sys/dev/bi

2010-01-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sat Jan 16 18:43:34 UTC 2010

Modified Files:
src/sys/dev/bi: kdb.c

Log Message:
Delete some dead (#ifdef notyet) code.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/bi/kdb.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/dev/bi/kdb.c
diff -u src/sys/dev/bi/kdb.c:1.46 src/sys/dev/bi/kdb.c:1.47
--- src/sys/dev/bi/kdb.c:1.46	Mon Nov 23 02:13:45 2009
+++ src/sys/dev/bi/kdb.c	Sat Jan 16 18:43:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kdb.c,v 1.46 2009/11/23 02:13:45 rmind Exp $ */
+/*	$NetBSD: kdb.c,v 1.47 2010/01/16 18:43:34 dyoung Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.46 2009/11/23 02:13:45 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.47 2010/01/16 18:43:34 dyoung Exp $");
 
 #include 
 #include 
@@ -302,34 +302,6 @@
 	KERNEL_UNLOCK_ONE(NULL);
 }
 
-#ifdef notyet
-/*
- * The KDB50 has been reset.  Reinitialise the controller
- * and requeue outstanding I/O.
- */
-void
-kdbreset(int ctlr)
-{
-	struct kdb_softc *sc;
-
-	sc = device_lookup_private(&kdb_cd, ctlr);
-	printf(" kdb%d", ctlr);
-
-
-	/* reset queues and requeue pending transfers */
-	mscp_requeue(sc->sc_softc);
-
-	/*
-	 * If it fails to initialise we will notice later and
-	 * try again (and again...).  Do not call kdbstart()
-	 * here; it will be done after the controller finishes
-	 * initialisation.
-	 */
-	if (kdbinit(sc))
-		printf(" (hung)");
-}
-#endif
-
 void
 kdbctlrdone(device_t usc)
 {



CVS commit: [netbsd-5] src/sys/fs/puffs

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:52:13 UTC 2010

Modified Files:
src/sys/fs/puffs [netbsd-5]: puffs_vnops.c

Log Message:
Pull up following revision(s) (requested by pooka in ticket #1244):
sys/fs/puffs/puffs_vnops.c: revision 1.142
Since VOP_GETATTR() does not require a locked vnode, resolve and
reference the puffs_node before sending the request to the file
server.  This diminishes the window where the inode can be reclaimed
and be invalidated before it is accessed (but does not completely
eliminate the race, as that is a caller problem which we cannot
fix here).


To generate a diff of this commit:
cvs rdiff -u -r1.129.4.6 -r1.129.4.7 src/sys/fs/puffs/puffs_vnops.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/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.129.4.6 src/sys/fs/puffs/puffs_vnops.c:1.129.4.7
--- src/sys/fs/puffs/puffs_vnops.c:1.129.4.6	Fri Dec 18 05:58:26 2009
+++ src/sys/fs/puffs/puffs_vnops.c	Sat Jan 16 17:52:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.129.4.6 2009/12/18 05:58:26 snj Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.129.4.7 2010/01/16 17:52:13 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.129.4.6 2009/12/18 05:58:26 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.129.4.7 2010/01/16 17:52:13 bouyer Exp $");
 
 #include 
 #include 
@@ -837,9 +837,10 @@
 	struct mount *mp = vp->v_mount;
 	struct puffs_mount *pmp = MPTOPUFFSMP(mp);
 	struct vattr *vap, *rvap;
-	struct puffs_node *pn;
+	struct puffs_node *pn = VPTOPP(vp);
 	int error = 0;
 
+	REFPN(pn);
 	vap = ap->a_vap;
 
 	PUFFS_MSG_ALLOC(vn, getattr);
@@ -870,7 +871,6 @@
 	(void) memcpy(vap, rvap, sizeof(struct vattr));
 	vap->va_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0];
 
-	pn = VPTOPP(vp);
 	if (pn->pn_stat & PNODE_METACACHE_ATIME)
 		vap->va_atime = pn->pn_mc_atime;
 	if (pn->pn_stat & PNODE_METACACHE_CTIME)
@@ -888,6 +888,7 @@
 	}
 
  out:
+	puffs_releasenode(pn);
 	PUFFS_MSG_RELEASE(getattr);
 	return error;
 }



CVS commit: [netbsd-5] src/sys/dev/usb

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:50:13 UTC 2010

Modified Files:
src/sys/dev/usb [netbsd-5]: usbdevs.h usbdevs_data.h

Log Message:
Regen for ticket 1243


To generate a diff of this commit:
cvs rdiff -u -r1.515.4.3 -r1.515.4.4 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.516.4.3 -r1.516.4.4 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.515.4.3 src/sys/dev/usb/usbdevs.h:1.515.4.4
--- src/sys/dev/usb/usbdevs.h:1.515.4.3	Fri Nov 27 08:54:35 2009
+++ src/sys/dev/usb/usbdevs.h	Sat Jan 16 17:50:13 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.515.4.3 2009/11/27 08:54:35 sborrill Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.515.4.4 2010/01/16 17:50:13 bouyer Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.519.4.3 2009/11/27 08:54:13 sborrill Exp
+ *	NetBSD
  */
 
 /*
@@ -1550,7 +1550,8 @@
 #define	USB_PRODUCT_MICROSOFT_XBOX_CONTROLLER_S10	0x0285		/* Xbox Controller S (1.0) */
 #define	USB_PRODUCT_MICROSOFT_XBOX_CONTROLLER_HUB	0x0288		/* Xbox Controller Hub */
 #define	USB_PRODUCT_MICROSOFT_XBOX_CONTROLLER_S12	0x0289		/* Xbox Controller S (1.2) */
-#define	USB_PRODUCT_MICROSOFT_24GHZ_XCVR	0x071f		/* 2.4GHz Transceiver V2.0 */
+#define	USB_PRODUCT_MICROSOFT_24GHZ_XCVR10	0x071d		/* 2.4GHz Transceiver V1.0 */
+#define	USB_PRODUCT_MICROSOFT_24GHZ_XCVR20	0x071f		/* 2.4GHz Transceiver V2.0 */
 
 /* Microtech products */
 #define	USB_PRODUCT_MICROTECH_SCSIDB25	0x0004		/* USB-SCSI-DB25 */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.516.4.3 src/sys/dev/usb/usbdevs_data.h:1.516.4.4
--- src/sys/dev/usb/usbdevs_data.h:1.516.4.3	Fri Nov 27 08:54:35 2009
+++ src/sys/dev/usb/usbdevs_data.h	Sat Jan 16 17:50:13 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.516.4.3 2009/11/27 08:54:35 sborrill Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.516.4.4 2010/01/16 17:50:13 bouyer Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.519.4.3 2009/11/27 08:54:13 sborrill Exp
+ *	NetBSD
  */
 
 /*
@@ -4583,7 +4583,11 @@
 	"Xbox Controller S (1.2)",
 	},
 	{
-	USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_24GHZ_XCVR,
+	USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_24GHZ_XCVR10,
+	"2.4GHz Transceiver V1.0",
+	},
+	{
+	USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_24GHZ_XCVR20,
 	"2.4GHz Transceiver V2.0",
 	},
 	{
@@ -6831,4 +6835,4 @@
 	"Prestige",
 	},
 };
-const int usb_nproducts = 1243;
+const int usb_nproducts = 1244;



CVS commit: [netbsd-5] src/sys/dev/usb

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:47:13 UTC 2010

Modified Files:
src/sys/dev/usb [netbsd-5]: ums.c usbdevs

Log Message:
Pull up following revision(s) (requested by matthias in ticket #1243):
sys/dev/usb/usbdevs.h: regen
sys/dev/usb/usbdevs_data.h: regen
sys/dev/usb/usbdevs: revision 1.540
sys/dev/usb/ums.c: revision 1.80
Make ums.c work with a "Microsoft Natural Ergonomic Desktop 7000" mouse.
XXX The tilt function still doesn't work for me.


To generate a diff of this commit:
cvs rdiff -u -r1.73.8.2 -r1.73.8.3 src/sys/dev/usb/ums.c
cvs rdiff -u -r1.519.4.3 -r1.519.4.4 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/ums.c
diff -u src/sys/dev/usb/ums.c:1.73.8.2 src/sys/dev/usb/ums.c:1.73.8.3
--- src/sys/dev/usb/ums.c:1.73.8.2	Fri Nov 27 09:49:42 2009
+++ src/sys/dev/usb/ums.c	Sat Jan 16 17:47:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ums.c,v 1.73.8.2 2009/11/27 09:49:42 sborrill Exp $	*/
+/*	$NetBSD: ums.c,v 1.73.8.3 2010/01/16 17:47:12 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.73.8.2 2009/11/27 09:49:42 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.73.8.3 2010/01/16 17:47:12 bouyer Exp $");
 
 #include 
 #include 
@@ -278,7 +278,8 @@
 	 * in bytes 3 & 4 of the report.  Fix this if necessary.
 	 */
 	if (uha->uaa->vendor == USB_VENDOR_MICROSOFT &&
-	uha->uaa->product == USB_PRODUCT_MICROSOFT_24GHZ_XCVR) {
+	(uha->uaa->product == USB_PRODUCT_MICROSOFT_24GHZ_XCVR10 ||
+	 uha->uaa->product == USB_PRODUCT_MICROSOFT_24GHZ_XCVR20)) {	
 		if ((sc->flags & UMS_Z) && sc->sc_loc_z.pos == 0)
 			sc->sc_loc_z.pos = 24;
 		if ((sc->flags & UMS_W) && sc->sc_loc_w.pos == 0)

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.519.4.3 src/sys/dev/usb/usbdevs:1.519.4.4
--- src/sys/dev/usb/usbdevs:1.519.4.3	Fri Nov 27 08:54:13 2009
+++ src/sys/dev/usb/usbdevs	Sat Jan 16 17:47:12 2010
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.519.4.3 2009/11/27 08:54:13 sborrill Exp $
+$NetBSD: usbdevs,v 1.519.4.4 2010/01/16 17:47:12 bouyer Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1543,7 +1543,8 @@
 product MICROSOFT XBOX_CONTROLLER_S10	0x0285	Xbox Controller S (1.0)
 product MICROSOFT XBOX_CONTROLLER_HUB	0x0288	Xbox Controller Hub
 product MICROSOFT XBOX_CONTROLLER_S12	0x0289	Xbox Controller S (1.2)
-product MICROSOFT 24GHZ_XCVR		0x071f  2.4GHz Transceiver V2.0
+product MICROSOFT 24GHZ_XCVR10		0x071d  2.4GHz Transceiver V1.0
+product MICROSOFT 24GHZ_XCVR20		0x071f  2.4GHz Transceiver V2.0
 
 /* Microtech products */
 product MICROTECH SCSIDB25	0x0004	USB-SCSI-DB25



CVS commit: src/sys/rump

2010-01-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan 16 18:02:19 UTC 2010

Added Files:
src/sys/rump/librump/rumpkern/opt: bpfilter.h
Removed Files:
src/sys/rump/net/lib/libnet/opt: bpfilter.h

Log Message:
move bpfilter.h to a more central location


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/opt/bpfilter.h
cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libnet/opt/bpfilter.h

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

Added files:

Index: src/sys/rump/librump/rumpkern/opt/bpfilter.h
diff -u /dev/null src/sys/rump/librump/rumpkern/opt/bpfilter.h:1.1
--- /dev/null	Sat Jan 16 18:02:19 2010
+++ src/sys/rump/librump/rumpkern/opt/bpfilter.h	Sat Jan 16 18:02:19 2010
@@ -0,0 +1,3 @@
+/*	$NetBSD: bpfilter.h,v 1.1 2010/01/16 18:02:19 pooka Exp $	*/
+
+/* dummy */



CVS commit: [netbsd-5] src/doc

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:55:39 UTC 2010

Modified Files:
src/doc [netbsd-5]: CHANGES-5.1

Log Message:
tickets 1215, 1238-1245


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.174 -r1.1.2.175 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.174 src/doc/CHANGES-5.1:1.1.2.175
--- src/doc/CHANGES-5.1:1.1.2.174	Fri Jan 15 04:21:58 2010
+++ src/doc/CHANGES-5.1	Sat Jan 16 17:55:39 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.174 2010/01/15 04:21:58 snj Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.175 2010/01/16 17:55:39 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -16023,3 +16023,68 @@
 	Disable OpenSSL renegotiation, thus avoiding CVE-2009-3555.
 	[tonnerre, ticket #1237]
 
+gnu/usr.bin/xcvs/cvsbug/Makefile 		patch
+
+	Properly replace @MKTEMP_SH_FUNCTION@, @MKTEMP@, and @sendm...@.
+	Fixes PR bin/39629.
+	[snj, ticket #1215]
+
+sys/kern/kern_sig.c1.302
+
+	sigactsunshare(): set reference count in a case of new sigacts
+	allocation.
+	Bug (e.g. memory leak) can happen when using clone(2) call.
+	[rmind, ticket #1238]
+
+external/mit/xorg/lib/dri/i915/Makefile		1.5, 1.6
+external/mit/xorg/lib/dri/i965/Makefile		1.7, 1.8
+
+	replace LIBS with LIBDPLIBS.  makes these actually link against
+	drm_intel.  should fix a problem reported by s...@.
+	link in libOSMesa as well.
+	[mrg, ticket #1239]
+
+sys/kern/kern_runq.c1.28
+
+	sched_catchlwp: fix the case when other CPU might see
+	curlwp->l_cpu != curcpu() while LWP is finishing context switch.
+	Should fix PR/42539, tested by mar...@.
+	[rmind, ticket #1240]
+
+sys/kern/kern_softint.c1.30
+
+	softint_execute: release/re-acquire kernel-lock depending on
+	SOFTINT_MPSAFE flag.  Keeping it held for MP-safe cases break the
+	lock order assumptions.  Per discussion with .
+	[rmind, ticket #1241]
+
+distrib/utils/sysinst/net.c			1.124
+
+	Use the proper structs for ioctls to fetch network configuration.
+	Might fix PR 42436.
+	[martin, ticket #1242]
+
+sys/dev/usb/ums.c1.80
+sys/dev/usb/usbdevs1.540
+sys/dev/usb/usbdevs.hregen
+sys/dev/usb/usbdevs_data.h			regen
+
+	Make ums.c work with a "Microsoft Natural Ergonomic Desktop 7000" mouse.
+	XXX The tilt function still doesn't work for me.
+	[matthias, ticket #1243]
+
+sys/fs/puffs/puffs_vnops.c			1.142
+
+	Since VOP_GETATTR() does not require a locked vnode, resolve and
+	reference the puffs_node before sending the request to the file
+	server.  This diminishes the window where the inode can be reclaimed
+	and be invalidated before it is accessed (but does not completely
+	eliminate the race, as that is a caller problem which we cannot
+	fix here).
+	[pooka, ticket #1244]
+
+sys/arch/amd64/include/byte_swap.h		1.7
+
+	Provide inline assembly version of bswap64.
+	[joerg, ticket #1245]
+



CVS commit: src/sys/rump/net/lib/libvirtif

2010-01-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan 16 17:55:50 UTC 2010

Modified Files:
src/sys/rump/net/lib/libvirtif: if_virt.c

Log Message:
support bpf


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/rump/net/lib/libvirtif/if_virt.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/rump/net/lib/libvirtif/if_virt.c
diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.14 src/sys/rump/net/lib/libvirtif/if_virt.c:1.15
--- src/sys/rump/net/lib/libvirtif/if_virt.c:1.14	Wed Oct 14 18:18:53 2009
+++ src/sys/rump/net/lib/libvirtif/if_virt.c	Sat Jan 16 17:55:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_virt.c,v 1.14 2009/10/14 18:18:53 pooka Exp $	*/
+/*	$NetBSD: if_virt.c,v 1.15 2010/01/16 17:55:50 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.14 2009/10/14 18:18:53 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.15 2010/01/16 17:55:50 pooka Exp $");
 
 #include 
 #include 
@@ -38,6 +38,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -51,6 +52,8 @@
 #include "rump_private.h"
 #include "rump_net_private.h"
 
+#include "bpfilter.h"
+
 /*
  * Virtual interface for userspace purposes.  Uses tap(4) to
  * interface with the kernel and just simply shovels data
@@ -231,6 +234,11 @@
 		}
 		m->m_len = m->m_pkthdr.len = n;
 		m->m_pkthdr.rcvif = ifp;
+#if NBPFILTER > 0
+		if (ifp->if_bpf) {
+			bpf_mtap(ifp->if_bpf, m);
+		}
+#endif
 		ether_input(ifp, m);
 	}
 
@@ -265,6 +273,11 @@
 		}
 		if (i == LB_SH)
 			panic("lazy bum");
+#if NBPFILTER > 0
+		if (ifp->if_bpf) {
+			bpf_mtap(ifp->if_bpf, m0);
+		}
+#endif
 		rumpuser_writev(sc->sc_tapfd, io, i, &error);
 		m_freem(m0);
 		mutex_enter(&sc->sc_sendmtx);



CVS commit: [netbsd-5-0] src/doc

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:54:33 UTC 2010

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.1

Log Message:
tickets 1238, 1240,1241


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-5.0.1

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

Modified files:

Index: src/doc/CHANGES-5.0.1
diff -u src/doc/CHANGES-5.0.1:1.1.2.44 src/doc/CHANGES-5.0.1:1.1.2.45
--- src/doc/CHANGES-5.0.1:1.1.2.44	Wed Jul 29 22:35:18 2009
+++ src/doc/CHANGES-5.0.1	Sat Jan 16 17:54:33 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.1,v 1.1.2.44 2009/07/29 22:35:18 snj Exp $
+# $NetBSD: CHANGES-5.0.1,v 1.1.2.45 2010/01/16 17:54:33 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.0.1
 release:
@@ -733,3 +733,24 @@
 	Welcome to 5.0.1!
 	[snj]
 
+sys/kern/kern_sig.c1.302
+
+	sigactsunshare(): set reference count in a case of new sigacts
+	allocation.
+	Bug (e.g. memory leak) can happen when using clone(2) call.
+	[rmind, ticket #1238]
+
+sys/kern/kern_runq.c1.28
+
+	sched_catchlwp: fix the case when other CPU might see
+	curlwp->l_cpu != curcpu() while LWP is finishing context switch.
+	Should fix PR/42539, tested by mar...@.
+	[rmind, ticket #1240]
+
+sys/kern/kern_softint.c1.30
+
+	softint_execute: release/re-acquire kernel-lock depending on
+	SOFTINT_MPSAFE flag.  Keeping it held for MP-safe cases break the
+	lock order assumptions.  Per discussion with .
+	[rmind, ticket #1241]
+



CVS commit: [netbsd-5] src/sys/arch/amd64/include

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:53:52 UTC 2010

Modified Files:
src/sys/arch/amd64/include [netbsd-5]: byte_swap.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1245):
sys/arch/amd64/include/byte_swap.h: revision 1.7
Provide inline assembly version of bswap64.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/arch/amd64/include/byte_swap.h

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/include/byte_swap.h
diff -u src/sys/arch/amd64/include/byte_swap.h:1.6 src/sys/arch/amd64/include/byte_swap.h:1.6.4.1
--- src/sys/arch/amd64/include/byte_swap.h:1.6	Sun Oct 26 00:08:15 2008
+++ src/sys/arch/amd64/include/byte_swap.h	Sat Jan 16 17:53:52 2010
@@ -1,7 +1,7 @@
-/*	$NetBSD: byte_swap.h,v 1.6 2008/10/26 00:08:15 mrg Exp $	*/
+/*	$NetBSD: byte_swap.h,v 1.6.4.1 2010/01/16 17:53:52 bouyer Exp $	*/
 
 /*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -42,6 +42,15 @@
 #include 
 __BEGIN_DECLS
 
+#define	__BYTE_SWAP_U64_VARIABLE __byte_swap_u64_variable
+static __inline uint64_t __byte_swap_u64_variable(uint64_t);
+static __inline uint64_t
+__byte_swap_u64_variable(uint64_t x)
+{
+	__asm volatile ( "bswap %1" : "=r" (x) : "0" (x));
+	return (x);
+}
+
 #define	__BYTE_SWAP_U32_VARIABLE __byte_swap_u32_variable
 static __inline uint32_t __byte_swap_u32_variable(uint32_t);
 static __inline uint32_t



CVS commit: [netbsd-5] src/distrib/utils/sysinst

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:43:34 UTC 2010

Modified Files:
src/distrib/utils/sysinst [netbsd-5]: net.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1242):
distrib/utils/sysinst/net.c: revision 1.124
Use the proper structs for ioctls to fetch network configuration.
Might fix PR 42436.


To generate a diff of this commit:
cvs rdiff -u -r1.117.8.2 -r1.117.8.3 src/distrib/utils/sysinst/net.c

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

Modified files:

Index: src/distrib/utils/sysinst/net.c
diff -u src/distrib/utils/sysinst/net.c:1.117.8.2 src/distrib/utils/sysinst/net.c:1.117.8.3
--- src/distrib/utils/sysinst/net.c:1.117.8.2	Thu Jan 22 22:18:26 2009
+++ src/distrib/utils/sysinst/net.c	Sat Jan 16 17:43:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: net.c,v 1.117.8.2 2009/01/22 22:18:26 snj Exp $	*/
+/*	$NetBSD: net.c,v 1.117.8.3 2010/01/16 17:43:34 bouyer Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -301,7 +301,25 @@
 }
 
 static int
-do_ifreq(struct ifmediareq *ifmr, unsigned long cmd)
+do_ifreq(struct ifreq *ifr, unsigned long cmd)
+{
+	int sock;
+	int rval;
+
+	sock = socket(PF_INET, SOCK_DGRAM, 0);
+	if (sock == -1)
+		return -1;
+
+	memset(ifr, 0, sizeof *ifr);
+	strncpy(ifr->ifr_name, net_dev, sizeof ifr->ifr_name);
+	rval = ioctl(sock, cmd, ifr);
+	close(sock);
+
+	return rval;
+}
+
+static int
+do_ifmreq(struct ifmediareq *ifmr, unsigned long cmd)
 {
 	int sock;
 	int rval;
@@ -322,19 +340,20 @@
 static void
 get_ifinterface_info(void)
 {
+	struct ifreq ifr;
 	struct ifmediareq ifmr;
-	struct sockaddr_in *sa_in = (void *)&((struct ifreq *)&ifmr)->ifr_addr;
+	struct sockaddr_in *sa_in = (void*)&ifr.ifr_addr;
 	int modew;
 	const char *media_opt;
 	const char *sep;
 
-	if (do_ifreq(&ifmr, SIOCGIFADDR) == 0 && sa_in->sin_addr.s_addr != 0)
+	if (do_ifreq(&ifr, SIOCGIFADDR) == 0 && sa_in->sin_addr.s_addr != 0)
 		strlcpy(net_ip, inet_ntoa(sa_in->sin_addr), sizeof net_ip);
 
-	if (do_ifreq(&ifmr, SIOCGIFNETMASK) == 0 && sa_in->sin_addr.s_addr != 0)
+	if (do_ifreq(&ifr, SIOCGIFNETMASK) == 0 && sa_in->sin_addr.s_addr != 0)
 		strlcpy(net_mask, inet_ntoa(sa_in->sin_addr), sizeof net_mask);
 
-	if (do_ifreq(&ifmr, SIOCGIFMEDIA) == 0) {
+	if (do_ifmreq(&ifmr, SIOCGIFMEDIA) == 0) {
 		/* Get the name of the media word */
 		modew = ifmr.ifm_current;
 		strlcpy(net_media, get_media_subtype_string(modew),



CVS commit: [netbsd-5] src/sys/kern

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:41:14 UTC 2010

Modified Files:
src/sys/kern [netbsd-5]: kern_softint.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1241):
sys/kern/kern_softint.c: revision 1.30
softint_execute: release/re-acquire kernel-lock depending on SOFTINT_MPSAFE
flag.  Keeping it held for MP-safe cases break the lock order assumptions.
Per discussion with .


To generate a diff of this commit:
cvs rdiff -u -r1.23.4.2 -r1.23.4.3 src/sys/kern/kern_softint.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/kern/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.23.4.2 src/sys/kern/kern_softint.c:1.23.4.3
--- src/sys/kern/kern_softint.c:1.23.4.2	Mon Feb  2 03:40:11 2009
+++ src/sys/kern/kern_softint.c	Sat Jan 16 17:41:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.23.4.2 2009/02/02 03:40:11 snj Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.23.4.3 2010/01/16 17:41:14 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.23.4.2 2009/02/02 03:40:11 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.23.4.3 2010/01/16 17:41:14 bouyer Exp $");
 
 #include 
 #include 
@@ -527,7 +527,12 @@
 		splx(s);
 
 		/* Run the handler. */
-		if ((sh->sh_flags & SOFTINT_MPSAFE) == 0 && !havelock) {
+		if (sh->sh_flags & SOFTINT_MPSAFE) {
+			if (havelock) {
+KERNEL_UNLOCK_ONE(l);
+havelock = false;
+			}
+		} else if (!havelock) {
 			KERNEL_LOCK(1, l);
 			havelock = true;
 		}



CVS commit: [netbsd-5-0] src/sys/kern

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:41:07 UTC 2010

Modified Files:
src/sys/kern [netbsd-5-0]: kern_softint.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1241):
sys/kern/kern_softint.c: revision 1.30
softint_execute: release/re-acquire kernel-lock depending on SOFTINT_MPSAFE
flag.  Keeping it held for MP-safe cases break the lock order assumptions.
Per discussion with .


To generate a diff of this commit:
cvs rdiff -u -r1.23.4.2 -r1.23.4.2.2.1 src/sys/kern/kern_softint.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/kern/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.23.4.2 src/sys/kern/kern_softint.c:1.23.4.2.2.1
--- src/sys/kern/kern_softint.c:1.23.4.2	Mon Feb  2 03:40:11 2009
+++ src/sys/kern/kern_softint.c	Sat Jan 16 17:41:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.23.4.2 2009/02/02 03:40:11 snj Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.23.4.2.2.1 2010/01/16 17:41:07 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.23.4.2 2009/02/02 03:40:11 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.23.4.2.2.1 2010/01/16 17:41:07 bouyer Exp $");
 
 #include 
 #include 
@@ -527,7 +527,12 @@
 		splx(s);
 
 		/* Run the handler. */
-		if ((sh->sh_flags & SOFTINT_MPSAFE) == 0 && !havelock) {
+		if (sh->sh_flags & SOFTINT_MPSAFE) {
+			if (havelock) {
+KERNEL_UNLOCK_ONE(l);
+havelock = false;
+			}
+		} else if (!havelock) {
 			KERNEL_LOCK(1, l);
 			havelock = true;
 		}



CVS commit: [netbsd-5-0] src/sys/kern

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:39:07 UTC 2010

Modified Files:
src/sys/kern [netbsd-5-0]: kern_runq.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1240):
sys/kern/kern_runq.c: revision 1.28
sched_catchlwp: fix the case when other CPU might see curlwp->l_cpu != curcpu()
while LWP is finishing context switch.  Should fix PR/42539, tested by mar...@.


To generate a diff of this commit:
cvs rdiff -u -r1.22.4.3 -r1.22.4.3.2.1 src/sys/kern/kern_runq.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/kern/kern_runq.c
diff -u src/sys/kern/kern_runq.c:1.22.4.3 src/sys/kern/kern_runq.c:1.22.4.3.2.1
--- src/sys/kern/kern_runq.c:1.22.4.3	Mon Mar  2 19:51:01 2009
+++ src/sys/kern/kern_runq.c	Sat Jan 16 17:39:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_runq.c,v 1.22.4.3 2009/03/02 19:51:01 snj Exp $	*/
+/*	$NetBSD: kern_runq.c,v 1.22.4.3.2.1 2010/01/16 17:39:07 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.22.4.3 2009/03/02 19:51:01 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.22.4.3.2.1 2010/01/16 17:39:07 bouyer Exp $");
 
 #include 
 #include 
@@ -482,6 +482,17 @@
 
 		/* Grab the thread, and move to the local run queue */
 		sched_dequeue(l);
+
+		/*
+		 * If LWP is still context switching, we may need to
+		 * spin-wait before changing its CPU.
+		 */
+		if (__predict_false(l->l_ctxswtch != 0)) {
+			u_int count;
+			count = SPINLOCK_BACKOFF_MIN;
+			while (l->l_ctxswtch)
+SPINLOCK_BACKOFF(count);
+		}
 		l->l_cpu = curci;
 		ci_rq->r_ev_pull.ev_count++;
 		lwp_unlock_to(l, curspc->spc_mutex);



CVS commit: [netbsd-5] src/sys/kern

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:39:01 UTC 2010

Modified Files:
src/sys/kern [netbsd-5]: kern_runq.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1240):
sys/kern/kern_runq.c: revision 1.28
sched_catchlwp: fix the case when other CPU might see curlwp->l_cpu != curcpu()
while LWP is finishing context switch.  Should fix PR/42539, tested by mar...@.


To generate a diff of this commit:
cvs rdiff -u -r1.22.4.3 -r1.22.4.4 src/sys/kern/kern_runq.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/kern/kern_runq.c
diff -u src/sys/kern/kern_runq.c:1.22.4.3 src/sys/kern/kern_runq.c:1.22.4.4
--- src/sys/kern/kern_runq.c:1.22.4.3	Mon Mar  2 19:51:01 2009
+++ src/sys/kern/kern_runq.c	Sat Jan 16 17:39:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_runq.c,v 1.22.4.3 2009/03/02 19:51:01 snj Exp $	*/
+/*	$NetBSD: kern_runq.c,v 1.22.4.4 2010/01/16 17:39:01 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.22.4.3 2009/03/02 19:51:01 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.22.4.4 2010/01/16 17:39:01 bouyer Exp $");
 
 #include 
 #include 
@@ -482,6 +482,17 @@
 
 		/* Grab the thread, and move to the local run queue */
 		sched_dequeue(l);
+
+		/*
+		 * If LWP is still context switching, we may need to
+		 * spin-wait before changing its CPU.
+		 */
+		if (__predict_false(l->l_ctxswtch != 0)) {
+			u_int count;
+			count = SPINLOCK_BACKOFF_MIN;
+			while (l->l_ctxswtch)
+SPINLOCK_BACKOFF(count);
+		}
 		l->l_cpu = curci;
 		ci_rq->r_ev_pull.ev_count++;
 		lwp_unlock_to(l, curspc->spc_mutex);



CVS commit: [netbsd-5] src/external/mit/xorg/lib/dri

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:36:44 UTC 2010

Modified Files:
src/external/mit/xorg/lib/dri/i915 [netbsd-5]: Makefile
src/external/mit/xorg/lib/dri/i965 [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1239):
external/mit/xorg/lib/dri/i965/Makefile: revisions 1.7, 1.8
external/mit/xorg/lib/dri/i915/Makefile: revisions 1.5, 1.6
replace LIBS with LIBDPLIBS.  makes these actually link against drm_intel.
should fix a problem reported by s...@.
link in libOSMesa as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2.6.2 -r1.2.6.3 src/external/mit/xorg/lib/dri/i915/Makefile
cvs rdiff -u -r1.3.6.3 -r1.3.6.4 src/external/mit/xorg/lib/dri/i965/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/lib/dri/i915/Makefile
diff -u src/external/mit/xorg/lib/dri/i915/Makefile:1.2.6.2 src/external/mit/xorg/lib/dri/i915/Makefile:1.2.6.3
--- src/external/mit/xorg/lib/dri/i915/Makefile:1.2.6.2	Fri Nov 13 20:49:08 2009
+++ src/external/mit/xorg/lib/dri/i915/Makefile	Sat Jan 16 17:36:44 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2.6.2 2009/11/13 20:49:08 sborrill Exp $
+# $NetBSD: Makefile,v 1.2.6.3 2010/01/16 17:36:44 bouyer Exp $
 
 MODULE=	i915
 
@@ -58,6 +58,7 @@
 
 CPPFLAGS+=	 -DI915 -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP
 
-LIBS+=	-ldrm_intel
+LIBDPLIBS+=	drm_intel	${.CURDIR}/../../libdrm_intel
+LIBDPLIBS+=	OSMesa		${.CURDIR}/../../libOSMesa
 
 .include "${.CURDIR}/../dri.mk"

Index: src/external/mit/xorg/lib/dri/i965/Makefile
diff -u src/external/mit/xorg/lib/dri/i965/Makefile:1.3.6.3 src/external/mit/xorg/lib/dri/i965/Makefile:1.3.6.4
--- src/external/mit/xorg/lib/dri/i965/Makefile:1.3.6.3	Mon Jan 11 00:49:47 2010
+++ src/external/mit/xorg/lib/dri/i965/Makefile	Sat Jan 16 17:36:44 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3.6.3 2010/01/11 00:49:47 snj Exp $
+# $NetBSD: Makefile,v 1.3.6.4 2010/01/16 17:36:44 bouyer Exp $
 
 MODULE=	i965
 
@@ -89,6 +89,7 @@
 
 COPTS.brw_draw_upload.c=	-Wno-error
 
-LIBS+=	-ldrm_intel
+LIBDPLIBS+=	drm_intel	${.CURDIR}/../../libdrm_intel
+LIBDPLIBS+=	OSMesa		${.CURDIR}/../../libOSMesa
 
 .include "${.CURDIR}/../dri.mk"



CVS commit: [netbsd-5] src/sys/kern

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:32:52 UTC 2010

Modified Files:
src/sys/kern [netbsd-5]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1238):
sys/kern/kern_sig.c: revision 1.302
sigactsunshare(): set reference count in a case of new sigacts allocation.
Bug (e.g. memory leak) can happen when using clone(2) call.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.5 -r1.289.4.6 src/sys/kern/kern_sig.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/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.289.4.5 src/sys/kern/kern_sig.c:1.289.4.6
--- src/sys/kern/kern_sig.c:1.289.4.5	Wed Apr  1 21:56:50 2009
+++ src/sys/kern/kern_sig.c	Sat Jan 16 17:32:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.289.4.5 2009/04/01 21:56:50 snj Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.289.4.6 2010/01/16 17:32:52 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.5 2009/04/01 21:56:50 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.6 2010/01/16 17:32:52 bouyer Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_compat_sunos.h"
@@ -200,24 +200,19 @@
 struct sigacts *
 sigactsinit(struct proc *pp, int share)
 {
-	struct sigacts *ps, *ps2;
+	struct sigacts *ps = pp->p_sigacts, *ps2;
 
-	ps = pp->p_sigacts;
-
-	if (share) {
+	if (__predict_false(share)) {
 		atomic_inc_uint(&ps->sa_refcnt);
-		ps2 = ps;
-	} else {
-		ps2 = pool_cache_get(sigacts_cache, PR_WAITOK);
-		/* XXXAD get rid of this */
-		mutex_init(&ps2->sa_mutex, MUTEX_DEFAULT, IPL_SCHED);
-		mutex_enter(&ps->sa_mutex);
-		memcpy(&ps2->sa_sigdesc, ps->sa_sigdesc,
-		sizeof(ps2->sa_sigdesc));
-		mutex_exit(&ps->sa_mutex);
-		ps2->sa_refcnt = 1;
+		return ps;
 	}
+	ps2 = pool_cache_get(sigacts_cache, PR_WAITOK);
+	mutex_init(&ps2->sa_mutex, MUTEX_DEFAULT, IPL_SCHED);
+	ps2->sa_refcnt = 1;
 
+	mutex_enter(&ps->sa_mutex);
+	memcpy(ps2->sa_sigdesc, ps->sa_sigdesc, sizeof(ps2->sa_sigdesc));
+	mutex_exit(&ps->sa_mutex);
 	return ps2;
 }
 
@@ -230,15 +225,16 @@
 void
 sigactsunshare(struct proc *p)
 {
-	struct sigacts *ps, *oldps;
+	struct sigacts *ps, *oldps = p->p_sigacts;
 
-	oldps = p->p_sigacts;
-	if (oldps->sa_refcnt == 1)
+	if (__predict_true(oldps->sa_refcnt == 1))
 		return;
+
 	ps = pool_cache_get(sigacts_cache, PR_WAITOK);
-	/* XXXAD get rid of this */
 	mutex_init(&ps->sa_mutex, MUTEX_DEFAULT, IPL_SCHED);
-	memset(&ps->sa_sigdesc, 0, sizeof(ps->sa_sigdesc));
+	memset(ps->sa_sigdesc, 0, sizeof(ps->sa_sigdesc));
+	ps->sa_refcnt = 1;
+
 	p->p_sigacts = ps;
 	sigactsfree(oldps);
 }



CVS commit: [netbsd-5-0] src/sys/kern

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:32:46 UTC 2010

Modified Files:
src/sys/kern [netbsd-5-0]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1238):
sys/kern/kern_sig.c: revision 1.302
sigactsunshare(): set reference count in a case of new sigacts allocation.
Bug (e.g. memory leak) can happen when using clone(2) call.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.5 -r1.289.4.5.2.1 src/sys/kern/kern_sig.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/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.289.4.5 src/sys/kern/kern_sig.c:1.289.4.5.2.1
--- src/sys/kern/kern_sig.c:1.289.4.5	Wed Apr  1 21:56:50 2009
+++ src/sys/kern/kern_sig.c	Sat Jan 16 17:32:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.289.4.5 2009/04/01 21:56:50 snj Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.289.4.5.2.1 2010/01/16 17:32:45 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.5 2009/04/01 21:56:50 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.5.2.1 2010/01/16 17:32:45 bouyer Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_compat_sunos.h"
@@ -200,24 +200,19 @@
 struct sigacts *
 sigactsinit(struct proc *pp, int share)
 {
-	struct sigacts *ps, *ps2;
+	struct sigacts *ps = pp->p_sigacts, *ps2;
 
-	ps = pp->p_sigacts;
-
-	if (share) {
+	if (__predict_false(share)) {
 		atomic_inc_uint(&ps->sa_refcnt);
-		ps2 = ps;
-	} else {
-		ps2 = pool_cache_get(sigacts_cache, PR_WAITOK);
-		/* XXXAD get rid of this */
-		mutex_init(&ps2->sa_mutex, MUTEX_DEFAULT, IPL_SCHED);
-		mutex_enter(&ps->sa_mutex);
-		memcpy(&ps2->sa_sigdesc, ps->sa_sigdesc,
-		sizeof(ps2->sa_sigdesc));
-		mutex_exit(&ps->sa_mutex);
-		ps2->sa_refcnt = 1;
+		return ps;
 	}
+	ps2 = pool_cache_get(sigacts_cache, PR_WAITOK);
+	mutex_init(&ps2->sa_mutex, MUTEX_DEFAULT, IPL_SCHED);
+	ps2->sa_refcnt = 1;
 
+	mutex_enter(&ps->sa_mutex);
+	memcpy(ps2->sa_sigdesc, ps->sa_sigdesc, sizeof(ps2->sa_sigdesc));
+	mutex_exit(&ps->sa_mutex);
 	return ps2;
 }
 
@@ -230,15 +225,16 @@
 void
 sigactsunshare(struct proc *p)
 {
-	struct sigacts *ps, *oldps;
+	struct sigacts *ps, *oldps = p->p_sigacts;
 
-	oldps = p->p_sigacts;
-	if (oldps->sa_refcnt == 1)
+	if (__predict_true(oldps->sa_refcnt == 1))
 		return;
+
 	ps = pool_cache_get(sigacts_cache, PR_WAITOK);
-	/* XXXAD get rid of this */
 	mutex_init(&ps->sa_mutex, MUTEX_DEFAULT, IPL_SCHED);
-	memset(&ps->sa_sigdesc, 0, sizeof(ps->sa_sigdesc));
+	memset(ps->sa_sigdesc, 0, sizeof(ps->sa_sigdesc));
+	ps->sa_refcnt = 1;
+
 	p->p_sigacts = ps;
 	sigactsfree(oldps);
 }



CVS commit: [netbsd-5] src/gnu/usr.bin/xcvs/cvsbug

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:28:56 UTC 2010

Modified Files:
src/gnu/usr.bin/xcvs/cvsbug [netbsd-5]: Makefile

Log Message:
Apply patch, requested by snj in ticket #1215:
gnu/usr.bin/xcvs/cvsbug/Makefile: patch
Properly replace @MKTEMP_SH_FUNCTION@, @MKTEMP@, and @sendm...@.
Fixes PR bin/39629.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 src/gnu/usr.bin/xcvs/cvsbug/Makefile

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

Modified files:

Index: src/gnu/usr.bin/xcvs/cvsbug/Makefile
diff -u src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2 src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2.2.1
--- src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2	Sat Oct 25 22:27:35 2008
+++ src/gnu/usr.bin/xcvs/cvsbug/Makefile	Sat Jan 16 17:28:56 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/10/25 22:27:35 apb Exp $
+#	$NetBSD: Makefile,v 1.2.2.1 2010/01/16 17:28:56 bouyer Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -12,7 +12,10 @@
 cvsbug: cvsbug.in
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e 's,@PACKAGE_BUGREPORT@,bug-...@gnu.org,g' \
-	-e "s,@VERSION@,`cat .fname`,g" ${.ALLSRC} > ${.TARGET}
+	-e "s,@VERSION@,`cat .fname`,g" \
+	-e "s,@MKTEMP_SH_FUNCTION@,," \
+	-e "s,@MKTEMP@,/usr/bin/mktemp," \
+	-e "s,@SENDMAIL@,/usr/sbin/sendmail," ${.ALLSRC} > ${.TARGET}
 	chmod a+x ${.TARGET}
 
 cvsbug: .fname



CVS commit: [netbsd-5-0] src/gnu/usr.bin/xcvs/cvsbug

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:28:11 UTC 2010

Modified Files:
src/gnu/usr.bin/xcvs/cvsbug [netbsd-5-0]: Makefile

Log Message:
Revert previous, wrong branch


To generate a diff of this commit:
cvs rdiff -u -r1.2.6.1 -r1.2.6.2 src/gnu/usr.bin/xcvs/cvsbug/Makefile

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

Modified files:

Index: src/gnu/usr.bin/xcvs/cvsbug/Makefile
diff -u src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2.6.1 src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2.6.2
--- src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2.6.1	Sat Jan 16 17:27:38 2010
+++ src/gnu/usr.bin/xcvs/cvsbug/Makefile	Sat Jan 16 17:28:10 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2.6.1 2010/01/16 17:27:38 bouyer Exp $
+#	$NetBSD: Makefile,v 1.2.6.2 2010/01/16 17:28:10 bouyer Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -12,10 +12,7 @@
 cvsbug: cvsbug.in
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e 's,@PACKAGE_BUGREPORT@,bug-...@gnu.org,g' \
-	-e "s,@VERSION@,`cat .fname`,g" \
-	-e "s,@MKTEMP_SH_FUNCTION@,," \
-	-e "s,@MKTEMP@,/usr/bin/mktemp," \
-	-e "s,@SENDMAIL@,/usr/sbin/sendmail," ${.ALLSRC} > ${.TARGET}
+	-e "s,@VERSION@,`cat .fname`,g" ${.ALLSRC} > ${.TARGET}
 	chmod a+x ${.TARGET}
 
 cvsbug: .fname



CVS commit: [netbsd-5-0] src/gnu/usr.bin/xcvs/cvsbug

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:27:39 UTC 2010

Modified Files:
src/gnu/usr.bin/xcvs/cvsbug [netbsd-5-0]: Makefile

Log Message:
Apply patch, requested by snj in ticket #1215:
gnu/usr.bin/xcvs/cvsbug/Makefile: patch
Properly replace @MKTEMP_SH_FUNCTION@, @MKTEMP@, and @sendm...@.
Fixes PR bin/39629.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/gnu/usr.bin/xcvs/cvsbug/Makefile

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

Modified files:

Index: src/gnu/usr.bin/xcvs/cvsbug/Makefile
diff -u src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2 src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2.6.1
--- src/gnu/usr.bin/xcvs/cvsbug/Makefile:1.2	Sat Oct 25 22:27:35 2008
+++ src/gnu/usr.bin/xcvs/cvsbug/Makefile	Sat Jan 16 17:27:38 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/10/25 22:27:35 apb Exp $
+#	$NetBSD: Makefile,v 1.2.6.1 2010/01/16 17:27:38 bouyer Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -12,7 +12,10 @@
 cvsbug: cvsbug.in
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e 's,@PACKAGE_BUGREPORT@,bug-...@gnu.org,g' \
-	-e "s,@VERSION@,`cat .fname`,g" ${.ALLSRC} > ${.TARGET}
+	-e "s,@VERSION@,`cat .fname`,g" \
+	-e "s,@MKTEMP_SH_FUNCTION@,," \
+	-e "s,@MKTEMP@,/usr/bin/mktemp," \
+	-e "s,@SENDMAIL@,/usr/sbin/sendmail," ${.ALLSRC} > ${.TARGET}
 	chmod a+x ${.TARGET}
 
 cvsbug: .fname



CVS commit: src/sys/dev/usb

2010-01-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 16 17:03:04 UTC 2010

Modified Files:
src/sys/dev/usb: usbdi.c

Log Message:
Fix leak of a usbd_xfer_handle when a interrupt pipe is aborted then
closed:
usbd_open_pipe_intr() allocates a usbd_xfer_handle for pipe->intrxfer.
Most usb device drivers using interrupt pipes call usbd_abort_pipe()
then usbd_close_pipe(), usbd_close_pipe() is supposed to free pipe->intrxfer.
But usbd_abort_pipe() calls [uoe]hci_device_intr_abort() which,
if the xfer aborted is pipe's intrxfer, sets pipe->intrxfer to NULL.
So usbd_close_pipe() can't free it and the usbd_xfer_handle is lost.

To fix this, in usbd_abort_pipe() remember the pipe->intrxfer's value
on entrie, and if it's different after usbd_ar_pipe(), call
usbd_free_xfer with the original value.
Confirmed to fix the memory leak on close() with umodem(4) and
uplcom(4).


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/dev/usb/usbdi.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/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.126 src/sys/dev/usb/usbdi.c:1.127
--- src/sys/dev/usb/usbdi.c:1.126	Thu Nov 12 07:58:32 2009
+++ src/sys/dev/usb/usbdi.c	Sat Jan 16 17:03:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.126 2009/11/12 07:58:32 uebayasi Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.127 2010/01/16 17:03:03 bouyer Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.126 2009/11/12 07:58:32 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.127 2010/01/16 17:03:03 bouyer Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -519,6 +519,7 @@
 {
 	usbd_status err;
 	int s;
+	usbd_xfer_handle intrxfer = pipe->intrxfer;
 
 #ifdef DIAGNOSTIC
 	if (pipe == NULL) {
@@ -529,6 +530,8 @@
 	s = splusb();
 	err = usbd_ar_pipe(pipe);
 	splx(s);
+	if (pipe->intrxfer != intrxfer)
+		usbd_free_xfer(intrxfer);
 	return (err);
 }
 



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

2010-01-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Jan 16 16:12:01 UTC 2010

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
Typo


To generate a diff of this commit:
cvs rdiff -u -r1.853 -r1.854 src/distrib/sets/lists/base/mi

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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.853 src/distrib/sets/lists/base/mi:1.854
--- src/distrib/sets/lists/base/mi:1.853	Sat Jan 16 15:34:22 2010
+++ src/distrib/sets/lists/base/mi	Sat Jan 16 16:12:01 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.853 2010/01/16 15:34:22 roy Exp $
+# $NetBSD: mi,v 1.854 2010/01/16 16:12:01 roy Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -610,7 +610,7 @@
 ./usr/bin/tftp	base-netutil-bin
 ./usr/bin/time	base-util-bin
 ./usr/bin/tip	base-util-bin
-./usr/bin/tn3270base-obsolete		obselete
+./usr/bin/tn3270base-obsolete		obsolete
 ./usr/bin/top	base-util-bin
 ./usr/bin/touch	base-util-bin
 ./usr/bin/tput	base-util-bin



CVS commit: src/distrib/syspkg/sets

2010-01-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Jan 16 16:10:39 UTC 2010

Modified Files:
src/distrib/syspkg/sets/base: Makefile
src/distrib/syspkg/sets/man: Makefile
Removed Files:
src/distrib/syspkg/sets/base/base-tn3270-bin: COMMENT DESCR Makefile
src/distrib/syspkg/sets/man/man-tn3270-catman: COMMENT DESCR Makefile
src/distrib/syspkg/sets/man/man-tn3270-man: COMMENT DESCR Makefile

Log Message:
Remove tn3270 from sets


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/syspkg/sets/base/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/distrib/syspkg/sets/base/base-tn3270-bin/COMMENT \
src/distrib/syspkg/sets/base/base-tn3270-bin/DESCR
cvs rdiff -u -r1.2 -r0 src/distrib/syspkg/sets/base/base-tn3270-bin/Makefile
cvs rdiff -u -r1.5 -r1.6 src/distrib/syspkg/sets/man/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/distrib/syspkg/sets/man/man-tn3270-catman/COMMENT \
src/distrib/syspkg/sets/man/man-tn3270-catman/DESCR
cvs rdiff -u -r1.2 -r0 src/distrib/syspkg/sets/man/man-tn3270-catman/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/distrib/syspkg/sets/man/man-tn3270-man/COMMENT \
src/distrib/syspkg/sets/man/man-tn3270-man/DESCR
cvs rdiff -u -r1.2 -r0 src/distrib/syspkg/sets/man/man-tn3270-man/Makefile

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

Modified files:

Index: src/distrib/syspkg/sets/base/Makefile
diff -u src/distrib/syspkg/sets/base/Makefile:1.10 src/distrib/syspkg/sets/base/Makefile:1.11
--- src/distrib/syspkg/sets/base/Makefile:1.10	Wed Nov 12 12:35:51 2008
+++ src/distrib/syspkg/sets/base/Makefile	Sat Jan 16 16:10:39 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2008/11/12 12:35:51 ad Exp $
+#	$NetBSD: Makefile,v 1.11 2010/01/16 16:10:39 roy Exp $
 
 SUBDIR+=base-adosfs-root
 SUBDIR+=base-amd-bin
@@ -141,7 +141,6 @@
 SUBDIR+=base-texinfo_locale-de
 SUBDIR+=base-texinfo_locale-fr
 SUBDIR+=base-timed-bin
-SUBDIR+=base-tn3270-bin
 SUBDIR+=base-usd-share
 SUBDIR+=base-util-bin
 SUBDIR+=base-util-root

Index: src/distrib/syspkg/sets/man/Makefile
diff -u src/distrib/syspkg/sets/man/Makefile:1.5 src/distrib/syspkg/sets/man/Makefile:1.6
--- src/distrib/syspkg/sets/man/Makefile:1.5	Thu Mar 23 20:01:20 2006
+++ src/distrib/syspkg/sets/man/Makefile	Sat Jan 16 16:10:39 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2006/03/23 20:01:20 wiz Exp $
+#	$NetBSD: Makefile,v 1.6 2010/01/16 16:10:39 roy Exp $
 
 SUBDIR+=man-adosfs-catman
 SUBDIR+=man-adosfs-man
@@ -108,8 +108,6 @@
 SUBDIR+=man-texinfo-info
 SUBDIR+=man-timed-catman
 SUBDIR+=man-timed-man
-SUBDIR+=man-tn3270-catman
-SUBDIR+=man-tn3270-man
 SUBDIR+=man-util-catman
 SUBDIR+=man-util-info
 SUBDIR+=man-util-man



CVS commit: src/doc

2010-01-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Jan 16 15:46:32 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Document tn3270 removal.


To generate a diff of this commit:
cvs rdiff -u -r1.1343 -r1.1344 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1343 src/doc/CHANGES:1.1344
--- src/doc/CHANGES:1.1343	Fri Jan 15 20:59:00 2010
+++ src/doc/CHANGES	Sat Jan 16 15:46:32 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1343 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1344 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -521,3 +521,4 @@
 	sparc: Add apc(4), a driver for the Aurora Personality Chip (APC)
 		found on SPARCstation-4/5 and qemu. Allows to idle the
 		CPU when in the idle loop.  [bouyer 20100115]
+	tn3270: Removed from base [roy 20100116]	



CVS commit: src

2010-01-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Jan 16 15:34:26 UTC 2010

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/man: mi
src/share/termcap: Makefile
src/usr.bin: Makefile
Removed Files:
src/share/termcap: map3270
src/usr.bin/tn3270/api: api.order api_bsd.c api_exch.c api_exch.h
apilib.c apilib.h asc_ebc.c asc_ebc.h astosc.c astosc.h dctype.c
dctype.h disp_asc.c disp_asc.h ebc_disp.c ebc_disp.h
src/usr.bin/tn3270/ascii: ascii.order default.map map3270.c map3270.h
mset.c state.h termin.c
src/usr.bin/tn3270/ctlr: 3180.kbd 3270pc.kbd api.c api.h ctlr.order
declare.h function.c function.h hostctlr.h inbound.c oia.c oia.h
options.c options.h outbound.c screen.h scrnctlr.h unix.kbd
src/usr.bin/tn3270/general: genbsubs.c general.h general.order
globals.c globals.h vaxbsubs.s
src/usr.bin/tn3270/mset: Makefile map3270.5 mset.1
src/usr.bin/tn3270/sys_curses: system.c telextrn.h terminal.h termout.c
src/usr.bin/tn3270/tn3270: Makefile tn3270.1
src/usr.bin/tn3270/tools: Makefile Makefile.inc
src/usr.bin/tn3270/tools/mkastods: Makefile mkastods.c
src/usr.bin/tn3270/tools/mkastosc: Makefile mkastosc.c
src/usr.bin/tn3270/tools/mkdctype: Makefile ectype.c ectype.h
mkdctype.c
src/usr.bin/tn3270/tools/mkdstoas: Makefile mkdstoas.c
src/usr.bin/tn3270/tools/mkhits: Makefile dohits.c dohits.h mkhits.c
src/usr.bin/tn3270/tools/mkmake: Makefile mkmake.y
src/usr.bin/tn3270/tools/prt3270: Makefile prt3270.c

Log Message:
Remove tn3270 from base system.
If anyone really needs it then it can be put into pkgsrc.
Importing c3270 into pkgsrc is probably a better option though.


To generate a diff of this commit:
cvs rdiff -u -r1.852 -r1.853 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1363 -r1.1364 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1184 -r1.1185 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.29 -r1.30 src/share/termcap/Makefile
cvs rdiff -u -r1.4 -r0 src/share/termcap/map3270
cvs rdiff -u -r1.183 -r1.184 src/usr.bin/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/usr.bin/tn3270/api/api.order
cvs rdiff -u -r1.13 -r0 src/usr.bin/tn3270/api/api_bsd.c
cvs rdiff -u -r1.8 -r0 src/usr.bin/tn3270/api/api_exch.c \
src/usr.bin/tn3270/api/astosc.c
cvs rdiff -u -r1.7 -r0 src/usr.bin/tn3270/api/api_exch.h \
src/usr.bin/tn3270/api/apilib.c src/usr.bin/tn3270/api/asc_ebc.c \
src/usr.bin/tn3270/api/ebc_disp.c
cvs rdiff -u -r1.6 -r0 src/usr.bin/tn3270/api/apilib.h \
src/usr.bin/tn3270/api/astosc.h src/usr.bin/tn3270/api/dctype.c \
src/usr.bin/tn3270/api/disp_asc.c
cvs rdiff -u -r1.5 -r0 src/usr.bin/tn3270/api/asc_ebc.h \
src/usr.bin/tn3270/api/dctype.h src/usr.bin/tn3270/api/disp_asc.h \
src/usr.bin/tn3270/api/ebc_disp.h
cvs rdiff -u -r1.1.1.1 -r0 src/usr.bin/tn3270/ascii/ascii.order
cvs rdiff -u -r1.3 -r0 src/usr.bin/tn3270/ascii/default.map
cvs rdiff -u -r1.15 -r0 src/usr.bin/tn3270/ascii/map3270.c
cvs rdiff -u -r1.6 -r0 src/usr.bin/tn3270/ascii/map3270.h \
src/usr.bin/tn3270/ascii/state.h
cvs rdiff -u -r1.8 -r0 src/usr.bin/tn3270/ascii/mset.c \
src/usr.bin/tn3270/ascii/termin.c
cvs rdiff -u -r1.2 -r0 src/usr.bin/tn3270/ctlr/3180.kbd \
src/usr.bin/tn3270/ctlr/3270pc.kbd src/usr.bin/tn3270/ctlr/unix.kbd
cvs rdiff -u -r1.7 -r0 src/usr.bin/tn3270/ctlr/api.c \
src/usr.bin/tn3270/ctlr/api.h src/usr.bin/tn3270/ctlr/inbound.c
cvs rdiff -u -r1.1.1.1 -r0 src/usr.bin/tn3270/ctlr/ctlr.order
cvs rdiff -u -r1.6 -r0 src/usr.bin/tn3270/ctlr/declare.h \
src/usr.bin/tn3270/ctlr/function.c src/usr.bin/tn3270/ctlr/oia.h \
src/usr.bin/tn3270/ctlr/options.c src/usr.bin/tn3270/ctlr/options.h \
src/usr.bin/tn3270/ctlr/outbound.c
cvs rdiff -u -r1.5 -r0 src/usr.bin/tn3270/ctlr/function.h \
src/usr.bin/tn3270/ctlr/hostctlr.h src/usr.bin/tn3270/ctlr/oia.c \
src/usr.bin/tn3270/ctlr/screen.h src/usr.bin/tn3270/ctlr/scrnctlr.h
cvs rdiff -u -r1.6 -r0 src/usr.bin/tn3270/general/genbsubs.c \
src/usr.bin/tn3270/general/globals.h
cvs rdiff -u -r1.10 -r0 src/usr.bin/tn3270/general/general.h
cvs rdiff -u -r1.1.1.1 -r0 src/usr.bin/tn3270/general/general.order
cvs rdiff -u -r1.5 -r0 src/usr.bin/tn3270/general/globals.c
cvs rdiff -u -r1.4 -r0 src/usr.bin/tn3270/general/vaxbsubs.s
cvs rdiff -u -r1.26 -r0 src/usr.bin/tn3270/mset/Makefile
cvs rdiff -u -r1.12 -r0 src/usr.bin/tn3270/mset/map3270.5
cvs rdiff -u -r1.11 -r0 src/usr.bin/tn3270/mset/mset.1
cvs rdiff -u -r1.21 -r0 src/usr.bin/tn3270/sys_curses/system.c
cvs rdiff -u -r1.7 -r0 src/usr.bin/tn3270/sys_curses/telextrn.h
cvs rdiff -u -r1.5 -r0 src/usr.bin/tn3270/sys_curses/terminal.h
cvs rdiff -u -r1.15 -r0 src/usr.bin/tn3270/sys_curses/termout.c
cvs rdiff -u -r1.38 -r0 src/usr.bin/tn3270/tn3270/Makefile
cvs rdiff -u -r1.14 -r0 src/usr.bin/tn

CVS commit: src/sys/arch/hppa/include

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 13:59:42 UTC 2010

Modified Files:
src/sys/arch/hppa/include: pte.h

Log Message:
Add a couple of comments and some whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/include/pte.h

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/hppa/include/pte.h
diff -u src/sys/arch/hppa/include/pte.h:1.3 src/sys/arch/hppa/include/pte.h:1.4
--- src/sys/arch/hppa/include/pte.h:1.3	Thu Apr 30 07:01:27 2009
+++ src/sys/arch/hppa/include/pte.h	Sat Jan 16 13:59:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.3 2009/04/30 07:01:27 skrll Exp $	*/
+/*	$NetBSD: pte.h,v 1.4 2010/01/16 13:59:42 skrll Exp $	*/
 
 /*	$OpenBSD: pte.h,v 1.11 2002/09/05 18:41:19 mickey Exp $	*/
 
@@ -40,6 +40,7 @@
 #define	PTE_PAGE(pte)	((pte) & ~PGOFSET)
 
 /* TLB access/protection values */
+/*			0x8000 has no pt_entry_t equivalent */
 #define	TLB_WIRED	0x4000	/* software only */
 #define	TLB_REFTRAP	0x2000	/* bit 2, T */
 #define	TLB_DIRTY	0x1000	/* bit 3, D */
@@ -55,30 +56,31 @@
 #define	 TLB_AR_RW	TLB_READ|TLB_WRITE
 #define	 TLB_AR_RX	TLB_READ|TLB_EXECUTE
 #define	 TLB_AR_RWX	TLB_READ|TLB_WRITE|TLB_EXECUTE
-#define TLB_UNCACHEABLE	0x0008	/* bit 12, U */
+#define	TLB_UNCACHEABLE	0x0008	/* bit 12, U */
 	/* bit 13-30, Access ID */
-#define TLB_PID_MASK	0xfffe
+#define	TLB_PID_MASK	0xfffe
+/*			0x0001 has no pt_entry_t equivalent */
 
 #define TLB_BITS	\
 	"\177\020"	/* New bitmask */		\
-	"b\036WIRED\0"	/* bit 30 (1) */		\
-	"b\035T\0"	/* bit 29 (2) */		\
-	"b\034D\0"	/* bit 28 (3) */		\
-	"b\033B\0"	/* bit 27 (4) */		\
-	"b\023U\0"	/* bit 19 (12) */		\
-	"f\024\07AR\0"	/* bit 20 (11) .. 26 (5) */	\
-	"=\x73" "--\0"\
-	"=\x00" "r-\0"\
-	"=\x10" "rw\0"\
-	"=\x20" "r-x---\0"\
-	"=\x30" "rwx---\0"\
-	"=\x0f" "r--r--\0"\
-	"=\x1f" "rw-rw-\0"\
-	"=\x2f" "r-xr-x\0"\
-	"=\x3f" "rwxrwx\0"\
-	"=\x4c" "gate\0"\
-	"=\x2c" "break\0"\
-	"f\001\017PID\0\0" /* bit 1 (30) .. 15 (16)	*/
+	"b\036wired\0"		/* bit 30 (1) */		\
+	"b\035T\0"		/* bit 29 (2) */		\
+	"b\034D\0"		/* bit 28 (3) */		\
+	"b\033B\0"		/* bit 27 (4) */		\
+	"b\023U\0"		/* bit 19 (12) */		\
+	"f\024\07ar\0"		/* bit 20 (11) .. 26 (5) */	\
+	"=\x73" "--\0"	\
+	"=\x00" "r-\0"	\
+	"=\x10" "rw\0"	\
+	"=\x20" "r-x---\0"	\
+	"=\x30" "rwx---\0"	\
+	"=\x0f" "r--r--\0"	\
+	"=\x1f" "rw-rw-\0"	\
+	"=\x2f" "r-xr-x\0"	\
+	"=\x3f" "rwxrwx\0"	\
+	"=\x4c" "gate\0"	\
+	"=\x2c" "break\0"	\
+	"f\001\017pid\0\0"	 /* bit 1 (30) .. 15 (16)	*/
 
 /* protection for a gateway page */
 #define	TLB_GATE_PROT	0x04c0



CVS commit: src/sys/arch/hppa/hppa

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 13:53:59 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Tweak comment. From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hppa/hppa/trap.S

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/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.36 src/sys/arch/hppa/hppa/trap.S:1.37
--- src/sys/arch/hppa/hppa/trap.S:1.36	Tue Dec 15 22:47:21 2009
+++ src/sys/arch/hppa/hppa/trap.S	Sat Jan 16 13:53:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.36 2009/12/15 22:47:21 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.37 2010/01/16 13:53:58 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -430,7 +430,7 @@
 	/* t3 == VA trapframe */
 	/* check for AST ? XXX */
 
-	/* splhigh(), just in case */
+	/* disable interrupts, just in case */
 	mtctl	%r0, %eiem
 
 	/*



CVS commit: src/sys/arch/hp700/include

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 13:49:11 UTC 2010

Modified Files:
src/sys/arch/hp700/include: param.h

Log Message:
Simplify


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp700/include/param.h

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/hp700/include/param.h
diff -u src/sys/arch/hp700/include/param.h:1.3 src/sys/arch/hp700/include/param.h:1.4
--- src/sys/arch/hp700/include/param.h:1.3	Fri May  8 09:33:58 2009
+++ src/sys/arch/hp700/include/param.h	Sat Jan 16 13:49:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.3 2009/05/08 09:33:58 skrll Exp $	*/
+/*	$NetBSD: param.h,v 1.4 2010/01/16 13:49:11 skrll Exp $	*/
 
 /*	$OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $	*/
 
@@ -25,9 +25,7 @@
  * 	Utah $Hdr: param.h 1.18 94/12/16$
  */
 
-#include 
-
-#if defined(_NETBSD_SOURCE)
+#ifdef _KERNEL
 #include 
 #endif
 



CVS commit: src/sys/arch/hppa/hppa

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 13:29:47 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: hppa_machdep.c trap.c

Log Message:
Tweak astpending handling.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/hppa/hppa_machdep.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/hppa_machdep.c
diff -u src/sys/arch/hppa/hppa/hppa_machdep.c:1.18 src/sys/arch/hppa/hppa/hppa_machdep.c:1.19
--- src/sys/arch/hppa/hppa/hppa_machdep.c:1.18	Sat Nov 21 15:36:33 2009
+++ src/sys/arch/hppa/hppa/hppa_machdep.c	Sat Jan 16 13:29:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: hppa_machdep.c,v 1.18 2009/11/21 15:36:33 rmind Exp $	*/
+/*	$NetBSD: hppa_machdep.c,v 1.19 2010/01/16 13:29:47 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.18 2009/11/21 15:36:33 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.19 2010/01/16 13:29:47 skrll Exp $");
 
 #include 
 #include 
@@ -363,10 +363,14 @@
 	if (ci->ci_want_resched && !immed)
 		return;
 	ci->ci_want_resched = 1;
+	/* setsoftast(ci->ci_data.cpu_onproc); */
+	setsoftast();
+
 #ifdef MULTIPROCESSOR
-if (ci->ci_curlwp != ci->ci_data.cpu_idlelwp) {
-		/* aston(ci->ci_curlwp); */
-		setsoftast();
+	if (ci->ci_curlwp != ci->ci_data.cpu_idlelwp) {
+		if (immed && ci != curcpu()) {
+			/* XXX send IPI */
+		}
 	}
 #endif
 }

Index: src/sys/arch/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.69 src/sys/arch/hppa/hppa/trap.c:1.70
--- src/sys/arch/hppa/hppa/trap.c:1.69	Sat Jan 16 07:56:16 2010
+++ src/sys/arch/hppa/hppa/trap.c	Sat Jan 16 13:29:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.69 2010/01/16 07:56:16 skrll Exp $	*/
+/*	$NetBSD: trap.c,v 1.70 2010/01/16 13:29:47 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.69 2010/01/16 07:56:16 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.70 2010/01/16 13:29:47 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -206,8 +206,11 @@
 {
 	struct proc *p = l->l_proc;
 
-	if (curcpu()->ci_want_resched) {
-		preempt();
+	if (astpending) {
+		astpending = 0;
+		if (curcpu()->ci_want_resched) {
+			preempt();
+		}
 	}
 
 	mi_userret(l);



CVS commit: src/libexec/ld.elf_so

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 10:37:51 UTC 2010

Modified Files:
src/libexec/ld.elf_so: reloc.c rtld.h

Log Message:
Remove cargo cult dlinfo entry point.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/libexec/ld.elf_so/reloc.c
cvs rdiff -u -r1.86 -r1.87 src/libexec/ld.elf_so/rtld.h

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

Modified files:

Index: src/libexec/ld.elf_so/reloc.c
diff -u src/libexec/ld.elf_so/reloc.c:1.100 src/libexec/ld.elf_so/reloc.c:1.101
--- src/libexec/ld.elf_so/reloc.c:1.100	Fri Jan 15 07:07:11 2010
+++ src/libexec/ld.elf_so/reloc.c	Sat Jan 16 10:37:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: reloc.c,v 1.100 2010/01/15 07:07:11 skrll Exp $	 */
+/*	$NetBSD: reloc.c,v 1.101 2010/01/16 10:37:51 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -39,7 +39,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: reloc.c,v 1.100 2010/01/15 07:07:11 skrll Exp $");
+__RCSID("$NetBSD: reloc.c,v 1.101 2010/01/16 10:37:51 skrll Exp $");
 #endif /* not lint */
 
 #include 
@@ -208,7 +208,6 @@
 		obj->dlerror = dlerror;
 		obj->dlclose = dlclose;
 		obj->dladdr = dladdr;
-		obj->dlinfo = dlinfo;
 
 		dbg(("fixing up PLTGOT"));
 		/* Set the special PLTGOT entries. */

Index: src/libexec/ld.elf_so/rtld.h
diff -u src/libexec/ld.elf_so/rtld.h:1.86 src/libexec/ld.elf_so/rtld.h:1.87
--- src/libexec/ld.elf_so/rtld.h:1.86	Fri Jan 15 07:07:12 2010
+++ src/libexec/ld.elf_so/rtld.h	Sat Jan 16 10:37:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.h,v 1.86 2010/01/15 07:07:12 skrll Exp $	 */
+/*	$NetBSD: rtld.h,v 1.87 2010/01/16 10:37:51 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -168,7 +168,6 @@
 	char   *(*dlerror)(void);
 	int (*dlclose)(void *);
 	int (*dladdr)(const void *, Dl_info *);
-	int		(*dlinfo)(void *, int, void *);
 
 	u_int32_t	mainprog:1,	/* True if this is the main program */
 		rtld:1,		/* True if this is the dynamic linker */



CVS commit: src/sys/arch/hppa/include

2010-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 16 10:06:31 UTC 2010

Modified Files:
src/sys/arch/hppa/include: trap.h

Log Message:
Use the description in the ACD for T_DBREAK.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/include/trap.h

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/hppa/include/trap.h
diff -u src/sys/arch/hppa/include/trap.h:1.3 src/sys/arch/hppa/include/trap.h:1.4
--- src/sys/arch/hppa/include/trap.h:1.3	Tue Nov  3 05:07:26 2009
+++ src/sys/arch/hppa/include/trap.h	Sat Jan 16 10:06:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.h,v 1.3 2009/11/03 05:07:26 snj Exp $	*/
+/*	$NetBSD: trap.h,v 1.4 2010/01/16 10:06:31 skrll Exp $	*/
 
 /*	$OpenBSD: trap.h,v 1.8 2000/02/10 20:05:39 mickey Exp $	*/
 
@@ -53,7 +53,7 @@
 #define	T_ITLBMISSNA	16	/* ITLB non-access miss */
 #define	T_DTLBMISSNA	17	/* DTLB non-access miss */
 #define	T_DPROT		18	/* data protection/rights/alignment <7100 */
-#define	T_DBREAK	19	/* data break */
+#define	T_DBREAK	19	/* data memory break */
 #define	T_TLB_DIRTY	20	/* TLB dirty bit */
 #define	T_PAGEREF	21	/* page reference */
 #define	T_EMULATION	22	/* assist emulation */



CVS commit: src/usr.bin/midiplay

2010-01-16 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan 16 08:50:29 UTC 2010

Modified Files:
src/usr.bin/midiplay: midiplay.1

Log Message:
fix wording:
instead of the a file -> instead of a file


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/midiplay/midiplay.1

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

Modified files:

Index: src/usr.bin/midiplay/midiplay.1
diff -u src/usr.bin/midiplay/midiplay.1:1.18 src/usr.bin/midiplay/midiplay.1:1.19
--- src/usr.bin/midiplay/midiplay.1:1.18	Wed Apr 30 13:11:01 2008
+++ src/usr.bin/midiplay/midiplay.1	Sat Jan 16 08:50:29 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: midiplay.1,v 1.18 2008/04/30 13:11:01 martin Exp $
+.\" $NetBSD: midiplay.1,v 1.19 2010/01/16 08:50:29 mbalmer Exp $
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
@@ -25,7 +25,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 30, 2006
+.Dd January 16, 2010
 .Dt MIDIPLAY 1
 .Os
 .Sh NAME
@@ -94,7 +94,7 @@
 be verbose.
 If the flag is repeated the verbosity increases.
 .It Fl x
-play a small sample sound instead of the a file.
+play a small sample sound instead of a file.
 .El
 .Pp
 A file containing no tempo indication will be played as if it specified