CVS commit: src/sys/arch/powerpc/booke

2012-05-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun May 20 06:17:28 UTC 2012

Modified Files:
src/sys/arch/powerpc/booke: spe_subr.S

Log Message:
Fix SPE loading typo as described in PR/45731


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/spe_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/powerpc/booke/spe_subr.S
diff -u src/sys/arch/powerpc/booke/spe_subr.S:1.2 src/sys/arch/powerpc/booke/spe_subr.S:1.3
--- src/sys/arch/powerpc/booke/spe_subr.S:1.2	Tue Jan 18 01:02:52 2011
+++ src/sys/arch/powerpc/booke/spe_subr.S	Sun May 20 06:17:28 2012
@@ -30,7 +30,7 @@
 #include machine/asm.h
 #include assym.h
 
-RCSID($NetBSD: spe_subr.S,v 1.2 2011/01/18 01:02:52 matt Exp $)
+RCSID($NetBSD: spe_subr.S,v 1.3 2012/05/20 06:17:28 matt Exp $)
 
 	.text
 	.machine	e500x2
@@ -90,11 +90,11 @@ ENTRY(vec_load_from_vreg)
 	evldw %r10,(10  2)(%r3)
 		evmergelo %r11,%r10,%r11
 	evldw %r8,(8  2)(%r3)
-		evmergelo %r19,%r8,%r19
+		evmergelo %r9,%r8,%r9
 	evldw %r6,(6  2)(%r3)
-		evmergelo %r17,%r6,%r17
+		evmergelo %r7,%r6,%r7
 	evldw %r4,(4  2)(%r3)
-		evmergelo %r15,%r4,%r15
+		evmergelo %r5,%r4,%r5
 
 	/*
 	 * R2 isn't a callee-saved, so load into r0 because we still need r3



CVS commit: src/sys/arch/evbarm/dev

2012-05-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 20 07:54:40 UTC 2012

Modified Files:
src/sys/arch/evbarm/dev: plcom.c plcomvar.h

Log Message:
Replace the simple_lock with a kmutex_t.  Update the locking to match
com(4) in the few places it didn't already.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbarm/dev/plcom.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/dev/plcomvar.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/evbarm/dev/plcom.c
diff -u src/sys/arch/evbarm/dev/plcom.c:1.35 src/sys/arch/evbarm/dev/plcom.c:1.36
--- src/sys/arch/evbarm/dev/plcom.c:1.35	Mon May 14 19:40:06 2012
+++ src/sys/arch/evbarm/dev/plcom.c	Sun May 20 07:54:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: plcom.c,v 1.35 2012/05/14 19:40:06 skrll Exp $	*/
+/*	$NetBSD: plcom.c,v 1.36 2012/05/20 07:54:40 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: plcom.c,v 1.35 2012/05/14 19:40:06 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: plcom.c,v 1.36 2012/05/20 07:54:40 skrll Exp $);
 
 #include opt_plcom.h
 #include opt_ddb.h
@@ -248,9 +248,6 @@ void	plcom_kgdb_putc (void *, int);
 #define	BW	BUS_SPACE_BARRIER_WRITE
 #define PLCOM_BARRIER(t, h, f) bus_space_barrier((t), (h), 0, PLCOM_UART_SIZE, (f))
 
-#define PLCOM_LOCK(sc) simple_lock((sc)-sc_lock)
-#define PLCOM_UNLOCK(sc) simple_unlock((sc)-sc_lock)
-
 int
 plcomspeed(long speed, long frequency)
 {
@@ -331,22 +328,21 @@ plcomprobe1(bus_space_tag_t iot, bus_spa
 	return 1;
 }
 
+/*
+ * No locking in this routine; it is only called during attach,
+ * or with the port already locked.
+ */
 static void
 plcom_enable_debugport(struct plcom_softc *sc)
 {
-	int s;
 
 	/* Turn on line break interrupt, set carrier. */
-	s = splserial();
-	PLCOM_LOCK(sc);
 	sc-sc_cr = PL010_CR_RIE | PL010_CR_RTIE | PL01X_CR_UARTEN;
 	bus_space_write_1(sc-sc_iot, sc-sc_ioh, plcom_cr, sc-sc_cr);
 	SET(sc-sc_mcr, PL01X_MCR_DTR | PL01X_MCR_RTS);
 	/* XXX device_unit() abuse */
 	sc-sc_set_mcr(sc-sc_set_mcr_arg, device_unit(sc-sc_dev),
 	sc-sc_mcr);
-	PLCOM_UNLOCK(sc);
-	splx(s);
 }
 
 void
