svn commit: r247252 - head/sys/arm/ti

2013-02-25 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb 25 08:04:47 2013
New Revision: 247252
URL: http://svnweb.freebsd.org/changeset/base/247252

Log:
  - Fix off-by-one error when returning max pin number
  - Fix GPIOGET for output pins. Requesting state for
  output pin is valid operation, get the state from
  TI_GPIO_DATAOUTX register

Modified:
  head/sys/arm/ti/ti_gpio.c

Modified: head/sys/arm/ti/ti_gpio.c
==
--- head/sys/arm/ti/ti_gpio.c   Mon Feb 25 02:41:38 2013(r247251)
+++ head/sys/arm/ti/ti_gpio.c   Mon Feb 25 08:04:47 2013(r247252)
@@ -281,7 +281,7 @@ ti_gpio_pin_max(device_t dev, int *maxpi
banks++;
}
 
-   *maxpin = (banks * PINS_PER_BANK);
+   *maxpin = (banks * PINS_PER_BANK) - 1;
 
TI_GPIO_UNLOCK(sc);
 
@@ -541,13 +541,11 @@ ti_gpio_pin_get(device_t dev, uint32_t p
/* Sanity check the pin is not configured as an output */
val = ti_gpio_read_4(sc, bank, TI_GPIO_OE);
 
-   if ((val & mask) == mask) {
-   TI_GPIO_UNLOCK(sc);
-   return (EINVAL);
-   }
-
/* Read the value on the pin */
-   *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0;
+   if (val & mask)
+   *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 
: 0;
+   else
+   *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 
: 0;
 
TI_GPIO_UNLOCK(sc);
 
@@ -728,6 +726,7 @@ ti_gpio_attach(device_t dev)
/* Finish of the probe call */
device_add_child(dev, "gpioc", device_get_unit(dev));
device_add_child(dev, "gpiobus", device_get_unit(dev));
+
return (bus_generic_attach(dev));
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247255 - head/sys/dev/usb

2013-02-25 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Feb 25 08:24:21 2013
New Revision: 247255
URL: http://svnweb.freebsd.org/changeset/base/247255

Log:
  Add new USB ID.
  
  Submitted by: Dmitry Luhtionov 

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsMon Feb 25 08:14:07 2013(r247254)
+++ head/sys/dev/usb/usbdevsMon Feb 25 08:24:21 2013(r247255)
@@ -650,6 +650,7 @@ vendor OWEN 0x1555  Owen
 vendor OQO 0x1557  OQO
 vendor UMEDIA  0x157e  U-MEDIA Communications
 vendor FIBERLINE   0x1582  Fiberline
+vendor AFATECH 0x15a4  Afatech Technologies, Inc.
 vendor SPARKLAN0x15a9  SparkLAN
 vendor OLIMEX  0x15ba  Olimex
 vendor SOUNDGRAPH  0x15c2  Soundgraph, Inc.
@@ -916,6 +917,9 @@ product ADS UBS10BTX0x0009  UBS-10BT Et
 /* AEI products */
 product AEI FASTETHERNET   0x1701  Fast Ethernet
 
+/* Afatech Technologies, Inc. */
+product AFATECH AFATECH13360x1336  Flash Card Reader
+
 /* Agate Technologies products */
 product AGATE QDRIVE   0x0378  Q-Drive
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Konstantin Belousov
On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
> On Thu, 21 Feb 2013 19:02:50 + (UTC)
> John Baldwin  wrote:
> 
> > Author: jhb
> > Date: Thu Feb 21 19:02:50 2013
> > New Revision: 247116
> > URL: http://svnweb.freebsd.org/changeset/base/247116
> > 
> > Log:
> >   Further refine the handling of stop signals in the NFS client.  The
> >   changes in r246417 were incomplete as they did not add explicit
> > calls to sigdeferstop() around all the places that previously passed
> > SBDRY to _sleep().  In addition, nfs_getcacheblk() could trigger a
> > write RPC from getblk() resulting in sigdeferstop() recursing.
> > Rather than manually deferring stop signals in specific places,
> > change the VFS_*() and VOP_*() methods to defer stop signals for
> > filesystems which request this behavior via a new VFCF_SBDRY flag.
> > Note that this has to be a VFC flag rather than a MNTK flag so that
> > it works properly with VFS_MOUNT() when the mount is not yet fully
> > constructed.  For now, only the NFS clients are set this new flag in
> > VFS_SET(). 
> >   A few other related changes:
> >   - Add an assertion to ensure that TDF_SBDRY doesn't leak to
> > userland.
> >   - When a lookup request uses VOP_READLINK() to follow a symlink,
> > mark the request as being on behalf of the thread performing the
> > lookup (cnp_thread) rather than using a NULL thread pointer.  This
> > causes NFS to properly handle signals during this VOP on an
> > interruptible mount.
> >   
> >   PR:   kern/176179
> >   Reported by:  Russell Cattelan (sigdeferstop() recursion)
> >   Reviewed by:  kib
> >   MFC after:1 month
> 
> This change is causing init to crash for me on armv6. I'm netbooting a
> PandaBoard and it appears init is receiving a SIGABRT before it gets
> into main().
> 
> Do you have any idea where I could look to track down why it is doing
> this?

It is weird. SIGABRT sent by the kernel usually means that execve(2)
already destroyed the previous address space of the process, but the
new image cannot be activated, most likely due to image format error
discovered too late, or resource shortage.

Could it be that some NFS RPC fails after the patch, but I cannot imagine
why. You would need to track this. Also, verify that the init binary is
correct.

I tried amd64 netboot, and it worked fine.


pgpEgxOgd27eu.pgp
Description: PGP signature


svn commit: r247259 - head/sys/arm/ti

2013-02-25 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb 25 09:33:48 2013
New Revision: 247259
URL: http://svnweb.freebsd.org/changeset/base/247259

Log:
  Fix off-by-one error in sanity checks

Modified:
  head/sys/arm/ti/ti_gpio.c

Modified: head/sys/arm/ti/ti_gpio.c
==
--- head/sys/arm/ti/ti_gpio.c   Mon Feb 25 09:22:36 2013(r247258)
+++ head/sys/arm/ti/ti_gpio.c   Mon Feb 25 09:33:48 2013(r247259)
@@ -315,7 +315,7 @@ ti_gpio_pin_getcaps(device_t dev, uint32
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@@ -353,7 +353,7 @@ ti_gpio_pin_getflags(device_t dev, uint3
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@@ -390,7 +390,7 @@ ti_gpio_pin_getname(device_t dev, uint32
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@@ -445,7 +445,7 @@ ti_gpio_pin_setflags(device_t dev, uint3
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@@ -494,7 +494,7 @@ ti_gpio_pin_set(device_t dev, uint32_t p
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@@ -533,7 +533,7 @@ ti_gpio_pin_get(device_t dev, uint32_t p
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@@ -575,7 +575,7 @@ ti_gpio_pin_toggle(device_t dev, uint32_
TI_GPIO_LOCK(sc);
 
/* Sanity check the pin number is valid */
-   if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
+   if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Andrew Turner
On Mon, 25 Feb 2013 10:50:19 +0200
Konstantin Belousov  wrote:

> On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
> > On Thu, 21 Feb 2013 19:02:50 + (UTC)
> > John Baldwin  wrote:
> > 
> > > Author: jhb
> > > Date: Thu Feb 21 19:02:50 2013
> > > New Revision: 247116
> > > URL: http://svnweb.freebsd.org/changeset/base/247116
> > > 
> > > Log:
> > >   Further refine the handling of stop signals in the NFS client.
> > > The changes in r246417 were incomplete as they did not add
> > > explicit calls to sigdeferstop() around all the places that
> > > previously passed SBDRY to _sleep().  In addition,
> > > nfs_getcacheblk() could trigger a write RPC from getblk()
> > > resulting in sigdeferstop() recursing. Rather than manually
> > > deferring stop signals in specific places, change the VFS_*() and
> > > VOP_*() methods to defer stop signals for filesystems which
> > > request this behavior via a new VFCF_SBDRY flag. Note that this
> > > has to be a VFC flag rather than a MNTK flag so that it works
> > > properly with VFS_MOUNT() when the mount is not yet fully
> > > constructed.  For now, only the NFS clients are set this new flag
> > > in VFS_SET(). A few other related changes:
> > >   - Add an assertion to ensure that TDF_SBDRY doesn't leak to
> > > userland.
> > >   - When a lookup request uses VOP_READLINK() to follow a symlink,
> > > mark the request as being on behalf of the thread performing the
> > > lookup (cnp_thread) rather than using a NULL thread pointer.  This
> > > causes NFS to properly handle signals during this VOP on an
> > > interruptible mount.
> > >   
> > >   PR: kern/176179
> > >   Reported by:Russell Cattelan (sigdeferstop() recursion)
> > >   Reviewed by:kib
> > >   MFC after:  1 month
> > 
> > This change is causing init to crash for me on armv6. I'm
> > netbooting a PandaBoard and it appears init is receiving a SIGABRT
> > before it gets into main().
> > 
> > Do you have any idea where I could look to track down why it is
> > doing this?
> 
> It is weird. SIGABRT sent by the kernel usually means that execve(2)
> already destroyed the previous address space of the process, but the
> new image cannot be activated, most likely due to image format error
> discovered too late, or resource shortage.
> 
> Could it be that some NFS RPC fails after the patch, but I cannot
> imagine why. You would need to track this. Also, verify that the init
> binary is correct.
> 
> I tried amd64 netboot, and it worked fine.

It looks like this change is not the issue, it just changed the
symptom enough for me to not realise I was seeing an issue where
it would crash the kernel before. I reinstated this change but only
allowed the kernel to access half the memory and it booted correctly.

The real issue appears to be related to something in the vm layer not
working on ARM boards with too much memory (somewhere between 512MiB
and 1GiB).

Andrew
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247263 - head/sys/dev/usb

2013-02-25 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Feb 25 10:57:35 2013
New Revision: 247263
URL: http://svnweb.freebsd.org/changeset/base/247263

Log:
  Fix init/uninit function type.

Modified:
  head/sys/dev/usb/usb_pf.c

Modified: head/sys/dev/usb/usb_pf.c
==
--- head/sys/dev/usb/usb_pf.c   Mon Feb 25 10:52:01 2013(r247262)
+++ head/sys/dev/usb/usb_pf.c   Mon Feb 25 10:57:35 2013(r247263)
@@ -63,8 +63,8 @@
 #include 
 #endif /* USB_GLOBAL_INCLUDE_FILE */
 
-static void usbpf_init(void);
-static void usbpf_uninit(void);
+static void usbpf_init(void *);
+static void usbpf_uninit(void *);
 static int usbpf_ioctl(struct ifnet *, u_long, caddr_t);
 static int usbpf_clone_match(struct if_clone *, const char *);
 static int usbpf_clone_create(struct if_clone *, char *, size_t, caddr_t);
@@ -82,7 +82,7 @@ SYSINIT(usbpf_init, SI_SUB_PSEUDO, SI_OR
 SYSUNINIT(usbpf_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_uninit, NULL);
 
 static void
-usbpf_init(void)
+usbpf_init(void *arg)
 {
 
usbpf_cloner = if_clone_advanced(usbusname, 0, usbpf_clone_match,
@@ -90,7 +90,7 @@ usbpf_init(void)
 }
 
 static void
-usbpf_uninit(void)
+usbpf_uninit(void *arg)
 {
int devlcnt;
device_t *devlp;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247264 - head/sys/dev/isp

2013-02-25 Thread Matt Jacob
Author: mjacob
Date: Mon Feb 25 11:22:54 2013
New Revision: 247264
URL: http://svnweb.freebsd.org/changeset/base/247264

Log:
  Turn off fast posting for the ISP2100- I'd forgotten that it actually
  might have been enabled for them- now that we use all 32 bits of handle.
  Fast Posting doesn't pass the full 32 bits.
  
  Noticed by: Bugs in NetBSD. Only a NetBSD user might actually still use such 
old hardware.
  MFC after:1 week

Modified:
  head/sys/dev/isp/isp.c

Modified: head/sys/dev/isp/isp.c
==
--- head/sys/dev/isp/isp.c  Mon Feb 25 10:57:35 2013(r247263)
+++ head/sys/dev/isp/isp.c  Mon Feb 25 11:22:54 2013(r247264)
@@ -1709,7 +1709,13 @@ isp_fibre_init(ispsoftc_t *isp)
 *
 * NB: for the 2300, ICBOPT_EXTENDED is required.
 */
-   if (IS_2200(isp) || IS_23XX(isp)) {
+   if (IS_2100(isp)) {
+   /*
+* We can't have Fast Posting any more- we now
+* have 32 bit handles.
+*/
+   icbp->icb_fwoptions &= ~ICBOPT_FAST_POST;
+   } else if (IS_2200(isp) || IS_23XX(isp)) {
icbp->icb_fwoptions |= ICBOPT_EXTENDED;
 
icbp->icb_xfwoptions = fcp->isp_xfwoptions;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Konstantin Belousov
On Mon, Feb 25, 2013 at 11:36:03PM +1300, Andrew Turner wrote:
> On Mon, 25 Feb 2013 10:50:19 +0200
> Konstantin Belousov  wrote:
> 
> > On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
> > > On Thu, 21 Feb 2013 19:02:50 + (UTC)
> > > John Baldwin  wrote:
> > > 
> > > > Author: jhb
> > > > Date: Thu Feb 21 19:02:50 2013
> > > > New Revision: 247116
> > > > URL: http://svnweb.freebsd.org/changeset/base/247116
> > > > 
> > > > Log:
> > > >   Further refine the handling of stop signals in the NFS client.
> > > > The changes in r246417 were incomplete as they did not add
> > > > explicit calls to sigdeferstop() around all the places that
> > > > previously passed SBDRY to _sleep().  In addition,
> > > > nfs_getcacheblk() could trigger a write RPC from getblk()
> > > > resulting in sigdeferstop() recursing. Rather than manually
> > > > deferring stop signals in specific places, change the VFS_*() and
> > > > VOP_*() methods to defer stop signals for filesystems which
> > > > request this behavior via a new VFCF_SBDRY flag. Note that this
> > > > has to be a VFC flag rather than a MNTK flag so that it works
> > > > properly with VFS_MOUNT() when the mount is not yet fully
> > > > constructed.  For now, only the NFS clients are set this new flag
> > > > in VFS_SET(). A few other related changes:
> > > >   - Add an assertion to ensure that TDF_SBDRY doesn't leak to
> > > > userland.
> > > >   - When a lookup request uses VOP_READLINK() to follow a symlink,
> > > > mark the request as being on behalf of the thread performing the
> > > > lookup (cnp_thread) rather than using a NULL thread pointer.  This
> > > > causes NFS to properly handle signals during this VOP on an
> > > > interruptible mount.
> > > >   
> > > >   PR:   kern/176179
> > > >   Reported by:  Russell Cattelan (sigdeferstop() recursion)
> > > >   Reviewed by:  kib
> > > >   MFC after:1 month
> > > 
> > > This change is causing init to crash for me on armv6. I'm
> > > netbooting a PandaBoard and it appears init is receiving a SIGABRT
> > > before it gets into main().
> > > 
> > > Do you have any idea where I could look to track down why it is
> > > doing this?
> > 
> > It is weird. SIGABRT sent by the kernel usually means that execve(2)
> > already destroyed the previous address space of the process, but the
> > new image cannot be activated, most likely due to image format error
> > discovered too late, or resource shortage.
> > 
> > Could it be that some NFS RPC fails after the patch, but I cannot
> > imagine why. You would need to track this. Also, verify that the init
> > binary is correct.
> > 
> > I tried amd64 netboot, and it worked fine.
> 
> It looks like this change is not the issue, it just changed the
> symptom enough for me to not realise I was seeing an issue where
> it would crash the kernel before. I reinstated this change but only
> allowed the kernel to access half the memory and it booted correctly.
> 
> The real issue appears to be related to something in the vm layer not
> working on ARM boards with too much memory (somewhere between 512MiB
> and 1GiB).

Hm, do you have r246926, r246929 and r247046 ?


pgpahcqnuDHAv.pgp
Description: PGP signature


svn commit: r247265 - in head: cddl/contrib/opensolaris/cmd/zinject cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys...

2013-02-25 Thread Martin Matuska
Author: mm
Date: Mon Feb 25 12:33:31 2013
New Revision: 247265
URL: http://svnweb.freebsd.org/changeset/base/247265

Log:
  MFV v242732:
  
  Merge the ZFS I/O deadman thread from vendor (illumos).
  This feature panics the system on hanging ZFS I/O, helps debugging
  and resumes failed service.
  
  The panic behavior can be controlled with the loader-only tunables:
  vfs.zfs.deadman_enabled (enable or disable panic on stalled ZFS I/O)
  vfs.zfs.deadman_synctime (expiration time for stalled ZFS I/O)
  
  By default, ZFS I/O deadman is enabled by default on amd64 and i386
  excluding virtual guest machines.
  
  Illumos ZFS issues:
3246 ZFS I/O deadman thread
  
  References:
https://www.illumos.org/issues/3246
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/cmd/zinject/translate.c
  head/cddl/contrib/opensolaris/cmd/zinject/zinject.c
  head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
  head/sys/cddl/compat/opensolaris/sys/time.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_boot.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zinject/translate.c
==
--- head/cddl/contrib/opensolaris/cmd/zinject/translate.c   Mon Feb 25 
11:22:54 2013(r247264)
+++ head/cddl/contrib/opensolaris/cmd/zinject/translate.c   Mon Feb 25 
12:33:31 2013(r247265)
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #include 
@@ -455,6 +456,20 @@ translate_device(const char *pool, const
&record->zi_guid) == 0);
}
 
+   /*
+* Device faults can take on three different forms:
+* 1). delayed or hanging I/O
+* 2). zfs label faults
+* 3). generic disk faults
+*/
+   if (record->zi_timer != 0) {
+   record->zi_cmd = ZINJECT_DELAY_IO;
+   } else if (label_type != TYPE_INVAL) {
+   record->zi_cmd = ZINJECT_LABEL_FAULT;
+   } else {
+   record->zi_cmd = ZINJECT_DEVICE_FAULT;
+   }
+
switch (label_type) {
case TYPE_LABEL_UBERBLOCK:
record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]);

Modified: head/cddl/contrib/opensolaris/cmd/zinject/zinject.c
==
--- head/cddl/contrib/opensolaris/cmd/zinject/zinject.c Mon Feb 25 11:22:54 
2013(r247264)
+++ head/cddl/contrib/opensolaris/cmd/zinject/zinject.c Mon Feb 25 12:33:31 
2013(r247265)
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 /*
@@ -603,7 +604,7 @@ main(int argc, char **argv)
}
 
while ((c = getopt(argc, argv,
-   ":aA:b:d:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:")) != -1) {
+   ":aA:b:d:D:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:")) != -1) {
switch (c) {
case 'a':
flags |= ZINJECT_FLUSH_ARC;
@@ -629,6 +630,15 @@ main(int argc, char **argv)
case 'd':
device = optarg;
break;
+   case 'D':
+   record.zi_timer = strtoull(optarg, &end, 10);
+   if (errno != 0 || *end != '\0') {
+   (void) fprintf(stderr, "invalid i/o delay "
+   "value: '%s'\n", optarg);
+   usage();
+   return (1);
+   }
+   break;
case 'e':
if (strcasecmp(optarg, "io") == 0) {
error = EIO;
@@ -693,6 +703,7 @@ main(int argc, char **argv)
case 'p':
(void) strlcpy(record.zi_func, opta

svn commit: r247266 - head/sys/dev/sym

2013-02-25 Thread Matt Jacob
Author: mjacob
Date: Mon Feb 25 14:06:24 2013
New Revision: 247266
URL: http://svnweb.freebsd.org/changeset/base/247266

Log:
  Don't try and negotiate sync mode if either period or offset are zero.
  
  PR:   kern/163064
  Partially Submitted by:   Peter 
  MFC after:1 month

Modified:
  head/sys/dev/sym/sym_hipd.c

Modified: head/sys/dev/sym/sym_hipd.c
==
--- head/sys/dev/sym/sym_hipd.c Mon Feb 25 12:33:31 2013(r247265)
+++ head/sys/dev/sym/sym_hipd.c Mon Feb 25 14:06:24 2013(r247266)
@@ -8211,8 +8211,13 @@ static void sym_update_trans(hcb_p np, t
 *  Scale against driver configuration limits.
 */
if (tip->width  > SYM_SETUP_MAX_WIDE) tip->width  = SYM_SETUP_MAX_WIDE;
-   if (tip->offset > SYM_SETUP_MAX_OFFS) tip->offset = SYM_SETUP_MAX_OFFS;
-   if (tip->period < SYM_SETUP_MIN_SYNC) tip->period = SYM_SETUP_MIN_SYNC;
+   if (tip->period && tip->offset) {
+   if (tip->offset > SYM_SETUP_MAX_OFFS) tip->offset = 
SYM_SETUP_MAX_OFFS;
+   if (tip->period < SYM_SETUP_MIN_SYNC) tip->period = 
SYM_SETUP_MIN_SYNC;
+   } else {
+   tip->offset = 0;
+   tip->period = 0;
+   }
 
/*
 *  Scale against actual controller BUS width.
@@ -8231,21 +8236,23 @@ static void sym_update_trans(hcb_p np, t
/*
 *  Scale period factor and offset against controller limits.
 */
-   if (tip->options & PPR_OPT_DT) {
-   if (tip->period < np->minsync_dt)
-   tip->period = np->minsync_dt;
-   if (tip->period > np->maxsync_dt)
-   tip->period = np->maxsync_dt;
-   if (tip->offset > np->maxoffs_dt)
-   tip->offset = np->maxoffs_dt;
-   }
-   else {
-   if (tip->period < np->minsync)
-   tip->period = np->minsync;
-   if (tip->period > np->maxsync)
-   tip->period = np->maxsync;
-   if (tip->offset > np->maxoffs)
-   tip->offset = np->maxoffs;
+   if (tip->offset && tip->period) {
+   if (tip->options & PPR_OPT_DT) {
+   if (tip->period < np->minsync_dt)
+   tip->period = np->minsync_dt;
+   if (tip->period > np->maxsync_dt)
+   tip->period = np->maxsync_dt;
+   if (tip->offset > np->maxoffs_dt)
+   tip->offset = np->maxoffs_dt;
+   }
+   else {
+   if (tip->period < np->minsync)
+   tip->period = np->minsync;
+   if (tip->period > np->maxsync)
+   tip->period = np->maxsync;
+   if (tip->offset > np->maxoffs)
+   tip->offset = np->maxoffs;
+   }
}
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247268 - head/sys/dev/mxge

2013-02-25 Thread Andrew Gallatin
Author: gallatin
Date: Mon Feb 25 16:22:40 2013
New Revision: 247268
URL: http://svnweb.freebsd.org/changeset/base/247268

Log:
  Several cleanups and fixes to mxge:
  
  - Remove vestigial null pointer tests after malloc(..., M_WAITOK).
  
  - Remove vestigal qualhack union
  
  - Use strlcpy() instead of the error-prone strncpy() when parsing
EEPROM and copying strings
  
  - Check the MAC address in the EEPROM strings more strictly.
  
  - Expand the macro MXGE_NEXT_STRING() at its only user. Due to a typo,
the macro was very confusing.
  
  - Remove unnecessary buffer limit check.  The buffer is double-NUL
terminated per construction.
  
  PR:   kern/176369
  Submitted by: Christoph Mallon 

Modified:
  head/sys/dev/mxge/if_mxge.c

Modified: head/sys/dev/mxge/if_mxge.c
==
--- head/sys/dev/mxge/if_mxge.c Mon Feb 25 16:13:21 2013(r247267)
+++ head/sys/dev/mxge/if_mxge.c Mon Feb 25 16:22:40 2013(r247268)
@@ -288,42 +288,43 @@ mxge_dma_free(mxge_dma_t *dma)
 static int
 mxge_parse_strings(mxge_softc_t *sc)
 {
-#define MXGE_NEXT_STRING(p) while(ptr < limit && *ptr++)
-
-   char *ptr, *limit;
+   char *ptr;
int i, found_mac, found_sn2;
+   char *endptr;
 
ptr = sc->eeprom_strings;
-   limit = sc->eeprom_strings + MXGE_EEPROM_STRINGS_SIZE;
found_mac = 0;
found_sn2 = 0;
-   while (ptr < limit && *ptr != '\0') {
-   if (memcmp(ptr, "MAC=", 4) == 0) {
-   ptr += 1;
-   sc->mac_addr_string = ptr;
-   for (i = 0; i < 6; i++) {
-   ptr += 3;
-   if ((ptr + 2) > limit)
+   while (*ptr != '\0') {
+   if (strncmp(ptr, "MAC=", 4) == 0) {
+   ptr += 4;
+   for (i = 0;;) {
+   sc->mac_addr[i] = strtoul(ptr, &endptr, 16);
+   if (endptr - ptr != 2)
+   goto abort;
+   ptr = endptr;
+   if (++i == 6)
+   break;
+   if (*ptr++ != ':')
goto abort;
-   sc->mac_addr[i] = strtoul(ptr, NULL, 16);
-   found_mac = 1;
}
-   } else if (memcmp(ptr, "PC=", 3) == 0) {
+   found_mac = 1;
+   } else if (strncmp(ptr, "PC=", 3) == 0) {
ptr += 3;
-   strncpy(sc->product_code_string, ptr,
-   sizeof (sc->product_code_string) - 1);
-   } else if (!found_sn2 && (memcmp(ptr, "SN=", 3) == 0)) {
+   strlcpy(sc->product_code_string, ptr,
+   sizeof(sc->product_code_string));
+   } else if (!found_sn2 && (strncmp(ptr, "SN=", 3) == 0)) {
ptr += 3;
-   strncpy(sc->serial_number_string, ptr,
-   sizeof (sc->serial_number_string) - 1);
-   } else if (memcmp(ptr, "SN2=", 4) == 0) {
+   strlcpy(sc->serial_number_string, ptr,
+   sizeof(sc->serial_number_string));
+   } else if (strncmp(ptr, "SN2=", 4) == 0) {
/* SN2 takes precedence over SN */
ptr += 4;
found_sn2 = 1;
-   strncpy(sc->serial_number_string, ptr,
-   sizeof (sc->serial_number_string) - 1);
+   strlcpy(sc->serial_number_string, ptr,
+   sizeof(sc->serial_number_string));
}
-   MXGE_NEXT_STRING(ptr);
+   while (*ptr++ != '\0') {}
}
 
if (found_mac)
@@ -649,12 +650,6 @@ abort:
return (mxge_load_firmware(sc, 0));
 }
 
-union qualhack
-{
-const char *ro_char;
-char *rw_char;
-};
-
 static int
 mxge_validate_firmware(mxge_softc_t *sc, const mcp_gen_header_t *hdr)
 {
@@ -667,7 +662,7 @@ mxge_validate_firmware(mxge_softc_t *sc,
}
 
/* save firmware version for sysctl */
-   strncpy(sc->fw_version, hdr->version, sizeof (sc->fw_version));
+   strlcpy(sc->fw_version, hdr->version, sizeof(sc->fw_version));
if (mxge_verbose)
device_printf(sc->dev, "firmware id: %s\n", hdr->version);
 
@@ -3325,8 +3320,6 @@ mxge_alloc_slice_rings(struct mxge_slice
size_t bytes;
int err, i;
 
-   err = ENOMEM;
-
/* allocate per-slice receive resources */
 
ss->rx_small.mask = ss->rx_big.mask = rx_ring_entries - 1;
@@ -3335,24 +3328,16 @@ mxge_alloc_slice_rings(struct mxge_slice
/* allocate the rx shadow ring

svn commit: r247269 - head/sbin/fsck_ffs

2013-02-25 Thread Tim Kientzle
Author: kientzle
Date: Mon Feb 25 16:25:38 2013
New Revision: 247269
URL: http://svnweb.freebsd.org/changeset/base/247269

Log:
  Fix ARM build by assigning the computed time here to
  a variable of the right type for printf.

Modified:
  head/sbin/fsck_ffs/fsutil.c

Modified: head/sbin/fsck_ffs/fsutil.c
==
--- head/sbin/fsck_ffs/fsutil.c Mon Feb 25 16:22:40 2013(r247268)
+++ head/sbin/fsck_ffs/fsutil.c Mon Feb 25 16:25:38 2013(r247269)
@@ -448,8 +448,8 @@ static void printIOstats(void)
 
clock_gettime(CLOCK_REALTIME_PRECISE, &finishpass);
timespecsub(&finishpass, &startpass);
-   printf("Running time: %ld msec\n",
-   finishpass.tv_sec * 1000 + finishpass.tv_nsec / 100);
+   msec = finishpass.tv_sec * 1000 + finishpass.tv_nsec / 100;
+   printf("Running time: %lld msec\n", msec);
printf("buffer reads by type:\n");
for (totalmsec = 0, i = 0; i < BT_NUMBUFTYPES; i++)
totalmsec += readtime[i].tv_sec * 1000 +
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247270 - head/usr.sbin/rtadvd

2013-02-25 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Feb 25 16:47:09 2013
New Revision: 247270
URL: http://svnweb.freebsd.org/changeset/base/247270

Log:
  - Implement and use usage().
  - Document the -C option.
  - Allow rtadvd to be invoked without any interfaces on the command line,
and document that possibility.
  
  MFC after:1 week

Modified:
  head/usr.sbin/rtadvd/rtadvd.8
  head/usr.sbin/rtadvd/rtadvd.c

Modified: head/usr.sbin/rtadvd/rtadvd.8
==
--- head/usr.sbin/rtadvd/rtadvd.8   Mon Feb 25 16:25:38 2013
(r247269)
+++ head/usr.sbin/rtadvd/rtadvd.8   Mon Feb 25 16:47:09 2013
(r247270)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 14, 2011
+.Dd February 25, 2013
 .Dt RTADVD 8
 .Os
 .Sh NAME
@@ -39,13 +39,19 @@
 .Nm
 .Op Fl dDfRs
 .Op Fl c Ar configfile
+.Op Fl C Ar ctlsock
 .Op Fl M Ar ifname
 .Op Fl p Ar pidfile
-.Ar interface ...
+.Op Ar interface ...
 .Sh DESCRIPTION
 .Nm
 sends router advertisement packets to the specified
 .Ar interfaces .
+If no interfaces are specified,
+.Nm
+will still run, but will not advertise any routes until interfaces are
+added using
+.Xr rtadvctl 8 .
 .Pp
 The program will daemonize itself on invocation.
 It will then send router advertisement packets periodically, as well
@@ -121,6 +127,11 @@ for the configuration file.
 By default,
 .Pa /etc/rtadvd.conf
 is used.
+.It Fl C
+Specify an alternate location for the control socket used by
+.Xr rtadvctl 8 .
+The default is
+.Pa /var/run/rtadvd.sock .
 .It Fl d
 Print debugging information.
 .It Fl D
@@ -185,6 +196,7 @@ The default process ID file.
 .Ex -std
 .Sh SEE ALSO
 .Xr rtadvd.conf 5 ,
+.Xr rtadvctl 8 ,
 .Xr rtsol 8
 .Rs
 .%A Thomas Narten

Modified: head/usr.sbin/rtadvd/rtadvd.c
==
--- head/usr.sbin/rtadvd/rtadvd.c   Mon Feb 25 16:25:38 2013
(r247269)
+++ head/usr.sbin/rtadvd/rtadvd.c   Mon Feb 25 16:47:09 2013
(r247270)
@@ -166,6 +166,15 @@ static voidrtmsg_input(struct sockinfo 
 static voidset_short_delay(struct ifinfo *);
 static int check_accept_rtadv(int);
 
+static void
+usage(void)
+{
+
+   fprintf(stderr, "usage: rtadvd [-dDfRs] "
+   "[-c configfile] [-C ctlsock] [-M ifname] [-p pidfile]\n");
+   exit(1);
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -177,7 +186,7 @@ main(int argc, char *argv[])
pid_t pid, otherpid;
 
/* get command line options and arguments */
-   while ((ch = getopt(argc, argv, "c:C:dDfM:p:Rs")) != -1) {
+   while ((ch = getopt(argc, argv, "c:C:dDfhM:p:Rs")) != -1) {
switch (ch) {
case 'c':
conffile = optarg;
@@ -209,17 +218,12 @@ main(int argc, char *argv[])
case 'p':
pidfilename = optarg;
break;
+   default:
+   usage();
}
}
argc -= optind;
argv += optind;
-   if (argc == 0) {
-   fprintf(stderr,
-   "usage: rtadvd [-dDfRs] [-c conffile] "
-   "[-C ctrlsockname] [-M ifname] "
-   "[-p pidfile] interfaces...\n");
-   exit(1);
-   }
 
logopt = LOG_NDELAY | LOG_PID;
if (fflag)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247271 - head/etc/rc.d

2013-02-25 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Feb 25 17:07:42 2013
New Revision: 247271
URL: http://svnweb.freebsd.org/changeset/base/247271

Log:
  If rtadvd_interfaces is set to "none", start rtadvd without listing
  any interfaces on the command line.
  
  MFC after:1 week

Modified:
  head/etc/rc.d/rtadvd

Modified: head/etc/rc.d/rtadvd
==
--- head/etc/rc.d/rtadvdMon Feb 25 16:47:09 2013(r247270)
+++ head/etc/rc.d/rtadvdMon Feb 25 17:07:42 2013(r247271)
@@ -46,6 +46,8 @@ rtadvd_precmd()
fi
done
;;
+   [Nn][Oo][Nn][Ee])
+   ;;
*)
command_args="${rtadvd_interfaces}"
;;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247272 - head/usr.bin/systat

2013-02-25 Thread Joel Dahl
Author: joel (doc committer)
Date: Mon Feb 25 17:32:10 2013
New Revision: 247272
URL: http://svnweb.freebsd.org/changeset/base/247272

Log:
  Remove EOL whitespace.

Modified:
  head/usr.bin/systat/systat.1

Modified: head/usr.bin/systat/systat.1
==
--- head/usr.bin/systat/systat.1Mon Feb 25 17:07:42 2013
(r247271)
+++ head/usr.bin/systat/systat.1Mon Feb 25 17:32:10 2013
(r247272)
@@ -513,12 +513,12 @@ The following units are recognised: kbit
 mbyte, gbit, gbyte and auto.
 .It Cm pps
 Show statistics in packets per second instead of bytes/bits per second.
-A subsequent call of 
-.Ic pps 
+A subsequent call of
+.Ic pps
 switches this mode off.
 .It Cm match Op Ar patterns
-Display only interfaces that match pattern provided as an argument. 
-Patterns should be in shell syntax separated by whitespaces or commas. 
+Display only interfaces that match pattern provided as an argument.
+Patterns should be in shell syntax separated by whitespaces or commas.
 If this command is called without arguments then all interfaces are displayed.
 For example:
 .Pp
@@ -528,8 +528,8 @@ This will display em0 and bge1 interface
 .Pp
 .Dl match em*, bge*, lo0
 .Pp
-This will display all 
-.Ic em 
+This will display all
+.Ic em
 interfaces, all
 .Ic bge
 interfaces and the loopback interface.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247274 - in head: bin/test tools/regression/bin/test

2013-02-25 Thread Peter Jeremy
Author: peterj
Date: Mon Feb 25 19:05:40 2013
New Revision: 247274
URL: http://svnweb.freebsd.org/changeset/base/247274

Log:
  Enhance test(1) by adding provision to compare any combination of the
  access, birth, change and modify times of two files, instead of only
  being able to compare modify times.  The builtin test in sh(1) will
  automagically acquire the same expansion.
  
  Approved by:  grog
  MFC after:2 weeks

Modified:
  head/bin/test/test.1
  head/bin/test/test.c
  head/tools/regression/bin/test/regress.sh

Modified: head/bin/test/test.1
==
--- head/bin/test/test.1Mon Feb 25 18:07:20 2013(r247273)
+++ head/bin/test/test.1Mon Feb 25 19:05:40 2013(r247274)
@@ -169,15 +169,65 @@ True if
 .Ar file
 exists and is a socket.
 .It Ar file1 Fl nt Ar file2
-True if
+True if both
+.Ar file1
+and
+.Ar file2
+exist and
+.Ar file1
+is newer than
+.Ar file2 .
+.It Ar file1 Fl nt Ns Ar X Ns Ar Y Ar file2
+True if both
+.Ar file1
+and
+.Ar file2
+exist and
 .Ar file1
-exists and is newer than
+has a more recent last access time
+.Pq Ar X Ns = Ns Cm a ,
+inode creation time
+.Pq Ar X Ns = Ns Cm b ,
+change time
+.Pq Ar X Ns = Ns Cm c ,
+or modification time
+.Pq Ar X Ns = Ns Cm m
+than the last access time
+.Pq Ar Y Ns = Ns Cm a ,
+inode creation time
+.Pq Ar Y Ns = Ns Cm b ,
+change time
+.Pq Ar Y Ns = Ns Cm c ,
+or modification time
+.Pq Ar Y Ns = Ns Cm m
+of
 .Ar file2 .
+Note that
+.Ic -ntmm
+is equivalent to
+.Ic -nt .
 .It Ar file1 Fl ot Ar file2
-True if
+True if both
+.Ar file1
+and
+.Ar file2
+exist and
 .Ar file1
-exists and is older than
+is older than
 .Ar file2 .
+Note that
+.Ar file1
+.Ic -ot
+.Ar file2
+is equivalent to
+.Ar file2
+.Ic -nt
+.Ar file1
+.It Ar file1 Fl ot Ns Ar X Ns Ar Y Ar file2
+Equivalent to
+.Ar file2
+.Ic -nt Ns Ar Y Ns Ar X
+.Ar file1 .
 .It Ar file1 Fl ef Ar file2
 True if
 .Ar file1

Modified: head/bin/test/test.c
==
--- head/bin/test/test.cMon Feb 25 18:07:20 2013(r247273)
+++ head/bin/test/test.cMon Feb 25 19:05:40 2013(r247274)
@@ -63,7 +63,7 @@ error(const char *msg, ...)
"-u"|"-g"|"-k"|"-s"|"-t"|"-z"|"-n"|"-o"|"-O"|"-G"|"-L"|"-S";
 
binary-operator ::= "="|"!="|"-eq"|"-ne"|"-ge"|"-gt"|"-le"|"-lt"|
-   "-nt"|"-ot"|"-ef";
+   "-nt"|"-nt[abcm][abcm]"|"-ot"|"-ot[abcm][abcm])"|"-ef";
operand ::= 
 */
 
@@ -85,8 +85,38 @@ enum token {
FILSUID,
FILSGID,
FILSTCK,
-   FILNT,
-   FILOT,
+   FILNTAA,
+   FILNTAB,
+   FILNTAC,
+   FILNTAM,
+   FILNTBA,
+   FILNTBB,
+   FILNTBC,
+   FILNTBM,
+   FILNTCA,
+   FILNTCB,
+   FILNTCC,
+   FILNTCM,
+   FILNTMA,
+   FILNTMB,
+   FILNTMC,
+   FILNTMM,
+   FILOTAA,
+   FILOTAB,
+   FILOTAC,
+   FILOTAM,
+   FILOTBA,
+   FILOTBB,
+   FILOTBC,
+   FILOTBM,
+   FILOTCA,
+   FILOTCB,
+   FILOTCC,
+   FILOTCM,
+   FILOTMA,
+   FILOTMB,
+   FILOTMC,
+   FILOTMM,
FILEQ,
FILUID,
FILGID,
@@ -118,9 +148,16 @@ enum token_types {
PAREN
 };
 
+enum time_types {
+   ATIME,
+   BTIME,
+   CTIME,
+   MTIME
+};
+
 static struct t_op {
-   char op_text[4];
-   short op_num, op_type;
+   char op_text[6];
+   char op_num, op_type;
 } const ops [] = {
{"-r",  FILRD,  UNOP},
{"-w",  FILWR,  UNOP},
@@ -154,8 +191,40 @@ static struct t_op {
{"-gt", INTGT,  BINOP},
{"-le", INTLE,  BINOP},
{"-lt", INTLT,  BINOP},
-   {"-nt", FILNT,  BINOP},
-   {"-ot", FILOT,  BINOP},
+   {"-nt", FILNTMM,BINOP},
+   {"-ntaa",   FILNTAA,BINOP},
+   {"-ntab",   FILNTAB,BINOP},
+   {"-ntac",   FILNTAC,BINOP},
+   {"-ntam",   FILNTAM,BINOP},
+   {"-ntba",   FILNTBA,BINOP},
+   {"-ntbb",   FILNTBB,BINOP},
+   {"-ntbc",   FILNTBC,BINOP},
+   {"-ntbm",   FILNTBM,BINOP},
+   {"-ntca",   FILNTCA,BINOP},
+   {"-ntcb",   FILNTCB,BINOP},
+   {"-ntcc",   FILNTCC,BINOP},
+   {"-ntcm",   FILNTCM,BINOP},
+   {"-ntma",   FILNTMA,BINOP},
+   {"-ntmb",   FILNTMB,BINOP},
+   {"-ntmc",   FILNTMC,BINOP},
+   {"-ntmm",   FILNTMM,BINOP},
+   {"-ot", FILOTMM,BINOP},
+   {"-otaa",   FILOTAA,BINOP},
+   {"-otab",   FILOTBB,BINOP},
+   {"-otac",   FILOTAC,BINOP},
+   {"-otam",   FILOTAM,BINOP},
+   {"-otba",   FILOTBA,BINOP},
+   {"-otbb",   FILOTBB,BINOP},
+   {"-otbc",   FILO

Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Andrew Turner
On Mon, 25 Feb 2013 13:55:00 +0200
Konstantin Belousov  wrote:

> On Mon, Feb 25, 2013 at 11:36:03PM +1300, Andrew Turner wrote:
> > On Mon, 25 Feb 2013 10:50:19 +0200
> > Konstantin Belousov  wrote:
> > 
> > > On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
> > > > On Thu, 21 Feb 2013 19:02:50 + (UTC)
> > > > John Baldwin  wrote:
> > > > 
> > > > > Author: jhb
> > > > > Date: Thu Feb 21 19:02:50 2013
> > > > > New Revision: 247116
> > > > > URL: http://svnweb.freebsd.org/changeset/base/247116
> > > > > 
> > > > > Log:
> > > > >   Further refine the handling of stop signals in the NFS
> > > > > client. The changes in r246417 were incomplete as they did
> > > > > not add explicit calls to sigdeferstop() around all the
> > > > > places that previously passed SBDRY to _sleep().  In addition,
> > > > > nfs_getcacheblk() could trigger a write RPC from getblk()
> > > > > resulting in sigdeferstop() recursing. Rather than manually
> > > > > deferring stop signals in specific places, change the VFS_*()
> > > > > and VOP_*() methods to defer stop signals for filesystems
> > > > > which request this behavior via a new VFCF_SBDRY flag. Note
> > > > > that this has to be a VFC flag rather than a MNTK flag so
> > > > > that it works properly with VFS_MOUNT() when the mount is not
> > > > > yet fully constructed.  For now, only the NFS clients are set
> > > > > this new flag in VFS_SET(). A few other related changes:
> > > > >   - Add an assertion to ensure that TDF_SBDRY doesn't leak to
> > > > > userland.
> > > > >   - When a lookup request uses VOP_READLINK() to follow a
> > > > > symlink, mark the request as being on behalf of the thread
> > > > > performing the lookup (cnp_thread) rather than using a NULL
> > > > > thread pointer.  This causes NFS to properly handle signals
> > > > > during this VOP on an interruptible mount.
> > > > >   
> > > > >   PR: kern/176179
> > > > >   Reported by:Russell Cattelan (sigdeferstop()
> > > > > recursion) Reviewed by:   kib
> > > > >   MFC after:  1 month
> > > > 
> > > > This change is causing init to crash for me on armv6. I'm
> > > > netbooting a PandaBoard and it appears init is receiving a
> > > > SIGABRT before it gets into main().
> > > > 
> > > > Do you have any idea where I could look to track down why it is
> > > > doing this?
> > > 
> > > It is weird. SIGABRT sent by the kernel usually means that
> > > execve(2) already destroyed the previous address space of the
> > > process, but the new image cannot be activated, most likely due
> > > to image format error discovered too late, or resource shortage.
> > > 
> > > Could it be that some NFS RPC fails after the patch, but I cannot
> > > imagine why. You would need to track this. Also, verify that the
> > > init binary is correct.
> > > 
> > > I tried amd64 netboot, and it worked fine.
> > 
> > It looks like this change is not the issue, it just changed the
> > symptom enough for me to not realise I was seeing an issue where
> > it would crash the kernel before. I reinstated this change but only
> > allowed the kernel to access half the memory and it booted
> > correctly.
> > 
> > The real issue appears to be related to something in the vm layer
> > not working on ARM boards with too much memory (somewhere between
> > 512MiB and 1GiB).
> 
> Hm, do you have r246926, r246929 and r247046 ?

Yes, I've updated the kernel to r247213.

Andrew
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247278 - head/usr.sbin/bsdconfig/startup

2013-02-25 Thread Devin Teske
Author: dteske
Date: Mon Feb 25 19:14:06 2013
New Revision: 247278
URL: http://svnweb.freebsd.org/changeset/base/247278

Log:
  Fix typo and update copyright.

Modified:
  head/usr.sbin/bsdconfig/startup/rcvar

Modified: head/usr.sbin/bsdconfig/startup/rcvar
==
--- head/usr.sbin/bsdconfig/startup/rcvar   Mon Feb 25 19:09:41 2013
(r247277)
+++ head/usr.sbin/bsdconfig/startup/rcvar   Mon Feb 25 19:14:06 2013
(r247278)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
 # All Rights Reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,7 @@ dialog_menu_main()
" # END-QUOTE
 
if [ ! "$_RCVAR_MAP" ]; then
-   # Genreate RCVAR_MAP of `rcvar dflt script desc ...' per-line
+   # Generate RCVAR_MAP of `rcvar dflt script desc ...' per-line
f_dialog_info "$msg_creating_rcvar_map"
RCVAR_MAP=$( f_startup_rcvar_map )
export RCVAR_MAP
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247279 - head/sys/dev/ciss

2013-02-25 Thread Sean Bruno
Author: sbruno
Date: Mon Feb 25 19:22:56 2013
New Revision: 247279
URL: http://svnweb.freebsd.org/changeset/base/247279

Log:
  The 5300 series ciss(4) board does not work in performant mode with our
  currnet initialization sequence.  Set it to simple mode only so that
  systems can be updated from stable/7 to newer installations.
  
  At some point, we should figure out why we cannot initialize performant
  mode on this board.
  
  PR:   kern/153361
  Reviewed by:  scottl
  Obtained from:Yahoo! Inc.
  MFC after:2 weeks

Modified:
  head/sys/dev/ciss/ciss.c

Modified: head/sys/dev/ciss/ciss.c
==
--- head/sys/dev/ciss/ciss.cMon Feb 25 19:14:06 2013(r247278)
+++ head/sys/dev/ciss/ciss.cMon Feb 25 19:22:56 2013(r247279)
@@ -282,6 +282,7 @@ TUNABLE_INT("hw.ciss.force_interrupt", &
 #define CISS_BOARD_SA5 1
 #define CISS_BOARD_SA5B2
 #define CISS_BOARD_NOMSI   (1<<4)
+#define CISS_BOARD_SIMPLE   (1<<5)
 
 static struct
 {
@@ -290,7 +291,8 @@ static struct
 intflags;
 char   *desc;
 } ciss_vendor_data[] = {
-{ 0x0e11, 0x4070, CISS_BOARD_SA5|CISS_BOARD_NOMSI, "Compaq Smart Array 
5300" },
+{ 0x0e11, 0x4070, CISS_BOARD_SA5|CISS_BOARD_NOMSI|CISS_BOARD_SIMPLE,
+"Compaq Smart Array 
5300" },
 { 0x0e11, 0x4080, CISS_BOARD_SA5B|CISS_BOARD_NOMSI,"Compaq Smart 
Array 5i" },
 { 0x0e11, 0x4082, CISS_BOARD_SA5B|CISS_BOARD_NOMSI,"Compaq Smart 
Array 532" },
 { 0x0e11, 0x4083, CISS_BOARD_SA5B|CISS_BOARD_NOMSI,"HP Smart Array 
5312" },
@@ -682,8 +684,15 @@ ciss_init_pci(struct ciss_softc *sc)
supported_methods = CISS_TRANSPORT_METHOD_PERF;
break;
 default:
-   supported_methods = sc->ciss_cfg->supported_methods;
-   break;
+/*
+ * Override the capabilities of the BOARD and specify SIMPLE
+ * MODE 
+ */
+if (ciss_vendor_data[i].flags & CISS_BOARD_SIMPLE)
+supported_methods = CISS_TRANSPORT_METHOD_SIMPLE;
+else
+supported_methods = sc->ciss_cfg->supported_methods;
+break;
 }
 
 setup:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Konstantin Belousov
On Tue, Feb 26, 2013 at 08:05:42AM +1300, Andrew Turner wrote:
> On Mon, 25 Feb 2013 13:55:00 +0200
> Konstantin Belousov  wrote:
> 
> > On Mon, Feb 25, 2013 at 11:36:03PM +1300, Andrew Turner wrote:
> > > The real issue appears to be related to something in the vm layer
> > > not working on ARM boards with too much memory (somewhere between
> > > 512MiB and 1GiB).
> > 
> > Hm, do you have r246926, r246929 and r247046 ?
> 
> Yes, I've updated the kernel to r247213.

It was more the question if reverting all three of them restores
the proper operation.


pgprNss2sw9Jp.pgp
Description: PGP signature


svn commit: r247280 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share share/media

2013-02-25 Thread Devin Teske
Author: dteske
Date: Mon Feb 25 19:55:32 2013
New Revision: 247280
URL: http://svnweb.freebsd.org/changeset/base/247280

Log:
  Import media selection/preparation framework (sysinstall inspired). Makes
  accessing files from various types of media nice and abstracted away from
  the wet-work involved in preparing, validating, and initializing those
  types of media. This will be used for the package management system module
  and other modules that need access to files and want to allow the user to
  decide where those files come from (either in a scripted fashion, prompted
  fashion, or any combination thereof).
  
  Heavily inspired by sysinstall and even uses the same reserved words so
  that scripts are portable. Coded over months, tested continuously through-
  out, and reviewed several times.
  
  Some notes about the changes:
  - Move network-setting acquisition/validation routines to media/tcpip.subr
  - The options screen from sysinstall has been converted to a dialog menu
  - The "UFS" media choice is renamed to "Directory" to reflect how sysinstall
treats the choice and a new [true] "UFS" media choice has been added that
acts on real UFS partitions (such as external disks with disklabels).
  - Many more help files have been resurrected from sysinstall (I noticed that
some of the content seems a bit dated; I gave them a once-over but they
could really use an update).
  - A total of 10 media choices are presented (via mediaGetType) including:
CD/DVD, FTP, FTP Passive, HTTP Proxy, Directory, NFS, DOS, UFS, Floppy, USB
  - Novel struct/device management layer for managing the issue of passing
more information than can comfortably fit in an argument list.

Added:
  head/usr.sbin/bsdconfig/include/media.hlp   (contents, props changed)
  head/usr.sbin/bsdconfig/include/network_device.hlp   (contents, props changed)
  head/usr.sbin/bsdconfig/include/options.hlp   (contents, props changed)
  head/usr.sbin/bsdconfig/include/tcp.hlp
 - copied unchanged from r245694, 
head/usr.sbin/bsdconfig/networking/include/tcp.hlp
  head/usr.sbin/bsdconfig/share/device.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/
  head/usr.sbin/bsdconfig/share/media/Makefile   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/any.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/cdrom.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/common.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/directory.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/dos.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/floppy.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/ftp.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/httpproxy.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/network.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/nfs.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/options.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/tcpip.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/ufs.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/media/usb.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/struct.subr   (contents, props changed)
Deleted:
  head/usr.sbin/bsdconfig/networking/include/tcp.hlp
Modified:
  head/usr.sbin/bsdconfig/include/Makefile
  head/usr.sbin/bsdconfig/include/messages.subr
  head/usr.sbin/bsdconfig/networking/devices
  head/usr.sbin/bsdconfig/networking/include/Makefile
  head/usr.sbin/bsdconfig/networking/share/common.subr
  head/usr.sbin/bsdconfig/networking/share/device.subr
  head/usr.sbin/bsdconfig/networking/share/hostname.subr
  head/usr.sbin/bsdconfig/networking/share/ipaddr.subr
  head/usr.sbin/bsdconfig/networking/share/netmask.subr
  head/usr.sbin/bsdconfig/networking/share/resolv.subr
  head/usr.sbin/bsdconfig/networking/share/routing.subr
  head/usr.sbin/bsdconfig/share/Makefile
  head/usr.sbin/bsdconfig/share/common.subr
  head/usr.sbin/bsdconfig/share/script.subr
  head/usr.sbin/bsdconfig/share/strings.subr
  head/usr.sbin/bsdconfig/share/variable.subr

Modified: head/usr.sbin/bsdconfig/include/Makefile
==
--- head/usr.sbin/bsdconfig/include/MakefileMon Feb 25 19:22:56 2013
(r247279)
+++ head/usr.sbin/bsdconfig/include/MakefileMon Feb 25 19:55:32 2013
(r247280)
@@ -3,7 +3,8 @@
 NO_OBJ=
 
 FILESDIR=  ${LIBEXECDIR}/bsdconfig/include
-FILES= bsdconfig.hlp messages.subr usage.hlp
+FILES= bsdconfig.hlp media.hlp messages.subr network_device.hlp \
+   options.hlp tcp.hlp usage.hlp
 
 beforeinstall:
mkdir -p ${DESTDIR}${FILESDIR}

Added: head/usr.sbin/bsdconfig/include/media.hlp
===

svn commit: r247281 - in head/sbin: hastctl hastd

2013-02-25 Thread Mikolaj Golub
Author: trociny
Date: Mon Feb 25 20:09:07 2013
New Revision: 247281
URL: http://svnweb.freebsd.org/changeset/base/247281

Log:
  Add i/o error counters to hastd(8) and make hastctl(8) display
  them.  This may be useful for detecting problems with HAST disks.
  
  Discussed with and reviewed by:   pjd
  MFC after:1 week

Modified:
  head/sbin/hastctl/hastctl.c
  head/sbin/hastd/control.c
  head/sbin/hastd/hast.h
  head/sbin/hastd/primary.c
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastctl/hastctl.c
==
--- head/sbin/hastctl/hastctl.c Mon Feb 25 19:55:32 2013(r247280)
+++ head/sbin/hastctl/hastctl.c Mon Feb 25 20:09:07 2013(r247281)
@@ -351,6 +351,12 @@ control_status(struct nv *nv)
(uint64_t)nv_get_uint64(nv, "stat_flush%u", ii));
printf("activemap updates: %ju\n",
(uint64_t)nv_get_uint64(nv, "stat_activemap_update%u", ii));
+   printf("local errors: "
+   "read: %ju, write: %ju, delete: %ju, flush: %ju\n",
+   (uintmax_t)nv_get_uint64(nv, "stat_read_error%u", ii),
+   (uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii),
+   (uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii),
+   (uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii));
}
return (ret);
 }

Modified: head/sbin/hastd/control.c
==
--- head/sbin/hastd/control.c   Mon Feb 25 19:55:32 2013(r247280)
+++ head/sbin/hastd/control.c   Mon Feb 25 20:09:07 2013(r247281)
@@ -207,6 +207,14 @@ control_status_worker(struct hast_resour
"stat_flush%u", no);
nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_activemap_update"),
"stat_activemap_update%u", no);
+   nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_read_error"),
+   "stat_read_error%u", no);
+   nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_write_error"),
+   "stat_write_error%u", no);
+   nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_delete_error"),
+   "stat_delete_error%u", no);
+   nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"),
+   "stat_flush_error%u", no);
 end:
if (cnvin != NULL)
nv_free(cnvin);
@@ -459,6 +467,16 @@ ctrl_thread(void *arg)
nv_add_uint64(nvout, res->hr_stat_flush, "stat_flush");
nv_add_uint64(nvout, res->hr_stat_activemap_update,
"stat_activemap_update");
+   nv_add_uint64(nvout, res->hr_stat_read_error,
+   "stat_read_error");
+   nv_add_uint64(nvout, res->hr_stat_write_error +
+   res->hr_stat_activemap_write_error,
+   "stat_write_error");
+   nv_add_uint64(nvout, res->hr_stat_delete_error,
+   "stat_delete_error");
+   nv_add_uint64(nvout, res->hr_stat_flush_error +
+   res->hr_stat_activemap_flush_error,
+   "stat_flush_error");
nv_add_int16(nvout, 0, "error");
break;
case CONTROL_RELOAD:

Modified: head/sbin/hastd/hast.h
==
--- head/sbin/hastd/hast.h  Mon Feb 25 19:55:32 2013(r247280)
+++ head/sbin/hastd/hast.h  Mon Feb 25 20:09:07 2013(r247281)
@@ -239,6 +239,18 @@ struct hast_resource {
uint64_thr_stat_flush;
/* Number of activemap updates. */
uint64_thr_stat_activemap_update;
+   /* Number of local read errors. */
+   uint64_thr_stat_read_error;
+   /* Number of local write errors. */
+   uint64_thr_stat_write_error;
+   /* Number of local delete errors. */
+   uint64_thr_stat_delete_error;
+   /* Number of flush errors. */
+   uint64_thr_stat_flush_error;
+   /* Number of activemap write errors. */
+   uint64_thr_stat_activemap_write_error;
+   /* Number of activemap flush errors. */
+   uint64_thr_stat_activemap_flush_error;
 
/* Next resource. */
TAILQ_ENTRY(hast_resource) hr_next;

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Mon Feb 25 19:55:32 2013(r247280)
+++ head/sbin/hastd/primary.c   Mon Feb 25 20:09:07 2013(r247281)
@@ -303,6 +303,7 @@ hast_activemap_flush(struct hast_resourc
if (pwrite(res->hr_localfd, buf, size, METADATA_SIZE) !=
(ssize_t)size) {
pjdlog_errno(LOG_ERR, "Unable to flush activemap to disk");
+ 

svn commit: r247282 - head/usr.sbin/bhyve

2013-02-25 Thread Neel Natu
Author: neel
Date: Mon Feb 25 20:31:47 2013
New Revision: 247282
URL: http://svnweb.freebsd.org/changeset/base/247282

Log:
  Get rid of unused struct member.
  
  Pointed out by:   Gopakumar T
  Obtained from:NetApp

Modified:
  head/usr.sbin/bhyve/pci_emul.h

Modified: head/usr.sbin/bhyve/pci_emul.h
==
--- head/usr.sbin/bhyve/pci_emul.h  Mon Feb 25 20:09:07 2013
(r247281)
+++ head/usr.sbin/bhyve/pci_emul.h  Mon Feb 25 20:31:47 2013
(r247282)
@@ -105,7 +105,6 @@ struct pci_devinst {
uint8_t   pi_bus, pi_slot, pi_func;
uint8_t   pi_lintr_pin;
char  pi_name[PI_NAMESZ];
-   uint16_t  pi_iobase;
int   pi_bar_getsize;
 
struct {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247283 - head/sys/kern

2013-02-25 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Feb 25 20:50:08 2013
New Revision: 247283
URL: http://svnweb.freebsd.org/changeset/base/247283

Log:
  After r237012, the fdgrowtable() doesn't drop the filedesc lock anymore,
  so update a stale comment.
  
  Reviewed by:  kib, keramida

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cMon Feb 25 20:31:47 2013
(r247282)
+++ head/sys/kern/kern_descrip.cMon Feb 25 20:50:08 2013
(r247283)
@@ -855,9 +855,7 @@ do_dup(struct thread *td, int flags, int
/*
 * If the caller specified a file descriptor, make sure the file
 * table is large enough to hold it, and grab it.  Otherwise, just
-* allocate a new descriptor the usual way.  Since the filedesc
-* lock may be temporarily dropped in the process, we have to look
-* out for a race.
+* allocate a new descriptor the usual way.
 */
if (flags & DUP_FIXED) {
if (new >= fdp->fd_nfiles) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247284 - head/sys/kern

2013-02-25 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Feb 25 20:51:29 2013
New Revision: 247284
URL: http://svnweb.freebsd.org/changeset/base/247284

Log:
  Style.
  
  Suggested by: kib

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cMon Feb 25 20:50:08 2013
(r247283)
+++ head/sys/kern/kern_descrip.cMon Feb 25 20:51:29 2013
(r247284)
@@ -1425,8 +1425,7 @@ fdgrowtable(struct filedesc *fdp, int nf
 
FILEDESC_XLOCK_ASSERT(fdp);
 
-   KASSERT(fdp->fd_nfiles > 0,
-   ("zero-length file table"));
+   KASSERT(fdp->fd_nfiles > 0, ("zero-length file table"));
 
/* save old values */
onfiles = fdp->fd_nfiles;
@@ -1447,13 +1446,11 @@ fdgrowtable(struct filedesc *fdp, int nf
 * it on the freelist.  We place the struct freetable in the
 * middle so we don't have to worry about padding.
 */
-   ntable = malloc(nnfiles * sizeof(*ntable) +
-   sizeof(struct freetable) +
-   nnfiles * sizeof(*nfileflags),
-   M_FILEDESC, M_ZERO | M_WAITOK);
+   ntable = malloc(nnfiles * sizeof(*ntable) + sizeof(struct freetable) +
+   nnfiles * sizeof(*nfileflags), M_FILEDESC, M_ZERO | M_WAITOK);
nfileflags = (char *)&ntable[nnfiles] + sizeof(struct freetable);
-   nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE,
-   M_FILEDESC, M_ZERO | M_WAITOK);
+   nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
+   M_ZERO | M_WAITOK);
 
/* copy the old data over and point at the new tables */
memcpy(ntable, otable, onfiles * sizeof(*otable));
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Alan Cox

On Feb 25, 2013, at 4:36 AM, Andrew Turner wrote:

> On Mon, 25 Feb 2013 10:50:19 +0200
> Konstantin Belousov  wrote:
> 
>> On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
>>> On Thu, 21 Feb 2013 19:02:50 + (UTC)
>>> John Baldwin  wrote:
>>> 
 Author: jhb
 Date: Thu Feb 21 19:02:50 2013
 New Revision: 247116
 URL: http://svnweb.freebsd.org/changeset/base/247116
 
 Log:
  Further refine the handling of stop signals in the NFS client.
 The changes in r246417 were incomplete as they did not add
 explicit calls to sigdeferstop() around all the places that
 previously passed SBDRY to _sleep().  In addition,
 nfs_getcacheblk() could trigger a write RPC from getblk()
 resulting in sigdeferstop() recursing. Rather than manually
 deferring stop signals in specific places, change the VFS_*() and
 VOP_*() methods to defer stop signals for filesystems which
 request this behavior via a new VFCF_SBDRY flag. Note that this
 has to be a VFC flag rather than a MNTK flag so that it works
 properly with VFS_MOUNT() when the mount is not yet fully
 constructed.  For now, only the NFS clients are set this new flag
 in VFS_SET(). A few other related changes:
  - Add an assertion to ensure that TDF_SBDRY doesn't leak to
 userland.
  - When a lookup request uses VOP_READLINK() to follow a symlink,
 mark the request as being on behalf of the thread performing the
 lookup (cnp_thread) rather than using a NULL thread pointer.  This
 causes NFS to properly handle signals during this VOP on an
 interruptible mount.
 
  PR:   kern/176179
  Reported by:  Russell Cattelan (sigdeferstop() recursion)
  Reviewed by:  kib
  MFC after:1 month
>>> 
>>> This change is causing init to crash for me on armv6. I'm
>>> netbooting a PandaBoard and it appears init is receiving a SIGABRT
>>> before it gets into main().
>>> 
>>> Do you have any idea where I could look to track down why it is
>>> doing this?
>> 
>> It is weird. SIGABRT sent by the kernel usually means that execve(2)
>> already destroyed the previous address space of the process, but the
>> new image cannot be activated, most likely due to image format error
>> discovered too late, or resource shortage.
>> 
>> Could it be that some NFS RPC fails after the patch, but I cannot
>> imagine why. You would need to track this. Also, verify that the init
>> binary is correct.
>> 
>> I tried amd64 netboot, and it worked fine.
> 
> It looks like this change is not the issue, it just changed the
> symptom enough for me to not realise I was seeing an issue where
> it would crash the kernel before. I reinstated this change but only
> allowed the kernel to access half the memory and it booted correctly.
> 
> The real issue appears to be related to something in the vm layer not
> working on ARM boards with too much memory (somewhere between 512MiB
> and 1GiB).


The recently introduced auto-sizing and cap may be too optimistic.  In fact, 
they are greater
than what we allow on 32-bit x86 and 32-bit MIPS.  Try the following.

Index: arm/include/vmparam.h
===
--- arm/include/vmparam.h   (revision 247249)
+++ arm/include/vmparam.h   (working copy)
@@ -142,15 +142,15 @@
 #define VM_KMEM_SIZE   (12*1024*1024)
 #endif
 #ifndef VM_KMEM_SIZE_SCALE
-#define VM_KMEM_SIZE_SCALE (2)
+#define VM_KMEM_SIZE_SCALE (3)
 #endif
 
 /*
- * Ceiling on the size of the kmem submap: 60% of the kernel map.
+ * Ceiling on the size of the kmem submap: 40% of the kernel map.
  */
 #ifndef VM_KMEM_SIZE_MAX
 #defineVM_KMEM_SIZE_MAX((vm_max_kernel_address - \
-VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5)
+VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
 #endif
 
 #define MAXTSIZ(16*1024*1024)


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247285 - head

2013-02-25 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Feb 25 22:25:56 2013
New Revision: 247285
URL: http://svnweb.freebsd.org/changeset/base/247285

Log:
  In all situations where we need to bootstrap yacc, we also need to
  bootstrap liby.  This was not readily apparent, because a normal 'make
  buildworld' or 'make toolchain' builds liby before building anything
  that uses yacc.  However, 'make kernel-toolchain' does not build
  headers or libraries, so it was not possible to build a kernel from
  head on, say, stable/9 without first building the complete toolchain.
  
  MFC after:1 week

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Feb 25 20:51:29 2013(r247284)
+++ head/Makefile.inc1  Mon Feb 25 22:25:56 2013(r247285)
@@ -1132,7 +1132,8 @@ _lex= usr.bin/lex
 .endif
 
 .if ${BOOTSTRAPPING} < 113
-_yacc= usr.bin/yacc
+_yacc= lib/liby \
+   usr.bin/yacc
 .endif
 
 .if ${BOOTSTRAPPING} < 126
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247286 - in head/sys/dev/ath: . ath_hal ath_hal/ar5210 ath_hal/ar5211 ath_hal/ar5212 ath_hal/ar5416

2013-02-25 Thread Adrian Chadd
Author: adrian
Date: Mon Feb 25 22:42:43 2013
New Revision: 247286
URL: http://svnweb.freebsd.org/changeset/base/247286

Log:
  Begin adding support to explicitly set the current chainmask.
  
  Right now the only way to set the chainmask is to set the hardware
  configured chainmask through capabilities.  This is fine for forcing
  the chainmask to be something other than what the hardware is capable
  of (eg to reduce TX/RX to one connected antenna) but it does change what
  the HAL hardware chainmask configuration is.
  
  For operational mode changes, it (may?) make sense to separately control
  the TX/RX chainmask.
  
  Right now it's done as part of ar5416_reset.c - ar5416UpdateChainMasks()
  calculates which TX/RX chainmasks to enable based on the operating mode.
  (1 for legacy and whatever is supported for 11n operation.)  But doing
  this in the HAL is suboptimal - the driver needs to know the currently
  configured chainmask in order to correctly enable things for each
  TX descriptor.  This is currently done by overriding the chainmask
  config in the ar5416 TX routines but this has to disappear - the AR9300
  HAL support requires the driver to dynamically set the TX chainmask based
  on the TX power and TX rate in order to meet mini-PCIe slot power
  requirements.
  
  So:
  
  * Introduce a new HAL method to set the operational chainmask variables;
  * Introduce null methods for the previous generation chipsets;
  * Add new driver state to record the current chainmask separate from
the hardware configured chainmask.
  
  Part #2 of this will involve disabling ar5416UpdateChainMasks() and moving
  it into the driver; as well as properly programming the TX chainmask
  based on the currently configured HAL chainmask.
  
  Tested:
  
  * AR5416, STA mode - both legacy (11a/11bg) and 11n rates - verified
that AR_SELFGEN_MASK (the chainmask used for self-generated frames like
ACKs and RTSes) is correct, as well as the TX descriptor contents is
correct.

Modified:
  head/sys/dev/ath/ath_hal/ah.h
  head/sys/dev/ath/ath_hal/ar5210/ar5210.h
  head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
  head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c
  head/sys/dev/ath/ath_hal/ar5211/ar5211.h
  head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c
  head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  head/sys/dev/ath/if_athvar.h

Modified: head/sys/dev/ath/ath_hal/ah.h
==
--- head/sys/dev/ath/ath_hal/ah.h   Mon Feb 25 22:25:56 2013
(r247285)
+++ head/sys/dev/ath/ath_hal/ah.h   Mon Feb 25 22:42:43 2013
(r247286)
@@ -1437,6 +1437,8 @@ struct ath_hal {
HAL_STATUS  __ahdecl(*ah_setQuiet)(struct ath_hal *ah, uint32_t 
period,
uint32_t duration, uint32_t nextStart,
HAL_QUIET_FLAG flag);
+   void  __ahdecl(*ah_setChainMasks)(struct ath_hal *,
+   uint32_t, uint32_t);
 
/* DFS functions */
void  __ahdecl(*ah_enableDfs)(struct ath_hal *ah,

Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h
==
--- head/sys/dev/ath/ath_hal/ar5210/ar5210.hMon Feb 25 22:25:56 2013
(r247285)
+++ head/sys/dev/ath/ath_hal/ar5210/ar5210.hMon Feb 25 22:42:43 2013
(r247286)
@@ -259,6 +259,7 @@ extern  HAL_BOOL ar5210GetDiagState(struc
 extern uint32_t ar5210Get11nExtBusy(struct ath_hal *);
 extern HAL_BOOL ar5210GetMibCycleCounts(struct ath_hal *,
HAL_SURVEY_SAMPLE *);
+extern void ar5210SetChainMasks(struct ath_hal *, uint32_t, uint32_t);
 extern void ar5210EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *);
 extern void ar5210GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *);
 extern void ar5210UpdateDiagReg(struct ath_hal *ah, uint32_t val);

Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
==
--- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Mon Feb 25 22:25:56 
2013(r247285)
+++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Mon Feb 25 22:42:43 
2013(r247286)
@@ -137,6 +137,7 @@ static const struct ath_hal_private ar52
.ah_setCoverageClass= ar5210SetCoverageClass,
.ah_get11nExtBusy   = ar5210Get11nExtBusy,
.ah_getMibCycleCounts   = ar5210GetMibCycleCounts,
+   .ah_setChainMasks   = ar5210SetChainMasks,
.ah_enableDfs   = ar5210EnableDfs,
.ah_getDfsThresh= ar5210GetDfsThresh,
/* XXX pro

svn commit: r247287 - in head/sys/dev/ath: . ath_hal/ar5416

2013-02-25 Thread Adrian Chadd
Author: adrian
Date: Mon Feb 25 22:45:02 2013
New Revision: 247287
URL: http://svnweb.freebsd.org/changeset/base/247287

Log:
  Part #2 of the TX chainmask changes:
  
  * Remove ar5416UpdateChainmasks();
  * Remove the TX chainmask override code from the ar5416 TX descriptor
setup routines;
  * Write a driver method to calculate the current chainmask based on the
operating mode and update the driver state;
  * Call the HAL chainmask method before calling ath_hal_reset();
  * Use the currently configured chainmask in the TX descriptors rather than
the hardware TX chainmasks.
  
  Tested:
  
  * AR5416, STA/AP mode - legacy and 11n modes

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_ath_tx_ht.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c  Mon Feb 25 22:42:43 
2013(r247286)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c  Mon Feb 25 22:45:02 
2013(r247287)
@@ -44,7 +44,6 @@ static void ar5416InitBB(struct ath_hal 
 static void ar5416InitIMR(struct ath_hal *ah, HAL_OPMODE opmode);
 static void ar5416InitQoS(struct ath_hal *ah);
 static void ar5416InitUserSettings(struct ath_hal *ah);
-static void ar5416UpdateChainMasks(struct ath_hal *ah, HAL_BOOL is_ht);
 static void ar5416OverrideIni(struct ath_hal *ah, const struct 
ieee80211_channel *);
 
 #if 0
@@ -210,11 +209,6 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
__func__, OS_REG_READ(ah,AR_PHY_ADC_CTL));  
 
/*
-* Setup ah_tx_chainmask / ah_rx_chainmask before we fiddle
-* with enabling the TX/RX radio chains.
-*/
-   ar5416UpdateChainMasks(ah, IEEE80211_IS_CHAN_HT(chan));
-   /*
 * This routine swaps the analog chains - it should be done
 * before any radio register twiddling is done.
 */
@@ -1464,31 +1458,6 @@ ar5416RestoreChainMask(struct ath_hal *a
}
 }
 
-/*
- * Update the chainmask based on the current channel configuration.
- *
- * XXX ath9k checks bluetooth co-existence here
- * XXX ath9k checks whether the current state is "off-channel".
- * XXX ath9k sticks the hardware into 1x1 mode for legacy;
- * we're going to leave multi-RX on for multi-path cancellation.
- */
-static void
-ar5416UpdateChainMasks(struct ath_hal *ah, HAL_BOOL is_ht)
-{
-   struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
-   HAL_CAPABILITIES *pCap = &ahpriv->ah_caps;
-
-   if (is_ht) {
-   AH5416(ah)->ah_tx_chainmask = pCap->halTxChainMask;
-   } else {
-   AH5416(ah)->ah_tx_chainmask = 1;
-   }
-   AH5416(ah)->ah_rx_chainmask = pCap->halRxChainMask;
-   HALDEBUG(ah, HAL_DEBUG_RESET, "TX chainmask: 0x%x; RX chainmask: 
0x%x\n",
-   AH5416(ah)->ah_tx_chainmask,
-   AH5416(ah)->ah_rx_chainmask);
-}
-
 void
 ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan)
 {

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c   Mon Feb 25 22:42:43 
2013(r247286)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c   Mon Feb 25 22:45:02 
2013(r247287)
@@ -701,20 +701,6 @@ ar5416Set11nRateScenario(struct ath_hal 
(void)nseries;
 
/*
-* XXX since the upper layers doesn't know the current chainmask
-* XXX setup, just override its decisions here.
-* XXX The upper layers need to be taught this!
-*/
-   if (series[0].Tries != 0)
-   series[0].ChSel = AH5416(ah)->ah_tx_chainmask;
-   if (series[1].Tries != 0)
-   series[1].ChSel = AH5416(ah)->ah_tx_chainmask;
-   if (series[2].Tries != 0)
-   series[2].ChSel = AH5416(ah)->ah_tx_chainmask;
-   if (series[3].Tries != 0)
-   series[3].ChSel = AH5416(ah)->ah_tx_chainmask;
-
-   /*
 * Only one of RTS and CTS enable must be set.
 * If a frame has both set, just do RTS protection -
 * that's enough to satisfy legacy protection.

Modified: head/sys/dev/ath/if_ath.c
==
--- head/sys/dev/ath/if_ath.c   Mon Feb 25 22:42:43 2013(r247286)
+++ head/sys/dev/ath/if_ath.c   Mon Feb 25 22:45:02 2013(r247287)
@@ -1476,6 +1476,26 @@ ath_reset_keycache(struct ath_softc *sc)
ieee80211_crypto_reload_keys(ic);
 }
 
+/*
+ * Fetch the current chainmask configuration based on the current
+ * operating channel and options.
+ */
+static void
+ath_update_chainmasks(struct ath_softc *sc, struct ieee80211_channel *chan)
+{
+
+   /*
+* Set TX chainmask to the currently configured chainmask;
+* the TX chainmask 

Re: svn commit: r247274 - in head: bin/test tools/regression/bin/test

2013-02-25 Thread Jilles Tjoelker
On Mon, Feb 25, 2013 at 07:05:41PM +, Peter Jeremy wrote:
> Author: peterj
> Date: Mon Feb 25 19:05:40 2013
> New Revision: 247274
> URL: http://svnweb.freebsd.org/changeset/base/247274

> Log:
>   Enhance test(1) by adding provision to compare any combination of the
>   access, birth, change and modify times of two files, instead of only
>   being able to compare modify times.  The builtin test in sh(1) will
>   automagically acquire the same expansion.

>   Approved by:grog
>   MFC after:  2 weeks

What do you need this for? If it is not needed very often, this test can
be done more portably (older FreeBSD and GNU) as
  [ -n "$(find -L FILE1 -prune -newerXY FILE2 2>/dev/null)" ]
(If FILE1 is certainly not a directory, -prune can be omitted; if FILE1
is certainly not a symlink or should not be followed, -L can be omitted;
the 2>/dev/null silences error messages about nonexistent files that
test(1) does not generate.)

I have generally been rather reluctant in adding things to sh(1) and
even more so if they are completely new. Someone proposed something
rather similar (except that it added a time string parser -- even more
code) in PR bin/57054 and I rejected it in 2009.

The -ef, -nt and -ot primaries are not in POSIX but they should remain
anyway. They have existed for years and are (almost) compatible to
features in most other shells. (Sadly, it was noticed rather late that
pdksh's -nt and -ot give results not matching real ksh for nonexistent
files.)

> Modified:
>   head/bin/test/test.1
>   head/bin/test/test.c
>   head/tools/regression/bin/test/regress.sh

> [snip]
> Modified: head/tools/regression/bin/test/regress.sh
> ==
> --- head/tools/regression/bin/test/regress.sh Mon Feb 25 18:07:20 2013
> (r247273)
> +++ head/tools/regression/bin/test/regress.sh Mon Feb 25 19:05:40 2013
> (r247274)
> @@ -52,7 +52,7 @@ t ()
> [snip]
> +a=/tmp/test$$.1
> +b=/tmp/test$$.2

Please use mktemp(1). Using $$ for temporary files is insecure on
multiuser systems.

> +trap "rm -f $a $b" EXIT
> +
> +# Tests 131-164
> +s 1 1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1 $a 
> $b
> +
> +touch $a
> +# Tests 165-198
> +s 1 1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1 $a 
> $b
> +
> +sleep 2# Ensure $b is newer than $a
> +touch $b

Please use touch -t instead of sleeping. I'm impatient while running
tests :)

> +# Tests 199-232
> +s 1 1 1 1 1 1 1 1 1  1 1 1 1 1 1 1 1  0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 $a 
> $b
> +
> +sleep 2
> +echo >$b   # Updates mtime & ctime

You can probably do this with touch -m -t.

> +sleep 2
> +touch -A 01 -a $b
> +
> +# $b now has ctime > mtime > atime > btime
> +# Tests 233-266
> +s 1 1 0 1 1 1 1 1 1  0 0 1 0 0 0 1 1  1 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 1 $b $b

The ctime cannot be manipulated explicitly but the other times can be
set in the future so both relations with the ctime can be tested.

The touch -a is indeed required because file reads do not set the atime
if the filesystem is mounted noatime.

-- 
Jilles Tjoelker
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247291 - in head/sys/dev/cxgbe: . common firmware

2013-02-25 Thread Navdeep Parhar
Author: np
Date: Tue Feb 26 00:27:27 2013
New Revision: 247291
URL: http://svnweb.freebsd.org/changeset/base/247291

Log:
  cxgbe(4): Ask the card's firmware to pad up tiny CPLs by encapsulating
  them in a firmware message if it is able to do so.  This works out
  better for one of the FIFOs in the chip.
  
  MFC after:5 days

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/common/t4_msg.h
  head/sys/dev/cxgbe/firmware/t4fw_interface.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hTue Feb 26 00:18:50 2013
(r247290)
+++ head/sys/dev/cxgbe/adapter.hTue Feb 26 00:27:27 2013
(r247291)
@@ -600,7 +600,7 @@ struct adapter {
struct callout sfl_callout;
 
an_handler_t an_handler __aligned(CACHE_LINE_SIZE);
-   fw_msg_handler_t fw_msg_handler[4]; /* NUM_FW6_TYPES */
+   fw_msg_handler_t fw_msg_handler[5]; /* NUM_FW6_TYPES */
cpl_handler_t cpl_handler[0xef];/* NUM_CPL_CMDS */
 
 #ifdef INVARIANTS

Modified: head/sys/dev/cxgbe/common/t4_msg.h
==
--- head/sys/dev/cxgbe/common/t4_msg.h  Tue Feb 26 00:18:50 2013
(r247290)
+++ head/sys/dev/cxgbe/common/t4_msg.h  Tue Feb 26 00:27:27 2013
(r247291)
@@ -2224,6 +2224,15 @@ struct cpl_sge_egr_update {
 #define V_EGR_QID(x) ((x) << S_EGR_QID)
 #define G_EGR_QID(x) (((x) >> S_EGR_QID) & M_EGR_QID)
 
+/* cpl_fw*.type values */
+enum {
+   FW_TYPE_CMD_RPL = 0,
+   FW_TYPE_WR_RPL = 1,
+   FW_TYPE_CQE = 2,
+   FW_TYPE_OFLD_CONNECTION_WR_RPL = 3,
+   FW_TYPE_RSSCPL = 4,
+};
+
 struct cpl_fw2_pld {
RSS_HDR
u8 opcode;
@@ -2292,10 +2301,11 @@ struct cpl_fw6_msg {
 
 /* cpl_fw6_msg.type values */
 enum {
-   FW6_TYPE_CMD_RPL = 0,
-   FW6_TYPE_WR_RPL = 1,
-   FW6_TYPE_CQE = 2,
-   FW6_TYPE_OFLD_CONNECTION_WR_RPL = 3,
+   FW6_TYPE_CMD_RPL= FW_TYPE_CMD_RPL,
+   FW6_TYPE_WR_RPL = FW_TYPE_WR_RPL,
+   FW6_TYPE_CQE= FW_TYPE_CQE,
+   FW6_TYPE_OFLD_CONNECTION_WR_RPL = FW_TYPE_OFLD_CONNECTION_WR_RPL,
+   FW6_TYPE_RSSCPL = FW_TYPE_RSSCPL,
 
NUM_FW6_TYPES
 };

Modified: head/sys/dev/cxgbe/firmware/t4fw_interface.h
==
--- head/sys/dev/cxgbe/firmware/t4fw_interface.hTue Feb 26 00:18:50 
2013(r247290)
+++ head/sys/dev/cxgbe/firmware/t4fw_interface.hTue Feb 26 00:27:27 
2013(r247291)
@@ -3534,7 +3534,7 @@ enum fw_params_param_pfvf {
FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_END = 0x2E,
FW_PARAMS_PARAM_PFVF_ETHOFLD_START = 0x2F,
FW_PARAMS_PARAM_PFVF_ETHOFLD_END = 0x30,
-   FW_PARAMS_PARAM_PFVF_CPLFW4MSG_CPLSGEEGRUPDATE = 0x31
+   FW_PARAMS_PARAM_PFVF_CPLFW4MSG_ENCAP = 0x31
 };
 
 /*

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cTue Feb 26 00:18:50 2013
(r247290)
+++ head/sys/dev/cxgbe/t4_main.cTue Feb 26 00:27:27 2013
(r247291)
@@ -281,6 +281,7 @@ static int upload_config_file(struct ada
 static int partition_resources(struct adapter *, const struct firmware *);
 static int get_params__pre_init(struct adapter *);
 static int get_params__post_init(struct adapter *);
+static int set_params__post_init(struct adapter *);
 static void t4_set_desc(struct adapter *);
 static void build_medialist(struct port_info *);
 static int update_mac_settings(struct port_info *, int);
@@ -519,6 +520,10 @@ t4_attach(device_t dev)
if (rc != 0)
goto done; /* error message displayed already */
 
+   rc = set_params__post_init(sc);
+   if (rc != 0)
+   goto done; /* error message displayed already */
+
if (sc->flags & MASTER_PF) {
uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE);
 
@@ -1991,6 +1996,33 @@ get_params__post_init(struct adapter *sc
return (rc);
 }
 
+static int
+set_params__post_init(struct adapter *sc)
+{
+   uint32_t param, val;
+   int rc;
+
+   param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP);
+   rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val);
+   if (rc == 0) {
+   /* ask for encapsulated CPLs */
+   param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP);
+   val = 1;
+   rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val);
+   if (rc != 0) {
+   device_printf(sc->dev,
+   "failed to set parameter (post_init): %d.\n", rc);
+   return (rc);
+   }
+   } else if (rc != FW_EINVAL) {
+   device_printf(sc->dev,
+   "failed 

svn commit: r247296 - in head: contrib/expat contrib/expat/doc contrib/expat/examples contrib/expat/lib contrib/expat/tests contrib/expat/tests/benchmark contrib/expat/xmlwf lib/libexpat

2013-02-25 Thread Xin LI
Author: delphij
Date: Tue Feb 26 00:58:44 2013
New Revision: 247296
URL: http://svnweb.freebsd.org/changeset/base/247296

Log:
  Update base system libexpat to 2.1.0.
  
  MFC after:3 days

Added:
  head/contrib/expat/FREEBSD-Xlist
 - copied unchanged from r247293, vendor/expat/dist/FREEBSD-Xlist
Deleted:
  head/contrib/expat/FREEBSD-upgrade
  head/contrib/expat/configure
  head/contrib/expat/doc/valid-xhtml10.png
  head/contrib/expat/lib/winconfig.h
  head/contrib/expat/tests/benchmark/benchmark.dsp
  head/contrib/expat/tests/benchmark/benchmark.dsw
Modified:
  head/contrib/expat/Changes   (contents, props changed)
  head/contrib/expat/MANIFEST   (contents, props changed)
  head/contrib/expat/Makefile.in   (contents, props changed)
  head/contrib/expat/README   (contents, props changed)
  head/contrib/expat/configure.in   (contents, props changed)
  head/contrib/expat/doc/reference.html   (contents, props changed)
  head/contrib/expat/doc/xmlwf.sgml   (contents, props changed)
  head/contrib/expat/expat_config.h.in   (contents, props changed)
  head/contrib/expat/lib/expat.h   (contents, props changed)
  head/contrib/expat/lib/xmlparse.c   (contents, props changed)
  head/contrib/expat/lib/xmlrole.c   (contents, props changed)
  head/contrib/expat/lib/xmltok.c   (contents, props changed)
  head/contrib/expat/lib/xmltok_impl.c   (contents, props changed)
  head/contrib/expat/tests/README.txt   (contents, props changed)
  head/contrib/expat/tests/minicheck.h
  head/contrib/expat/tests/runtests.c   (contents, props changed)
  head/contrib/expat/tests/xmltest.sh   (contents, props changed)
  head/contrib/expat/xmlwf/readfilemap.c   (contents, props changed)
  head/contrib/expat/xmlwf/xmlwf.c   (contents, props changed)
  head/lib/libexpat/expat_config.h
  head/lib/libexpat/libbsdxml.3
Directory Properties:
  head/contrib/expat/   (props changed)
  head/contrib/expat/COPYING   (props changed)
  head/contrib/expat/doc/style.css   (props changed)
  head/contrib/expat/doc/xmlwf.1   (props changed)
  head/contrib/expat/examples/elements.c   (props changed)
  head/contrib/expat/examples/outline.c   (props changed)
  head/contrib/expat/lib/ascii.h   (props changed)
  head/contrib/expat/lib/asciitab.h   (props changed)
  head/contrib/expat/lib/iasciitab.h   (props changed)
  head/contrib/expat/lib/internal.h   (props changed)
  head/contrib/expat/lib/latin1tab.h   (props changed)
  head/contrib/expat/lib/nametab.h   (props changed)
  head/contrib/expat/lib/utf8tab.h   (props changed)
  head/contrib/expat/lib/xmlrole.h   (props changed)
  head/contrib/expat/lib/xmltok.h   (props changed)
  head/contrib/expat/lib/xmltok_impl.h   (props changed)
  head/contrib/expat/lib/xmltok_ns.c   (props changed)
  head/contrib/expat/tests/chardata.c   (props changed)
  head/contrib/expat/tests/chardata.h   (props changed)
  head/contrib/expat/xmlwf/codepage.c   (props changed)
  head/contrib/expat/xmlwf/codepage.h   (props changed)
  head/contrib/expat/xmlwf/ct.c   (props changed)
  head/contrib/expat/xmlwf/filemap.h   (props changed)
  head/contrib/expat/xmlwf/unixfilemap.c   (props changed)
  head/contrib/expat/xmlwf/win32filemap.c   (props changed)
  head/contrib/expat/xmlwf/xmlfile.c   (props changed)
  head/contrib/expat/xmlwf/xmlfile.h   (props changed)
  head/contrib/expat/xmlwf/xmlmime.c   (props changed)
  head/contrib/expat/xmlwf/xmlmime.h   (props changed)
  head/contrib/expat/xmlwf/xmltchar.h   (props changed)
  head/contrib/expat/xmlwf/xmlurl.h   (props changed)
  head/contrib/expat/xmlwf/xmlwin32url.cxx   (props changed)

Modified: head/contrib/expat/Changes
==
--- head/contrib/expat/Changes  Tue Feb 26 00:58:03 2013(r247295)
+++ head/contrib/expat/Changes  Tue Feb 26 00:58:44 2013(r247296)
@@ -1,5 +1,41 @@
+Release 2.1.0 Sat March 24 2012
+- Bug Fixes:
+  #1742315: Harmful XML_ParserCreateNS suggestion.
+  #2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
+  #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
+  #1983953, 2517952, 2517962, 2649838: 
+Build modifications using autoreconf instead of buildconf.sh.
+  #2815947, #2884086: OBJEXT and EXEEXT support while building.
+  #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
+  #2517938: xmlwf should return non-zero exit status if not 
well-formed.
+  #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
+  #2855609: Dangling positionPtr after error.
+  #2894085: CVE-2009-3560 - Buffer over-read and crash in 
big2_toUtf8().
+  #2958794: CVE-2012-1148 - Memory leak in poolGrow.
+  #2990652: CMake support.
+  #3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
+  #3206497: Unitialized memory returned from XML_Parse.
+  #3287849: make check fails on mingw-w64.

svn commit: r247297 - in head/sys: arm/at91 arm/sa11x0 fs/fuse kern mips/adm5120 mips/alchemy mips/beri mips/cavium mips/gxemul mips/idt mips/malta mips/rt305x mips/sentry5 mips/sibyte powerpc/aim ...

2013-02-25 Thread Attilio Rao
Author: attilio
Date: Tue Feb 26 01:00:11 2013
New Revision: 247297
URL: http://svnweb.freebsd.org/changeset/base/247297

Log:
  Merge from vmobj-rwlock branch:
  Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h.
  
  Sponsored by: EMC / Isilon storage division
  Tested by:pho
  Reviewed by:  alc

Modified:
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/sa11x0/assabet_machdep.c
  head/sys/fs/fuse/fuse_io.c
  head/sys/kern/sys_process.c
  head/sys/mips/adm5120/adm5120_machdep.c
  head/sys/mips/alchemy/alchemy_machdep.c
  head/sys/mips/beri/beri_machdep.c
  head/sys/mips/cavium/octeon_machdep.c
  head/sys/mips/gxemul/gxemul_machdep.c
  head/sys/mips/idt/idt_machdep.c
  head/sys/mips/malta/malta_machdep.c
  head/sys/mips/rt305x/rt305x_machdep.c
  head/sys/mips/sentry5/s5_machdep.c
  head/sys/mips/sibyte/sb_machdep.c
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/aim/mmu_oea64.c
  head/sys/powerpc/aim/moea64_native.c
  head/sys/powerpc/ps3/mmu_ps3.c
  head/sys/sparc64/sparc64/tsb.c

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cTue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/arm/at91/at91_machdep.cTue Feb 26 01:00:11 2013
(r247297)
@@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/arm/sa11x0/assabet_machdep.c
==
--- head/sys/arm/sa11x0/assabet_machdep.c   Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/arm/sa11x0/assabet_machdep.c   Tue Feb 26 01:00:11 2013
(r247297)
@@ -79,7 +79,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/fs/fuse/fuse_io.c
==
--- head/sys/fs/fuse/fuse_io.c  Tue Feb 26 00:58:44 2013(r247296)
+++ head/sys/fs/fuse/fuse_io.c  Tue Feb 26 01:00:11 2013(r247297)
@@ -87,8 +87,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 
 #include "fuse.h"

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Tue Feb 26 00:58:44 2013(r247296)
+++ head/sys/kern/sys_process.c Tue Feb 26 01:00:11 2013(r247297)
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #ifdef COMPAT_FREEBSD32

Modified: head/sys/mips/adm5120/adm5120_machdep.c
==
--- head/sys/mips/adm5120/adm5120_machdep.c Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/mips/adm5120/adm5120_machdep.c Tue Feb 26 01:00:11 2013
(r247297)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Modified: head/sys/mips/alchemy/alchemy_machdep.c
==
--- head/sys/mips/alchemy/alchemy_machdep.c Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/mips/alchemy/alchemy_machdep.c Tue Feb 26 01:00:11 2013
(r247297)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Modified: head/sys/mips/beri/beri_machdep.c
==
--- head/sys/mips/beri/beri_machdep.c   Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/mips/beri/beri_machdep.c   Tue Feb 26 01:00:11 2013
(r247297)
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Modified: head/sys/mips/cavium/octeon_machdep.c
==
--- head/sys/mips/cavium/octeon_machdep.c   Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/mips/cavium/octeon_machdep.c   Tue Feb 26 01:00:11 2013
(r247297)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Modified: head/sys/mips/gxemul/gxemul_machdep.c
==
--- head/sys/mips/gxemul/gxemul_machdep.c   Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/mips/gxemul/gxemul_machdep.c   Tue Feb 26 01:00:11 2013
(r247297)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Modified: head/sys/mips/idt/idt_machdep.c
==
--- head/sys/mips/idt/idt_machdep.c Tue Feb 26 00:58:44 2013
(r247296)
+++ head/sys/mips/idt/idt_machdep.c Tue Feb 26 01:00:11 2013
(r24729

svn commit: r247300 - in head: sys/sys usr.bin/truss

2013-02-25 Thread Xin LI
Author: delphij
Date: Tue Feb 26 02:13:02 2013
New Revision: 247300
URL: http://svnweb.freebsd.org/changeset/base/247300

Log:
  Expose timespec and timeval macros when __BSD_VISIBLE is defined.  This
  allows userland application to use the following macros:
  
timespecclear, timespecisset, timespeccmp, timespecadd,
timespecsub;
  
timevalclear, timevalisset, timevalcmp.
  
  MFC after:1 month

Modified:
  head/sys/sys/time.h
  head/usr.bin/truss/main.c
  head/usr.bin/truss/syscalls.c
  head/usr.bin/truss/truss.h

Modified: head/sys/sys/time.h
==
--- head/sys/sys/time.h Tue Feb 26 01:38:12 2013(r247299)
+++ head/sys/sys/time.h Tue Feb 26 02:13:02 2013(r247300)
@@ -156,9 +156,6 @@ timeval2bintime(const struct timeval *tv
/* 18446744073709 = int(2^64 / 100) */
bt->frac = tv->tv_usec * (uint64_t)18446744073709LL;
 }
-#endif /* __BSD_VISIBLE */
-
-#ifdef _KERNEL
 
 /* Operations on timespecs */
 #definetimespecclear(tvp)  ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
@@ -197,7 +194,7 @@ timeval2bintime(const struct timeval *tv
 
 /* timevaladd and timevalsub are not inlined */
 
-#endif /* _KERNEL */
+#endif /* __BSD_VISIBLE */
 
 #ifndef _KERNEL/* NetBSD/OpenBSD compatible interfaces 
*/
 

Modified: head/usr.bin/truss/main.c
==
--- head/usr.bin/truss/main.c   Tue Feb 26 01:38:12 2013(r247299)
+++ head/usr.bin/truss/main.c   Tue Feb 26 02:13:02 2013(r247300)
@@ -323,14 +323,14 @@ START_TRACE:
fprintf(trussinfo->outfile, "%5d: ",
trussinfo->pid);
if (trussinfo->flags & ABSOLUTETIMESTAMPS) {
-   timespecsubt(&trussinfo->curthread->after,
+   timespecsubt_to(&trussinfo->curthread->after,
&trussinfo->start_time, &timediff);
fprintf(trussinfo->outfile, "%ld.%09ld ",
(long)timediff.tv_sec,
timediff.tv_nsec);
}
if (trussinfo->flags & RELATIVETIMESTAMPS) {
-   timespecsubt(&trussinfo->curthread->after,
+   timespecsubt_to(&trussinfo->curthread->after,
&trussinfo->curthread->before, &timediff);
fprintf(trussinfo->outfile, "%ld.%09ld ",
(long)timediff.tv_sec,
@@ -349,14 +349,14 @@ START_TRACE:
fprintf(trussinfo->outfile, "%5d: ",
trussinfo->pid);
if (trussinfo->flags & ABSOLUTETIMESTAMPS) {
-   timespecsubt(&trussinfo->curthread->after,
+   timespecsubt_to(&trussinfo->curthread->after,
&trussinfo->start_time, &timediff);
fprintf(trussinfo->outfile, "%ld.%09ld ",
(long)timediff.tv_sec,
timediff.tv_nsec);
}
if (trussinfo->flags & RELATIVETIMESTAMPS) {
-   timespecsubt(&trussinfo->curthread->after,
+   timespecsubt_to(&trussinfo->curthread->after,
&trussinfo->curthread->before, &timediff);
fprintf(trussinfo->outfile, "%ld.%09ld ",
(long)timediff.tv_sec, timediff.tv_nsec);

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Tue Feb 26 01:38:12 2013
(r247299)
+++ head/usr.bin/truss/syscalls.c   Tue Feb 26 02:13:02 2013
(r247300)
@@ -1126,14 +1126,14 @@ print_syscall(struct trussinfo *trussinf
}
 
if (trussinfo->flags & ABSOLUTETIMESTAMPS) {
-   timespecsubt(&trussinfo->curthread->after,
+   timespecsubt_to(&trussinfo->curthread->after,
&trussinfo->start_time, &timediff);
len += fprintf(trussinfo->outfile, "%ld.%09ld ",
(long)timediff.tv_sec, timediff.tv_nsec);
}
 
if (trussinfo->flags & RELATIVETIMESTAMPS) {
-   timespecsubt(&trussinfo->curthread->after,
+   timespecsubt_to(&trussinfo->curthread->after,
&trussinfo->curthread->before, &timediff);
len += fprintf(trussinfo->outfile, "%ld.%09ld ",
(long)timediff.tv_sec, timediff.tv_nsec);
@@ -1165,9 +1165,9 @@ print_syscall_ret(struct t

svn commit: r247301 - head/sys/boot/common

2013-02-25 Thread Ian Lepore
Author: ian
Date: Tue Feb 26 03:24:45 2013
New Revision: 247301
URL: http://svnweb.freebsd.org/changeset/base/247301

Log:
  Adjust the arm kernel entry point address properly regardless of whether the
  e_entry field holds a physical or a virtual address.  Add a comment block
  that explains the assumptions being made by the adjustment code.

Modified:
  head/sys/boot/common/load_elf.c

Modified: head/sys/boot/common/load_elf.c
==
--- head/sys/boot/common/load_elf.c Tue Feb 26 02:13:02 2013
(r247300)
+++ head/sys/boot/common/load_elf.c Tue Feb 26 03:24:45 2013
(r247301)
@@ -290,14 +290,25 @@ __elfN(loadimage)(struct preloaded_file 
} else
off = 0;
 #elif defined(__arm__)
-   if (off & 0xf000u) {
-   off = -(off & 0xf000u);
-   ehdr->e_entry += off;
+   /*
+* The elf headers in some kernels specify virtual addresses in all
+* header fields.  More recently, the e_entry and p_paddr fields are the
+* proper physical addresses.  Even when the p_paddr fields are correct,
+* the MI code below uses the p_vaddr fields with an offset added for
+* loading (doing so is arguably wrong).  To make loading work, we need
+* an offset that represents the difference between physical and virtual
+* addressing.  ARM kernels are always linked at 0xC000.  Depending
+* on the headers, the offset value passed in may be physical or virtual
+* (because it typically comes from e_entry), but we always replace
+* whatever is passed in with the va<->pa offset.  On the other hand, we
+* only adjust the entry point if it's a virtual address to begin with.
+*/
+   off = -0xc000u;
+   if ((ehdr->e_entry & 0xc000u) == 0xc00u)
+   ehdr->e_entry += off;
 #ifdef ELF_VERBOSE
-   printf("Converted entry 0x%08x\n", ehdr->e_entry);
+   printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, off);
 #endif
-   } else
-   off = 0;
 #else
off = 0;/* other archs use direct mapped kernels */
 #endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247304 - head/sys/arm/conf

2013-02-25 Thread Tim Kientzle
Author: kientzle
Date: Tue Feb 26 04:59:02 2013
New Revision: 247304
URL: http://svnweb.freebsd.org/changeset/base/247304

Log:
  RPi users might want to touch the boot partition, which is always FAT
  formatted on this board, so compile-in MSDOSFS.
  
  Comment out the compiled-in FDT and explain why.

Modified:
  head/sys/arm/conf/RPI-B

Modified: head/sys/arm/conf/RPI-B
==
--- head/sys/arm/conf/RPI-B Tue Feb 26 03:46:35 2013(r247303)
+++ head/sys/arm/conf/RPI-B Tue Feb 26 04:59:02 2013(r247304)
@@ -42,6 +42,7 @@ options   FFS #Berkeley Fast 
Filesystem
 optionsSOFTUPDATES #Enable FFS soft updates support
 optionsUFS_ACL #Support for access control lists
 optionsUFS_DIRHASH #Improve performance on big directories
+optionsMSDOSFS #MSDOS Filesystem
 device snp
 
 optionsNFSCL   #Network Filesystem Client
@@ -113,5 +114,7 @@ device  smsc
 
 # Flattened Device Tree
 options FDT
-options FDT_DTB_STATIC
-makeoptions FDT_DTS_FILE=bcm2835-rpi-b.dts
+# Note:  DTB is normally loaded and modified by RPi boot loader, then
+# handed to kernel via U-Boot and ubldr.
+#options FDT_DTB_STATIC
+#makeoptions FDT_DTS_FILE=bcm2835-rpi-b.dts
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247312 - head/sys/fs/fuse

2013-02-25 Thread Alan Cox
Author: alc
Date: Tue Feb 26 07:00:24 2013
New Revision: 247312
URL: http://svnweb.freebsd.org/changeset/base/247312

Log:
  Eliminate a duplicate #include.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/fs/fuse/fuse_io.c

Modified: head/sys/fs/fuse/fuse_io.c
==
--- head/sys/fs/fuse/fuse_io.c  Tue Feb 26 06:38:00 2013(r247311)
+++ head/sys/fs/fuse/fuse_io.c  Tue Feb 26 07:00:24 2013(r247312)
@@ -87,7 +87,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include "fuse.h"
 #include "fuse_file.h"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Andrew Turner
On Mon, 25 Feb 2013 15:00:41 -0600
Alan Cox  wrote:

> 
> On Feb 25, 2013, at 4:36 AM, Andrew Turner wrote:
> 
> > On Mon, 25 Feb 2013 10:50:19 +0200
> > Konstantin Belousov  wrote:
> > 
> >> On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
> >>> On Thu, 21 Feb 2013 19:02:50 + (UTC)
> >>> John Baldwin  wrote:
> >>> 
>  Author: jhb
>  Date: Thu Feb 21 19:02:50 2013
>  New Revision: 247116
>  URL: http://svnweb.freebsd.org/changeset/base/247116
>  
>  Log:
>   Further refine the handling of stop signals in the NFS client.
>  The changes in r246417 were incomplete as they did not add
>  explicit calls to sigdeferstop() around all the places that
>  previously passed SBDRY to _sleep().  In addition,
>  nfs_getcacheblk() could trigger a write RPC from getblk()
>  resulting in sigdeferstop() recursing. Rather than manually
>  deferring stop signals in specific places, change the VFS_*() and
>  VOP_*() methods to defer stop signals for filesystems which
>  request this behavior via a new VFCF_SBDRY flag. Note that this
>  has to be a VFC flag rather than a MNTK flag so that it works
>  properly with VFS_MOUNT() when the mount is not yet fully
>  constructed.  For now, only the NFS clients are set this new flag
>  in VFS_SET(). A few other related changes:
>   - Add an assertion to ensure that TDF_SBDRY doesn't leak to
>  userland.
>   - When a lookup request uses VOP_READLINK() to follow a symlink,
>  mark the request as being on behalf of the thread performing the
>  lookup (cnp_thread) rather than using a NULL thread pointer.
>  This causes NFS to properly handle signals during this VOP on an
>  interruptible mount.
>  
>   PR: kern/176179
>   Reported by:Russell Cattelan (sigdeferstop() recursion)
>   Reviewed by:kib
>   MFC after:  1 month
> >>> 
> >>> This change is causing init to crash for me on armv6. I'm
> >>> netbooting a PandaBoard and it appears init is receiving a SIGABRT
> >>> before it gets into main().
> >>> 
> >>> Do you have any idea where I could look to track down why it is
> >>> doing this?
> >> 
> >> It is weird. SIGABRT sent by the kernel usually means that
> >> execve(2) already destroyed the previous address space of the
> >> process, but the new image cannot be activated, most likely due to
> >> image format error discovered too late, or resource shortage.
> >> 
> >> Could it be that some NFS RPC fails after the patch, but I cannot
> >> imagine why. You would need to track this. Also, verify that the
> >> init binary is correct.
> >> 
> >> I tried amd64 netboot, and it worked fine.
> > 
> > It looks like this change is not the issue, it just changed the
> > symptom enough for me to not realise I was seeing an issue where
> > it would crash the kernel before. I reinstated this change but only
> > allowed the kernel to access half the memory and it booted
> > correctly.
> > 
> > The real issue appears to be related to something in the vm layer
> > not working on ARM boards with too much memory (somewhere between
> > 512MiB and 1GiB).
> 
> 
> The recently introduced auto-sizing and cap may be too optimistic.
> In fact, they are greater than what we allow on 32-bit x86 and 32-bit
> MIPS.  Try the following.
> 
> Index: arm/include/vmparam.h
> ===
> --- arm/include/vmparam.h (revision 247249)
> +++ arm/include/vmparam.h (working copy)
> @@ -142,15 +142,15 @@
>  #define VM_KMEM_SIZE (12*1024*1024)
>  #endif
>  #ifndef VM_KMEM_SIZE_SCALE
> -#define VM_KMEM_SIZE_SCALE   (2)
> +#define VM_KMEM_SIZE_SCALE   (3)
>  #endif
>  
>  /*
> - * Ceiling on the size of the kmem submap: 60% of the kernel map.
> + * Ceiling on the size of the kmem submap: 40% of the kernel map.
>   */
>  #ifndef VM_KMEM_SIZE_MAX
>  #define  VM_KMEM_SIZE_MAX((vm_max_kernel_address - \
> -VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5)
> +VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
>  #endif
>  
>  #define MAXTSIZ  (16*1024*1024)
> 
This patch fixes the boot for me. Is it likely we will see similar
issues with boards with more memory with this? I know of ARM boards
with 2GiB of ram, and I would expect to see some with more soon.

Andrew
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r247313 - in head/sys/arm: at91 sa11x0

2013-02-25 Thread Alan Cox
Author: alc
Date: Tue Feb 26 07:41:34 2013
New Revision: 247313
URL: http://svnweb.freebsd.org/changeset/base/247313

Log:
  Eliminate a redundant #include: machine/pmap.h is already included
  through vm/pmap.h.

Modified:
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/sa11x0/assabet_machdep.c

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cTue Feb 26 07:00:24 2013
(r247312)
+++ head/sys/arm/at91/at91_machdep.cTue Feb 26 07:41:34 2013
(r247313)
@@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/arm/sa11x0/assabet_machdep.c
==
--- head/sys/arm/sa11x0/assabet_machdep.c   Tue Feb 26 07:00:24 2013
(r247312)
+++ head/sys/arm/sa11x0/assabet_machdep.c   Tue Feb 26 07:41:34 2013
(r247313)
@@ -80,7 +80,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r247116 - in head/sys: fs/nfs fs/nfsclient kern nfsclient sys tools

2013-02-25 Thread Alan Cox
On 02/26/2013 01:27, Andrew Turner wrote:
> On Mon, 25 Feb 2013 15:00:41 -0600
> Alan Cox  wrote:
>
>> On Feb 25, 2013, at 4:36 AM, Andrew Turner wrote:
>>
>>> On Mon, 25 Feb 2013 10:50:19 +0200
>>> Konstantin Belousov  wrote:
>>>
 On Mon, Feb 25, 2013 at 08:13:13PM +1300, Andrew Turner wrote:
> On Thu, 21 Feb 2013 19:02:50 + (UTC)
> John Baldwin  wrote:
>
>> Author: jhb
>> Date: Thu Feb 21 19:02:50 2013
>> New Revision: 247116
>> URL: http://svnweb.freebsd.org/changeset/base/247116
>>
>> Log:
>>  Further refine the handling of stop signals in the NFS client.
>> The changes in r246417 were incomplete as they did not add
>> explicit calls to sigdeferstop() around all the places that
>> previously passed SBDRY to _sleep().  In addition,
>> nfs_getcacheblk() could trigger a write RPC from getblk()
>> resulting in sigdeferstop() recursing. Rather than manually
>> deferring stop signals in specific places, change the VFS_*() and
>> VOP_*() methods to defer stop signals for filesystems which
>> request this behavior via a new VFCF_SBDRY flag. Note that this
>> has to be a VFC flag rather than a MNTK flag so that it works
>> properly with VFS_MOUNT() when the mount is not yet fully
>> constructed.  For now, only the NFS clients are set this new flag
>> in VFS_SET(). A few other related changes:
>>  - Add an assertion to ensure that TDF_SBDRY doesn't leak to
>> userland.
>>  - When a lookup request uses VOP_READLINK() to follow a symlink,
>> mark the request as being on behalf of the thread performing the
>> lookup (cnp_thread) rather than using a NULL thread pointer.
>> This causes NFS to properly handle signals during this VOP on an
>> interruptible mount.
>>
>>  PR: kern/176179
>>  Reported by:Russell Cattelan (sigdeferstop() recursion)
>>  Reviewed by:kib
>>  MFC after:  1 month
> This change is causing init to crash for me on armv6. I'm
> netbooting a PandaBoard and it appears init is receiving a SIGABRT
> before it gets into main().
>
> Do you have any idea where I could look to track down why it is
> doing this?
 It is weird. SIGABRT sent by the kernel usually means that
 execve(2) already destroyed the previous address space of the
 process, but the new image cannot be activated, most likely due to
 image format error discovered too late, or resource shortage.

 Could it be that some NFS RPC fails after the patch, but I cannot
 imagine why. You would need to track this. Also, verify that the
 init binary is correct.

 I tried amd64 netboot, and it worked fine.
>>> It looks like this change is not the issue, it just changed the
>>> symptom enough for me to not realise I was seeing an issue where
>>> it would crash the kernel before. I reinstated this change but only
>>> allowed the kernel to access half the memory and it booted
>>> correctly.
>>>
>>> The real issue appears to be related to something in the vm layer
>>> not working on ARM boards with too much memory (somewhere between
>>> 512MiB and 1GiB).
>>
>> The recently introduced auto-sizing and cap may be too optimistic.
>> In fact, they are greater than what we allow on 32-bit x86 and 32-bit
>> MIPS.  Try the following.
>>
>> Index: arm/include/vmparam.h
>> ===
>> --- arm/include/vmparam.h(revision 247249)
>> +++ arm/include/vmparam.h(working copy)
>> @@ -142,15 +142,15 @@
>>  #define VM_KMEM_SIZE(12*1024*1024)
>>  #endif
>>  #ifndef VM_KMEM_SIZE_SCALE
>> -#define VM_KMEM_SIZE_SCALE  (2)
>> +#define VM_KMEM_SIZE_SCALE  (3)
>>  #endif
>>  
>>  /*
>> - * Ceiling on the size of the kmem submap: 60% of the kernel map.
>> + * Ceiling on the size of the kmem submap: 40% of the kernel map.
>>   */
>>  #ifndef VM_KMEM_SIZE_MAX
>>  #define VM_KMEM_SIZE_MAX((vm_max_kernel_address - \
>> -VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5)
>> +VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
>>  #endif
>>  
>>  #define MAXTSIZ (16*1024*1024)
>>
> This patch fixes the boot for me. Is it likely we will see similar
> issues with boards with more memory with this? I know of ARM boards
> with 2GiB of ram, and I would expect to see some with more soon.
>

The kmem submap should be fine, but other things might become a problem.

What do "sysctl -x vm.min_kernel_address" and "sysctl -x
vm.max_kernel_address" report on your machine?

Alan

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"