CVS commit: src/sys/arch/mipsco/mipsco

2014-06-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Jun  8 07:01:30 UTC 2014

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

Log Message:
Kill a pair of set-but-not-used local variables.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mipsco/mipsco/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/mipsco/mipsco/machdep.c
diff -u src/sys/arch/mipsco/mipsco/machdep.c:1.77 src/sys/arch/mipsco/mipsco/machdep.c:1.78
--- src/sys/arch/mipsco/mipsco/machdep.c:1.77	Mon Mar 24 20:06:32 2014
+++ src/sys/arch/mipsco/mipsco/machdep.c	Sun Jun  8 07:01:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.77 2014/03/24 20:06:32 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.78 2014/06/08 07:01:30 he Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.77 2014/03/24 20:06:32 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.78 2014/06/08 07:01:30 he Exp $);
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -183,7 +183,6 @@ mach_init(int argc, char *argv[], char *
 	extern char edata[], end[];
 	const char *bi_msg;
 #if NKSYMS || defined(DDB) || defined(MODULAR)
-	int nsym = 0;
 	char *ssym = 0;
 	char *esym = 0;
 	struct btinfo_symtab *bi_syms;
@@ -218,7 +217,6 @@ mach_init(int argc, char *argv[], char *
 
 	/* Load sysmbol table if present */
 	if (bi_syms != NULL) {
-		nsym = bi_syms-nsym;
 		ssym = (void *)bi_syms-ssym;
 		esym = (void *)bi_syms-esym;
 		kernend = (void *)mips_round_page(esym);
@@ -591,9 +589,7 @@ null_cnpollc(dev_t dev, int on)
 void
 consinit(void)
 {
-	int zs_unit;
 
-	zs_unit = 0;
 	cn_tab = consdev_zs;
 
 	(*cn_tab-cn_init)(cn_tab);



CVS commit: src/usr.bin/who

2014-06-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Jun  8 09:53:43 UTC 2014

Modified Files:
src/usr.bin/who: who.c

Log Message:
Handle ctime() failure.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/who/who.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/who/who.c
diff -u src/usr.bin/who/who.c:1.23 src/usr.bin/who/who.c:1.24
--- src/usr.bin/who/who.c:1.23	Thu Jul 24 15:35:41 2008
+++ src/usr.bin/who/who.c	Sun Jun  8 09:53:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: who.c,v 1.23 2008/07/24 15:35:41 christos Exp $	*/
+/*	$NetBSD: who.c,v 1.24 2014/06/08 09:53:43 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)who.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: who.c,v 1.23 2008/07/24 15:35:41 christos Exp $);
+__RCSID($NetBSD: who.c,v 1.24 2014/06/08 09:53:43 mlelstv Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -285,6 +285,7 @@ print(const char *name, const char *line
 	time_t idle;
 	const char *types = NULL;
 	size_t i;
+	char *tstr;
 
 	state = '?';
 	idle = 0;
@@ -312,7 +313,8 @@ print(const char *name, const char *line
 		(void)printf(%c , state);
 
 	(void)printf(%-*.*s , maxline, maxline, line);
-	(void)printf(%.12s , ctime(t) + 4);
+	tstr = ctime(t);
+	(void)printf(%.12s , tstr ? tstr + 4 : ?);
 
 	if (show_idle) {
 		if (idle  60) 



CVS commit: src/sys/arch/mipsco/obio

2014-06-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Jun  8 10:40:52 UTC 2014

Modified Files:
src/sys/arch/mipsco/obio: zs.c

Log Message:
Move the rest of real_bps handling in under #if 0, so
that we don't get set-but-not-used warnings from the compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/mipsco/obio/zs.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/mipsco/obio/zs.c
diff -u src/sys/arch/mipsco/obio/zs.c:1.24 src/sys/arch/mipsco/obio/zs.c:1.25
--- src/sys/arch/mipsco/obio/zs.c:1.24	Fri Jun 13 12:25:37 2008
+++ src/sys/arch/mipsco/obio/zs.c	Sun Jun  8 10:40:52 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.24 2008/06/13 12:25:37 cegger Exp $	*/
+/*	$NetBSD: zs.c,v 1.25 2014/06/08 10:40:52 he Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.24 2008/06/13 12:25:37 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.25 2014/06/08 10:40:52 he Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -393,7 +393,10 @@ zs_get_speed(struct zs_chanstate *cs)
 int
 zs_set_speed(struct zs_chanstate *cs, int bps)
 {
-	int tconst, real_bps;
+	int tconst;
+#if 0
+	int real_bps;
+#endif
 
 #if 0
 	while (!(zs_read_csr(cs)  ZSRR0_TX_READY))
@@ -413,11 +416,11 @@ zs_set_speed(struct zs_chanstate *cs, in
 	if (tconst  0)
 		return (EINVAL);
 
+#if 0
 	/* Convert back to make sure we can do it. */
 	real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst);
 
 	/* XXX - Allow some tolerance here? */
-#if 0
 	if (real_bps != bps)
 		return (EINVAL);
 #endif



CVS commit: src/sys/net/npf

2014-06-08 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sun Jun  8 12:12:56 UTC 2014

Modified Files:
src/sys/net/npf: npf_alg_icmp.c

Log Message:
fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/net/npf/npf_alg_icmp.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/net/npf/npf_alg_icmp.c
diff -u src/sys/net/npf/npf_alg_icmp.c:1.20 src/sys/net/npf/npf_alg_icmp.c:1.21
--- src/sys/net/npf/npf_alg_icmp.c:1.20	Wed Feb 19 03:51:31 2014
+++ src/sys/net/npf/npf_alg_icmp.c	Sun Jun  8 12:12:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_alg_icmp.c,v 1.20 2014/02/19 03:51:31 rmind Exp $	*/
+/*	$NetBSD: npf_alg_icmp.c,v 1.21 2014/06/08 12:12:56 spz Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_alg_icmp.c,v 1.20 2014/02/19 03:51:31 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_alg_icmp.c,v 1.21 2014/06/08 12:12:56 spz Exp $);
 
 #include sys/param.h
 #include sys/module.h
@@ -66,7 +66,7 @@ MODULE(MODULE_CLASS_MISC, npf_alg_icmp, 
 static npf_alg_t *	alg_icmp	__read_mostly;
 
 /*
- * npfa_icmp_match: matching insperctor determines ALG case and associates
+ * npfa_icmp_match: matching inspector determines ALG case and associates
  * our ALG with the NAT entry.
  */
 static bool



CVS commit: src/tests/fs/cd9660

2014-06-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jun  8 13:45:14 UTC 2014

Modified Files:
src/tests/fs/cd9660: t_high_ino_big_file.sh

Log Message:
Convert size check to use 1K blocks (more human-friendly), and fix
atf_skip message to reference block size rather than bytes.

OK martin@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/cd9660/t_high_ino_big_file.sh

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

Modified files:

Index: src/tests/fs/cd9660/t_high_ino_big_file.sh
diff -u src/tests/fs/cd9660/t_high_ino_big_file.sh:1.2 src/tests/fs/cd9660/t_high_ino_big_file.sh:1.3
--- src/tests/fs/cd9660/t_high_ino_big_file.sh:1.2	Thu May 15 14:53:05 2014
+++ src/tests/fs/cd9660/t_high_ino_big_file.sh	Sun Jun  8 13:45:14 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_high_ino_big_file.sh,v 1.2 2014/05/15 14:53:05 martin Exp $
+# $NetBSD: t_high_ino_big_file.sh,v 1.3 2014/06/08 13:45:14 pgoyette Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -76,9 +76,9 @@ pr_kern_48787_head() {
 }
 
 pr_kern_48787_body() {
-	avail=$( df -P . | awk '{if (NR==2) print $4}' )
-	if [ $avail -lt 450 ]; then
-		atf_skip not enough free disk space, have ${avail}, need ~ 450 bytes
+	avail=$( df -Pk . | awk '{if (NR==2) print $4}' )
+	if [ $avail -lt 225 ]; then
+		atf_skip not enough free disk space, have ${avail} Kbytes, need ~ 225 Kbytes
 	fi
 	bunzip2  $(atf_get_srcdir)/pr_48787.image.bz2  pr_48787.image
 	mntpnt=$(pwd)/mnt



CVS commit: src/sys/rump/librump/rumpkern

2014-06-08 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jun  8 15:24:34 UTC 2014

Modified Files:
src/sys/rump/librump/rumpkern: intr.c

Log Message:
RUMP's softint_schedule_cpu: comment out an assert for now.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/rump/librump/rumpkern/intr.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/librump/rumpkern/intr.c
diff -u src/sys/rump/librump/rumpkern/intr.c:1.43 src/sys/rump/librump/rumpkern/intr.c:1.44
--- src/sys/rump/librump/rumpkern/intr.c:1.43	Thu Jun  5 23:43:04 2014
+++ src/sys/rump/librump/rumpkern/intr.c	Sun Jun  8 15:24:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.43 2014/06/05 23:43:04 rmind Exp $	*/
+/*	$NetBSD: intr.c,v 1.44 2014/06/08 15:24:34 rmind Exp $	*/
 
 /*
  * Copyright (c) 2008-2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.43 2014/06/05 23:43:04 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.44 2014/06/08 15:24:34 rmind Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -327,8 +327,10 @@ softint_schedule(void *arg)
 void
 softint_schedule_cpu(void *arg, struct cpu_info *ci)
 {
-	/* TODO: implement this properly */
-	KASSERT(curcpu() == ci);
+	/*
+	 * TODO: implement this properly
+	 * KASSERT(curcpu() == ci);
+	 */
 	softint_schedule(arg);
 }
 



CVS commit: src/sys/arch/sparc64

2014-06-08 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sun Jun  8 17:33:24 UTC 2014

Modified Files:
src/sys/arch/sparc64/include: cpu.h hypervisor.h trap.h
src/sys/arch/sparc64/sparc64: cache.h cpu.c hvcall.S ipifuncs.c
mp_subr.S

Log Message:
sun4v: make tlb_flush_pte() work on sun4v - parts from OpenBSD - ok martin@


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/sparc64/include/cpu.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/include/hypervisor.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc64/include/trap.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sparc64/sparc64/cache.h
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/sparc64/sparc64/cpu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/sparc64/hvcall.S
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sparc64/sparc64/ipifuncs.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc64/sparc64/mp_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/sparc64/include/cpu.h
diff -u src/sys/arch/sparc64/include/cpu.h:1.110 src/sys/arch/sparc64/include/cpu.h:1.111
--- src/sys/arch/sparc64/include/cpu.h:1.110	Fri Feb 21 18:00:09 2014
+++ src/sys/arch/sparc64/include/cpu.h	Sun Jun  8 17:33:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.110 2014/02/21 18:00:09 palle Exp $ */
+/*	$NetBSD: cpu.h,v 1.111 2014/06/08 17:33:24 palle Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -180,6 +180,14 @@ struct cpu_info {
 	 */
 	paddr_t			ci_mmfsa;
 
+	/*
+	 * sun4v mondo control fields
+	 */
+	paddr_t			ci_cpumq;  /* cpu mondo queue address */
+	paddr_t			ci_devmq;  /* device mondo queue address */
+	paddr_t			ci_cpuset; /* mondo recipient address */ 
+	paddr_t			ci_mondo;  /* mondo message address */
+	
 	/* probe fault in PCI config space reads */
 	bool			ci_pci_probe;
 	bool			ci_pci_fault;

Index: src/sys/arch/sparc64/include/hypervisor.h
diff -u src/sys/arch/sparc64/include/hypervisor.h:1.3 src/sys/arch/sparc64/include/hypervisor.h:1.4
--- src/sys/arch/sparc64/include/hypervisor.h:1.3	Thu Jun  5 18:36:44 2014
+++ src/sys/arch/sparc64/include/hypervisor.h	Sun Jun  8 17:33:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor.h,v 1.3 2014/06/05 18:36:44 palle Exp $ */
+/*	$NetBSD: hypervisor.h,v 1.4 2014/06/08 17:33:24 palle Exp $ */
 /*	$OpenBSD: hypervisor.h,v 1.14 2011/06/26 17:23:46 kettenis Exp $	*/
 
 /*
@@ -28,32 +28,40 @@
  * API versioning
  */
 
+#ifndef _LOCORE
 int64_t	hv_api_get_version(uint64_t api_group,
 	uint64_t *major_number, uint64_t *minor_number);
-
+#endif
 /*
  * Domain services
  */
 
+#ifndef _LOCORE
 int64_t hv_mach_desc(paddr_t buffer, psize_t *length);
+#endif
 
 /*
  * CPU services
  */
 
+#ifndef _LOCORE
 void	hv_cpu_yield(void);
 int64_t	hv_cpu_qconf(uint64_t queue, uint64_t base, uint64_t nentries);
+#endif
 
 #define CPU_MONDO_QUEUE		0x3c
 #define DEVICE_MONDO_QUEUE	0x3d
 
+#ifndef _LOCORE
 int64_t	hv_cpu_mondo_send(uint64_t ncpus, paddr_t cpulist, paddr_t data);
 int64_t	hv_cpu_myid(uint64_t *cpuid);
+#endif
 
 /*
  * MMU services
  */
 
+#ifndef _LOCORE
 int64_t	hv_mmu_demap_page(vaddr_t vaddr, uint64_t context, uint64_t flags);
 int64_t	hv_mmu_demap_ctx(uint64_t context, uint64_t flags);
 int64_t	hv_mmu_demap_all(uint64_t flags);
@@ -62,10 +70,12 @@ int64_t	hv_mmu_unmap_perm_addr(vaddr_t v
 int64_t	hv_mmu_map_addr(vaddr_t vaddr, uint64_t context, uint64_t tte,
 	uint64_t flags);
 int64_t	hv_mmu_unmap_addr(vaddr_t vaddr, uint64_t context, uint64_t flags);
+#endif
 
 #define MAP_DTLB	0x1
 #define MAP_ITLB	0x2
 
+#ifndef _LOCORE
 struct tsb_desc {
 	uint16_t	td_idxpgsz;
 	uint16_t	td_assoc;
@@ -78,18 +88,22 @@ struct tsb_desc {
 
 int64_t	hv_mmu_tsb_ctx0(uint64_t ntsb, paddr_t tsbptr);
 int64_t	hv_mmu_tsb_ctxnon0(uint64_t ntsb, paddr_t tsbptr);
+#endif
 
 /*
  * Cache and memory services
  */
 
+#ifndef _LOCORE
 int64_t	hv_mem_scrub(paddr_t raddr, psize_t length);
 int64_t	hv_mem_sync(paddr_t raddr, psize_t length);
+#endif
 
 /*
  * Device interrupt services
  */
 
+#ifndef _LOCORE
 int64_t	hv_intr_devino_to_sysino(uint64_t devhandle, uint64_t devino,
 	uint64_t *sysino);
 int64_t	hv_intr_getenabled(uint64_t sysino, uint64_t *intr_enabled);
@@ -98,6 +112,7 @@ int64_t	hv_intr_getstate(uint64_t sysino
 int64_t	hv_intr_setstate(uint64_t sysino, uint64_t intr_state);
 int64_t	hv_intr_gettarget(uint64_t sysino, uint64_t *cpuid);
 int64_t	hv_intr_settarget(uint64_t sysino, uint64_t cpuid);
+#endif
 
 #define INTR_DISABLED	0
 #define INTR_ENABLED	1
@@ -106,6 +121,7 @@ int64_t	hv_intr_settarget(uint64_t sysin
 #define INTR_RECEIVED	1
 #define INTR_DELIVERED	2
 
+#ifndef _LOCORE
 int64_t	hv_vintr_getcookie(uint64_t devhandle, uint64_t devino,
 	uint64_t *cookie_value);
 int64_t	hv_vintr_setcookie(uint64_t devhandle, uint64_t devino,
@@ -122,21 +138,26 @@ int64_t	hv_vintr_gettarget(uint64_t devh
 	uint64_t *cpuid);
 int64_t	hv_vintr_settarget(uint64_t devhandle, uint64_t devino,
 	uint64_t 

CVS commit: src/distrib/sets

2014-06-08 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Jun  9 01:17:44 UTC 2014

Modified Files:
src/distrib/sets: Makefile

Log Message:
Execute sub-${MAKE} from within a source directory.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/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/sets/Makefile
diff -u src/distrib/sets/Makefile:1.95 src/distrib/sets/Makefile:1.96
--- src/distrib/sets/Makefile:1.95	Thu May 15 16:32:07 2014
+++ src/distrib/sets/Makefile	Mon Jun  9 01:17:44 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.95 2014/05/15 16:32:07 apb Exp $
+#	$NetBSD: Makefile,v 1.96 2014/06/09 01:17:44 uebayasi Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -210,7 +210,7 @@ maketars: .PRECIOUS .PHONY check_DESTDIR
 maketarsetup: .EXEC
 .if defined(DESTDIR)  ${DESTDIR} != 
 	${_MKMSG} execute  checkflist
-	${MAKE} checkflist
+	cd ${.CURDIR}; ${MAKE} checkflist
 .endif
 	mkdir -p ${TARDIR}
 	for i in MD5 SHA512; do \