@@ -358,7 +354,7 @@ plcom_attach_subr(struct plcom_softc *sc
 	struct tty *tp;
 
 	callout_init(sc-sc_diag_callout, 0);
-	simple_lock_init(sc-sc_lock);
+	mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_HIGH);
 
 	/* Disable interrupts before configuring the device. */
 	sc-sc_cr = 0;
@@ -505,6 +501,9 @@ plcom_detach(struct device *self, int fl
 	rnd_detach_source(sc-rnd_source);
 #endif
 
+	/* Destroy the lock. */
+	mutex_destroy(sc-sc_lock);
+
 	return 0;
 }
 
@@ -526,10 +525,7 @@ void
 plcom_shutdown(struct plcom_softc *sc)
 {
 	struct tty *tp = sc-sc_tty;
-	int s;
-
-	s = splserial();
-	PLCOM_LOCK(sc);	
+	mutex_spin_enter(sc-sc_lock);
 
 	/* If we were asserting flow control, then deassert it. */
 	SET(sc-sc_rx_flags, RX_IBUF_BLOCKED);
@@ -551,12 +547,10 @@ plcom_shutdown(struct plcom_softc *sc)
 	 */
 	if (ISSET(tp-t_cflag, HUPCL)) {
 		plcom_modem(sc, 0);
-		PLCOM_UNLOCK(sc);
-		splx(s);
-		/* XXX tsleep will only timeout */
-		(void) tsleep(sc, TTIPRI, ttclos, hz);
-		s = splserial();
-		PLCOM_LOCK(sc);	
+		mutex_spin_exit(sc-sc_lock);
+		/* XXX will only timeout */
+		(void) kpause(ttclos, false, hz, NULL);
+		mutex_spin_enter(sc-sc_lock);
 	}
 
 	/* Turn off interrupts. */
@@ -567,6 +561,7 @@ plcom_shutdown(struct plcom_softc *sc)
 		sc-sc_cr = 0;
 	bus_space_write_1(sc-sc_iot, sc-sc_ioh, plcom_cr, sc-sc_cr);
 
+	mutex_spin_exit(sc-sc_lock);
 	if (sc-disable) {
 #ifdef DIAGNOSTIC
 		if (!sc-enabled)
@@ -575,8 +570,6 @@ plcom_shutdown(struct plcom_softc *sc)
 		(*sc-disable)(sc);
 		sc-enabled = 0;
 	}
-	PLCOM_UNLOCK(sc);
-	splx(s);
 }
 
 int
@@ -584,7 +577,7 @@ plcomopen(dev_t dev, int flag, int mode,
 {
 	struct plcom_softc *sc;
 	struct tty *tp;
-	int s, s2;
+	int s;
 	int error;
 
 	sc = device_lookup_private(plcom_cd, PLCOMUNIT(dev));
@@ -618,20 +611,18 @@ plcomopen(dev_t dev, int flag, int mode,
 
 		tp-t_dev = dev;
 
-		s2 = splserial();
-		PLCOM_LOCK(sc);
-
 		if (sc-enable) {
 			if ((*sc-enable)(sc)) {
-PLCOM_UNLOCK(sc);
-splx(s2);
 splx(s);
 printf(%s: device enable failed\n,
    sc-sc_dev.dv_xname);
 return EIO;
 			}
+			mutex_spin_enter(sc-sc_lock);
 			sc-enabled = 1;
 			plcom_config(sc);
+		} else {
+			mutex_spin_enter(sc-sc_lock);
 		}
 
 		/* Turn on interrupts. */
@@ -649,8 +640,7 @@ plcomopen(dev_t dev, int flag, int mode,
 		sc-ppsparam.mode = 0;
 		mutex_spin_exit(timecounter_lock);
 
-		PLCOM_UNLOCK(sc);
-		splx(s2);
+		mutex_spin_enter(sc-sc_lock);
 
 		/*
 		 * Initialize the termios status to the defaults.  Add in the
@@ -679,8 +669,7 @@ plcomopen(dev_t dev, int flag, int mode,
 		ttychars(tp);
 		ttsetwater(tp);
 
-		s2 = splserial();
-		PLCOM_LOCK(sc);
+		mutex_spin_enter(sc-sc_lock);
 
 		/*
 		 * Turn on DTR.  We must always do this, 

CVS commit: src/sys/arch/evbarm

2012-05-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 20 10:28:44 UTC 2012

Modified Files:
src/sys/arch/evbarm/dev: plcom.c plcomvar.h
src/sys/arch/evbarm/ifpga: plcom_ifpga.c plcom_ifpgavar.h

Log Message:
device_t/softc split
struct device * - device_t
struct cfdata * - cfdata_t


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/dev/plcom.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/dev/plcomvar.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/ifpga/plcom_ifpga.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/ifpga/plcom_ifpgavar.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/evbarm/dev/plcom.c
diff -u src/sys/arch/evbarm/dev/plcom.c:1.37 src/sys/arch/evbarm/dev/plcom.c:1.38
--- src/sys/arch/evbarm/dev/plcom.c:1.37	Sun May 20 07:57:34 2012
+++ src/sys/arch/evbarm/dev/plcom.c	Sun May 20 10:28:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: plcom.c,v 1.37 2012/05/20 07:57:34 skrll Exp $	*/
+/*	$NetBSD: plcom.c,v 1.38 2012/05/20 10:28:44 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: plcom.c,v 1.37 2012/05/20 07:57:34 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: plcom.c,v 1.38 2012/05/20 10:28:44 skrll Exp $);
 
 #include opt_plcom.h
 #include opt_ddb.h
@@ -242,7 +242,7 @@ void	plcom_kgdb_putc (void *, int);
 #define	PLCOMDIALOUT(x)	(minor(x)  PLCOMDIALOUT_MASK)
 
 #define	PLCOM_ISALIVE(sc)	((sc)-enabled != 0  \
- device_is_active((sc)-sc_dev))
+ device_is_active((sc)-sc_dev))
 
 #define	BR	BUS_SPACE_BARRIER_READ
 #define	BW	BUS_SPACE_BARRIER_WRITE
@@ -284,7 +284,7 @@ plcomstatus(struct plcom_softc *sc, cons
 	struct tty *tp = sc-sc_tty;
 
 	printf(%s: %s %sclocal  %sdcd %sts_carr_on %sdtr %stx_stopped\n,
-	sc-sc_dev.dv_xname, str,
+	device_xname(sc-sc_dev), str,
 	ISSET(tp-t_cflag, CLOCAL) ? + : -,
 	ISSET(sc-sc_msr, PL01X_MSR_DCD) ? + : -,
 	ISSET(tp-t_state, TS_CARR_ON) ? + : -,
@@ -292,7 +292,7 @@ plcomstatus(struct plcom_softc *sc, cons
 	sc-sc_tx_stopped ? + : -);
 
 	printf(%s: %s %scrtscts %scts %sts_ttstop  %srts %xrx_flags\n,
-	sc-sc_dev.dv_xname, str,
+	device_xname(sc-sc_dev), str,
 	ISSET(tp-t_cflag, CRTSCTS) ? + : -,
 	ISSET(sc-sc_msr, PL01X_MSR_CTS) ? + : -,
 	ISSET(tp-t_state, TS_TTSTOP) ? + : -,
@@ -341,7 +341,7 @@ plcom_enable_debugport(struct plcom_soft
 	bus_space_write_1(sc-sc_iot, sc-sc_ioh, plcom_cr, sc-sc_cr);
 	SET(sc-sc_mcr, PL01X_MCR_DTR | PL01X_MCR_RTS);
 	/* XXX device_unit() abuse */
-	sc-sc_set_mcr(sc-sc_set_mcr_arg, device_unit(sc-sc_dev),
+	sc-sc_set_mcr(sc-sc_set_mcr_arg, device_unit(sc-sc_dev),
 	sc-sc_mcr);
 }
 
@@ -383,7 +383,7 @@ plcom_attach_subr(struct plcom_softc *sc
 
 	if (ISSET(sc-sc_hwflags, PLCOM_HW_TXFIFO_DISABLE)) {
 		sc-sc_fifolen = 1;
-		printf(%s: txfifo disabled\n, sc-sc_dev.dv_xname);
+		printf(%s: txfifo disabled\n, device_xname(sc-sc_dev));
 	}
 
 	if (sc-sc_fifolen  1)
@@ -400,7 +400,7 @@ plcom_attach_subr(struct plcom_softc *sc
 	sc-sc_rbavail = plcom_rbuf_size;
 	if (sc-sc_rbuf == NULL) {
 		printf(%s: unable to allocate ring buffer\n,
-		sc-sc_dev.dv_xname);
+		device_xname(sc-sc_dev));
 		return;
 	}
 	sc-sc_ebuf = sc-sc_rbuf + (plcom_rbuf_size  1);
@@ -413,9 +413,9 @@ plcom_attach_subr(struct plcom_softc *sc
 		/* locate the major number */
 		maj = cdevsw_lookup_major(plcom_cdevsw);
 
-		cn_tab-cn_dev = makedev(maj, device_unit(sc-sc_dev));
+		cn_tab-cn_dev = makedev(maj, device_unit(sc-sc_dev));
 
-		printf(%s: console\n, sc-sc_dev.dv_xname);
+		printf(%s: console\n, device_xname(sc-sc_dev));
 	}
 
 #ifdef KGDB
@@ -427,14 +427,14 @@ plcom_attach_subr(struct plcom_softc *sc
 		plcom_kgdb_attached = 1;
 
 		SET(sc-sc_hwflags, PLCOM_HW_KGDB);
-		printf(%s: kgdb\n, sc-sc_dev.dv_xname);
+		printf(%s: kgdb\n, device_xname(sc-sc_dev));
 	}
 #endif
 
 	sc-sc_si = softint_establish(SOFTINT_SERIAL, plcomsoft, sc);
 
 #ifdef RND_COM
-	rnd_attach_source(sc-rnd_source, sc-sc_dev.dv_xname,
+	rnd_attach_source(sc-rnd_source, device_xname(sc-sc_dev)),
 			  RND_TYPE_TTY, 0);
 #endif
 
@@ -463,9 +463,9 @@ plcom_config(struct plcom_softc *sc)
 }
 
 int
-plcom_detach(struct device *self, int flags)
+plcom_detach(device_t self, int flags)
 {
-	struct plcom_softc *sc = (struct plcom_softc *)self;
+	struct plcom_softc *sc = device_private(self);
 	int maj, mn;
 
 	if (sc-sc_hwflags  (PLCOM_HW_CONSOLE|PLCOM_HW_KGDB))
@@ -585,7 +585,7 @@ plcomopen(dev_t dev, int flag, int mode,
 		sc-sc_rbuf == NULL)
 		return ENXIO;
 
-	if (!device_is_active(sc-sc_dev))
+	if (!device_is_active(sc-sc_dev))
 		return ENXIO;
 
 #ifdef KGDB
@@ -615,7 +615,7 @@ plcomopen(dev_t dev, int flag, int mode,
 			if ((*sc-enable)(sc)) {
 splx(s);
 printf(%s: device enable failed\n,
-   sc-sc_dev.dv_xname);
+   device_xname(sc-sc_dev));
 return EIO;
 			}
 			

CVS commit: src/sys/arch/arm/imx

2012-05-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun May 20 14:08:18 UTC 2012

Modified Files:
src/sys/arch/arm/imx: imxclock.c

Log Message:
Fix call of imxclock.  Patch from PR/45359.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imxclock.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/arm/imx/imxclock.c
diff -u src/sys/arch/arm/imx/imxclock.c:1.5 src/sys/arch/arm/imx/imxclock.c:1.6
--- src/sys/arch/arm/imx/imxclock.c:1.5	Tue Apr 17 09:33:31 2012
+++ src/sys/arch/arm/imx/imxclock.c	Sun May 20 14:08:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxclock.c,v 1.5 2012/04/17 09:33:31 bsh Exp $ */
+/*	$NetBSD: imxclock.c,v 1.6 2012/05/20 14:08:18 matt Exp $ */
 /*
  * Copyright (c) 2009, 2010  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
@@ -104,7 +104,7 @@ cpu_initclocks(void)
 	EPIT_EPITCR, reg);
 
 	epit1_sc-sc_ih = intr_establish(epit1_sc-sc_intr, IPL_CLOCK,
-	IST_LEVEL, imxclock_intr, epit1_sc);
+	IST_LEVEL, imxclock_intr, NULL);
 }
 
 #if 0
@@ -122,7 +122,7 @@ setstatclockrate(int schz)
 static int
 imxclock_intr(void *arg)
 {
-	struct imxclock_softc *sc = arg;
+	struct imxclock_softc *sc = epit1_sc;
 
 	bus_space_write_4(sc-sc_iot, sc-sc_ioh, EPIT_EPITSR, 1);
 	atomic_add_32(imxclock_base, sc-sc_reload_value);



CVS commit: [netbsd-5] src/usr.bin/pmap

2012-05-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun May 20 17:32:24 UTC 2012

Modified Files:
src/usr.bin/pmap [netbsd-5]: pmap.h

Log Message:
usr.bin/pmap/pmap.h patch

Fix build problem introduced by ticket #1759.
[jdc, ticket #1760]


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.6.1 src/usr.bin/pmap/pmap.h

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/pmap/pmap.h
diff -u src/usr.bin/pmap/pmap.h:1.7 src/usr.bin/pmap/pmap.h:1.7.6.1
--- src/usr.bin/pmap/pmap.h:1.7	Mon Apr 28 20:24:14 2008
+++ src/usr.bin/pmap/pmap.h	Sun May 20 17:32:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.7 2008/04/28 20:24:14 martin Exp $ */
+/*	$NetBSD: pmap.h,v 1.7.6.1 2012/05/20 17:32:24 riz Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -55,6 +55,9 @@
 #include uvm/uvm_device.h
 
 #include ufs/ufs/inode.h
+#undef i_endoff
+#undef i_diroff
+#undef i_offset
 #undef doff_t
 #undef IN_ACCESS
 #include isofs/cd9660/iso.h



CVS commit: [netbsd-5] src/doc

2012-05-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun May 20 17:32:55 UTC 2012

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

Log Message:
Ticket 1760


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.165 -r1.1.2.166 src/doc/CHANGES-5.2

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.2
diff -u src/doc/CHANGES-5.2:1.1.2.165 src/doc/CHANGES-5.2:1.1.2.166
--- src/doc/CHANGES-5.2:1.1.2.165	Sat May 19 17:29:01 2012
+++ src/doc/CHANGES-5.2	Sun May 20 17:32:55 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.165 2012/05/19 17:29:01 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.166 2012/05/20 17:32:55 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6392,3 +6392,8 @@ sys/ufs/ufs/ufs_wapbl.cpatch
 	Port dholland's ufs_rename locking changes to netbsd-5.
 	[buhrow, ticket #1759]
 
+usr.bin/pmap/pmap.hpatch
+
+	Fix build problem introduced by ticket #1759.
+	[jdc, ticket #1760]
+



CVS commit: src/sys/arch/arm

2012-05-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 20 17:56:30 UTC 2012

Modified Files:
src/sys/arch/arm/arm: cpufunc.c
src/sys/arch/arm/arm32: cpu.c
src/sys/arch/arm/include: armreg.h

Log Message:
Add the 'Z' to the 1176 cpu product name.

ok matt@


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/arm/arm/cpufunc.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/arm/arm32/cpu.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arm/include/armreg.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/arm/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.104 src/sys/arch/arm/arm/cpufunc.c:1.105
--- src/sys/arch/arm/arm/cpufunc.c:1.104	Tue Jan 31 04:31:37 2012
+++ src/sys/arch/arm/arm/cpufunc.c	Sun May 20 17:56:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.104 2012/01/31 04:31:37 matt Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.105 2012/05/20 17:56:30 skrll Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.104 2012/01/31 04:31:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.105 2012/05/20 17:56:30 skrll Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_cpuoptions.h
@@ -1646,10 +1646,10 @@ set_cpufuncs(void)
 #if defined(CPU_ARM11)
 	if (cputype == CPU_ID_ARM1136JS ||
 	cputype == CPU_ID_ARM1136JSR1 ||
-	cputype == CPU_ID_ARM1176JS) {
+	cputype == CPU_ID_ARM1176JZS) {
 		cpufuncs = arm11_cpufuncs;
 #if defined(CPU_ARM1136)
-		if (cputype != CPU_ID_ARM1176JS) {
+		if (cputype != CPU_ID_ARM1176JZS) {
 			cpufuncs = arm1136_cpufuncs;
 			if (cputype == CPU_ID_ARM1136JS)
 cpufuncs.cf_sleep = arm1136_sleep_rev0;

Index: src/sys/arch/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.78 src/sys/arch/arm/arm32/cpu.c:1.79
--- src/sys/arch/arm/arm32/cpu.c:1.78	Thu Mar 10 08:07:08 2011
+++ src/sys/arch/arm/arm32/cpu.c	Sun May 20 17:56:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.78 2011/03/10 08:07:08 bsh Exp $	*/
+/*	$NetBSD: cpu.c,v 1.79 2012/05/20 17:56:30 skrll Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.78 2011/03/10 08:07:08 bsh Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.79 2012/05/20 17:56:30 skrll Exp $);
 
 #include sys/systm.h
 #include sys/malloc.h
@@ -409,7 +409,7 @@ const struct cpuidtab cpuids[] = {
 	  pN_steppings },
 	{ CPU_ID_ARM1136JSR1,	CPU_CLASS_ARM11J,	ARM1136J-S r1,
 	  pN_steppings },
-	{ CPU_ID_ARM1176JS,	CPU_CLASS_ARM11J,	ARM1176J-S r0,
+	{ CPU_ID_ARM1176JZS,	CPU_CLASS_ARM11J,	ARM1176JZ-S r0,
 	  pN_steppings },
 
 	{ CPU_ID_ARM11MPCORE,	CPU_CLASS_ARM11J, 	ARM11 MPCore,

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.48 src/sys/arch/arm/include/armreg.h:1.49
--- src/sys/arch/arm/include/armreg.h:1.48	Thu Jun 30 20:09:20 2011
+++ src/sys/arch/arm/include/armreg.h	Sun May 20 17:56:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.48 2011/06/30 20:09:20 wiz Exp $	*/
+/*	$NetBSD: armreg.h,v 1.49 2012/05/20 17:56:30 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -199,7 +199,7 @@
 #define CPU_ID_ARM11MPCORE	0x410fb020
 #define CPU_ID_ARM1136JS	0x4107b360
 #define CPU_ID_ARM1136JSR1	0x4117b360
-#define CPU_ID_ARM1176JS	0x410fb760
+#define CPU_ID_ARM1176JZS	0x410fb760
 #define CPU_ID_CORTEXA8R1	0x411fc080
 #define CPU_ID_CORTEXA8R2	0x412fc080
 #define CPU_ID_CORTEXA8R3	0x413fc080



CVS commit: src/sys/arch/arm

2012-05-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 20 17:58:32 UTC 2012

Modified Files:
src/sys/arch/arm/arm32: cpu.c
src/sys/arch/arm/include: armreg.h

Log Message:
Add the ARM1156T2-S


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/arm/arm32/cpu.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/arm/include/armreg.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/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.79 src/sys/arch/arm/arm32/cpu.c:1.80
--- src/sys/arch/arm/arm32/cpu.c:1.79	Sun May 20 17:56:30 2012
+++ src/sys/arch/arm/arm32/cpu.c	Sun May 20 17:58:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.79 2012/05/20 17:56:30 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.80 2012/05/20 17:58:32 skrll Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.79 2012/05/20 17:56:30 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.80 2012/05/20 17:58:32 skrll Exp $);
 
 #include sys/systm.h
 #include sys/malloc.h
@@ -409,6 +409,8 @@ const struct cpuidtab cpuids[] = {
 	  pN_steppings },
 	{ CPU_ID_ARM1136JSR1,	CPU_CLASS_ARM11J,	ARM1136J-S r1,
 	  pN_steppings },
+	{ CPU_ID_ARM1156T2S,	CPU_CLASS_ARM11J,	ARM1156T2-S r0,
+	  pN_steppings },
 	{ CPU_ID_ARM1176JZS,	CPU_CLASS_ARM11J,	ARM1176JZ-S r0,
 	  pN_steppings },
 

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.49 src/sys/arch/arm/include/armreg.h:1.50
--- src/sys/arch/arm/include/armreg.h:1.49	Sun May 20 17:56:30 2012
+++ src/sys/arch/arm/include/armreg.h	Sun May 20 17:58:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.49 2012/05/20 17:56:30 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.50 2012/05/20 17:58:32 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -199,6 +199,7 @@
 #define CPU_ID_ARM11MPCORE	0x410fb020
 #define CPU_ID_ARM1136JS	0x4107b360
 #define CPU_ID_ARM1136JSR1	0x4117b360
+#define CPU_ID_ARM1156T2S	0x4107b560
 #define CPU_ID_ARM1176JZS	0x410fb760
 #define CPU_ID_CORTEXA8R1	0x411fc080
 #define CPU_ID_CORTEXA8R2	0x412fc080



CVS commit: src/sys/arch/arm

2012-05-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 20 18:08:05 UTC 2012

Modified Files:
src/sys/arch/arm/arm32: cpu.c
src/sys/arch/arm/include: armreg.h

Log Message:
Remove the ARM1156T2 bloat - it only has an MPU. Prompted by matt@


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/arm/arm32/cpu.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arm/include/armreg.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/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.80 src/sys/arch/arm/arm32/cpu.c:1.81
--- src/sys/arch/arm/arm32/cpu.c:1.80	Sun May 20 17:58:32 2012
+++ src/sys/arch/arm/arm32/cpu.c	Sun May 20 18:08:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.80 2012/05/20 17:58:32 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.81 2012/05/20 18:08:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.80 2012/05/20 17:58:32 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.81 2012/05/20 18:08:05 skrll Exp $);
 
 #include sys/systm.h
 #include sys/malloc.h
@@ -409,8 +409,11 @@ const struct cpuidtab cpuids[] = {
 	  pN_steppings },
 	{ CPU_ID_ARM1136JSR1,	CPU_CLASS_ARM11J,	ARM1136J-S r1,
 	  pN_steppings },
+#if 0
+	/* The ARM1156T2-S only has a memory protection unit */
 	{ CPU_ID_ARM1156T2S,	CPU_CLASS_ARM11J,	ARM1156T2-S r0,
 	  pN_steppings },
+#endif
 	{ CPU_ID_ARM1176JZS,	CPU_CLASS_ARM11J,	ARM1176JZ-S r0,
 	  pN_steppings },
 

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.50 src/sys/arch/arm/include/armreg.h:1.51
--- src/sys/arch/arm/include/armreg.h:1.50	Sun May 20 17:58:32 2012
+++ src/sys/arch/arm/include/armreg.h	Sun May 20 18:08:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.50 2012/05/20 17:58:32 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.51 2012/05/20 18:08:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -199,7 +199,7 @@
 #define CPU_ID_ARM11MPCORE	0x410fb020
 #define CPU_ID_ARM1136JS	0x4107b360
 #define CPU_ID_ARM1136JSR1	0x4117b360
-#define CPU_ID_ARM1156T2S	0x4107b560
+#define CPU_ID_ARM1156T2S	0x4107b560 /* MPU only */
 #define CPU_ID_ARM1176JZS	0x410fb760
 #define CPU_ID_CORTEXA8R1	0x411fc080
 #define CPU_ID_CORTEXA8R2	0x412fc080



CVS commit: src/share/doc/smm/04.quotas

2012-05-20 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon May 21 05:53:28 UTC 2012

Modified Files:
src/share/doc/smm/04.quotas: quotas.ms

Log Message:
Update. comments/suggestions/edits please.

This should be pulled up to netbsd-6 once the dust (if any) settles.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/doc/smm/04.quotas/quotas.ms

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

Modified files:

Index: src/share/doc/smm/04.quotas/quotas.ms
diff -u src/share/doc/smm/04.quotas/quotas.ms:1.4 src/share/doc/smm/04.quotas/quotas.ms:1.5
--- src/share/doc/smm/04.quotas/quotas.ms:1.4	Fri Feb 13 11:36:08 2004
+++ src/share/doc/smm/04.quotas/quotas.ms	Mon May 21 05:53:28 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: quotas.ms,v 1.4 2004/02/13 11:36:08 wiz Exp $
+.\	$NetBSD: quotas.ms,v 1.5 2012/05/21 05:53:28 dholland Exp $
 .\
 .\ Copyright (c) 1983, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,253 +29,717 @@
 .\
 .\	@(#)quotas.ms	8.1 (Berkeley) 6/8/93
 .\
-.EH 'SMM:4-%''Disc Quotas in a \s-2UNIX\s+2 Environment'
-.OH 'Disc Quotas in a \s-2UNIX\s+2 Environment''SMM:4-%'
-.ND 5th July, 1983
+.\
+.\ Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by David A. Holland.
+.\
+.\ 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.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``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 THE FOUNDATION 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.
+.\
+.\
+.\ .EH 'SMM:4-%''Disc Quotas in a \s-2UNIX\s+2 Environment'
+.\ .OH 'Disc Quotas in a \s-2UNIX\s+2 Environment''SMM:4-%'
+.\ .ND 5th July, 1983
+.\ .TL
+.\ Disc Quotas in a \s-2UNIX\s+2\s-3\u*\d\s0 Environment
+.\ .FS
+.\ * UNIX is a trademark of Bell Laboratories.
+.\ .FE
+.EH 'SMM:4-%''Disk Quotas in NetBSD'
+.OH 'Disk Quotas in NetBSD''SMM:4-%'
+.ND May 20, 2012
 .TL
-Disc Quotas in a \s-2UNIX\s+2\s-3\u*\d\s0 Environment
-.FS
-* UNIX is a trademark of Bell Laboratories.
-.FE
+Disk Quotas in NetBSD
 .AU
-Robert Elz
+David A. Holland
+.\ (XXX: what's the best way to do this?)
+.\ Robert Elz
 .AI
-Department of Computer Science
-University of Melbourne,
-Parkville,
-Victoria,
-Australia.
+Based upon an earlier version by Robert Elz.
 .AB
 .PP
-In most computing environments, disc space is not
+In most computing environments, disk space is not
 infinite.
-The disc quota system provides a mechanism
-to control usage of disc space, on an
+The disk quota system provides a mechanism
+to control usage of disk space on an
 individual basis.
 .PP
-Quotas may be set for each individual user, on any, or
-all filesystems.
+Quotas may be set for each individual user, and for groups.
+Quotas may be set (or not set) independently on each mounted file
+system.
+Quotas are not supported on all file system types, but do work over
+NFS.
 .PP
 The quota system will warn users when they
 exceed their allotted limit, but allow some
 extra space for current work.
-Repeatedly remaining over quota at logout,
-will cause a fatal over quota condition eventually.
-.PP
-The quota system is an optional part of
-\s-2VMUNIX\s0 that may be included when the
-system is configured.
+Remaining over quota for long periods of time
+will eventually cause a fatal over-quota condition.
 .AE
 .NH 1
-Users' view of disc quotas
+Users' view of disk quotas
+.PP
+To an ordinary user, having a disk quota is almost the same as having
+a smaller disk.
+When the amount of space available is consumed, further attempts to
+use more will fail.
+.PP
+To make this less painful, the quota system actually provides two
+limits for every resource: a
+\fIhard\fP
+limit and a
+\fIsoft\fP
+limit.
+The hard limit may not be exceeded.
+The soft limit may be