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

2012-12-23 Thread Hans Petter Selasky
Author: hselasky
Date: Sun Dec 23 10:21:01 2012
New Revision: 244607
URL: http://svnweb.freebsd.org/changeset/base/244607

Log:
  Fix regression issue after r244503.
  
  MFC after:1 week

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

Modified: head/sys/dev/usb/usb_msctest.c
==
--- head/sys/dev/usb/usb_msctest.c  Sun Dec 23 00:03:28 2012
(r244606)
+++ head/sys/dev/usb/usb_msctest.c  Sun Dec 23 10:21:01 2012
(r244607)
@@ -83,7 +83,7 @@ enum {
DIR_NONE,
 };
 
-#defineSCSI_MAX_LEN0x100
+#defineSCSI_MAX_LENMAX(0x100, BULK_SIZE)
 #defineSCSI_INQ_LEN0x24
 #defineSCSI_SENSE_LEN  0xFF
 
@@ -150,6 +150,7 @@ struct bbb_transfer {
usb_size_t data_rem;/* bytes */
usb_timeout_t data_timeout; /* ms */
usb_frlength_t actlen;  /* bytes */
+   usb_frlength_t buffer_size; /* bytes */
 
uint8_t cmd_len;/* bytes */
uint8_t dir;
@@ -192,7 +193,7 @@ static const struct usb_config bbb_confi
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
-   .bufsize = MAX(SCSI_MAX_LEN, BULK_SIZE),
+   .bufsize = SCSI_MAX_LEN,
.flags = {.proxy_buffer = 1,.short_xfer_ok = 1,},
.callback = &bbb_data_read_callback,
.timeout = 4 * USB_MS_HZ,   /* 4 seconds */
@@ -211,7 +212,7 @@ static const struct usb_config bbb_confi
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
-   .bufsize = BULK_SIZE,
+   .bufsize = SCSI_MAX_LEN,
.flags = {.ext_buffer = 1,.proxy_buffer = 1,},
.callback = &bbb_data_write_callback,
.timeout = 4 * USB_MS_HZ,   /* 4 seconds */
@@ -553,6 +554,8 @@ bbb_attach(struct usb_device *udev, uint
/* store pointer to DMA buffers */
sc->buffer = usbd_xfer_get_frame_buffer(
sc->xfer[ST_DATA_RD], 0);
+   sc->buffer_size =
+   usbd_xfer_max_len(sc->xfer[ST_DATA_RD]);
sc->cbw = usbd_xfer_get_frame_buffer(
sc->xfer[ST_COMMAND], 0);
sc->csw = usbd_xfer_get_frame_buffer(
@@ -833,8 +836,8 @@ usb_msc_eject(struct usb_device *udev, u
 * TCTMobile needs DIR_IN flag. To get it, we
 * supply a dummy data with the command.
 */
-   err = bbb_command_start(sc, DIR_IN, 0, &sc->buffer,
-   sizeof(sc->buffer), &scsi_tct_eject,
+   err = bbb_command_start(sc, DIR_IN, 0, sc->buffer,
+   sc->buffer_size, &scsi_tct_eject,
sizeof(scsi_tct_eject), USB_MS_HZ);
break;
default:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244608 - head/usr.sbin/pkg

2012-12-23 Thread Matthew Seaman
Author: matthew (ports committer)
Date: Sun Dec 23 11:22:18 2012
New Revision: 244608
URL: http://svnweb.freebsd.org/changeset/base/244608

Log:
  Third time's the charm.  pkg -N output needs to go to stderr.
  
  Approved by:  bapt
  MFC after:2 weeks

Modified:
  head/usr.sbin/pkg/pkg.c

Modified: head/usr.sbin/pkg/pkg.c
==
--- head/usr.sbin/pkg/pkg.c Sun Dec 23 10:21:01 2012(r244607)
+++ head/usr.sbin/pkg/pkg.c Sun Dec 23 11:22:18 2012(r244608)
@@ -457,10 +457,8 @@ main(__unused int argc, char *argv[])
 * a system is configured to use pkg, don't bootstrap pkg
 * when that argument is given as argv[1].
 */
-   if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0) {
-   printf("%s", "pkg is not installed\n");
-   exit(EXIT_FAILURE);
-   }
+   if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0)
+   errx(EXIT_FAILURE, "pkg is not installed\n");
 
/*
 * Do not ask for confirmation if either of stdin or stdout is
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244609 - stable/9/sys/kern

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 11:52:33 2012
New Revision: 244609
URL: http://svnweb.freebsd.org/changeset/base/244609

Log:
  MFC r243272,243499: assert_vop_locked should treat LK_EXCLOTHER as the
  not locked case

Modified:
  stable/9/sys/kern/vfs_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/vfs_subr.c
==
--- stable/9/sys/kern/vfs_subr.cSun Dec 23 11:22:18 2012
(r244608)
+++ stable/9/sys/kern/vfs_subr.cSun Dec 23 11:52:33 2012
(r244609)
@@ -3970,9 +3970,13 @@ assert_vi_unlocked(struct vnode *vp, con
 void
 assert_vop_locked(struct vnode *vp, const char *str)
 {
+   int locked;
 
-   if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0)
-   vfs_badlock("is not locked but should be", str, vp);
+   if (!IGNORE_LOCK(vp)) {
+   locked = VOP_ISLOCKED(vp);
+   if (locked == 0 || locked == LK_EXCLOTHER)
+   vfs_badlock("is not locked but should be", str, vp);
+   }
 }
 
 void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244610 - stable/8/sys/kern

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 11:52:46 2012
New Revision: 244610
URL: http://svnweb.freebsd.org/changeset/base/244610

Log:
  MFC r243272,243499: assert_vop_locked should treat LK_EXCLOTHER as the
  not locked case

Modified:
  stable/8/sys/kern/vfs_subr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/kern/   (props changed)

Modified: stable/8/sys/kern/vfs_subr.c
==
--- stable/8/sys/kern/vfs_subr.cSun Dec 23 11:52:33 2012
(r244609)
+++ stable/8/sys/kern/vfs_subr.cSun Dec 23 11:52:46 2012
(r244610)
@@ -3832,9 +3832,13 @@ assert_vi_unlocked(struct vnode *vp, con
 void
 assert_vop_locked(struct vnode *vp, const char *str)
 {
+   int locked;
 
-   if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0)
-   vfs_badlock("is not locked but should be", str, vp);
+   if (!IGNORE_LOCK(vp)) {
+   locked = VOP_ISLOCKED(vp);
+   if (locked == 0 || locked == LK_EXCLOTHER)
+   vfs_badlock("is not locked but should be", str, vp);
+   }
 }
 
 void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244611 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 11:56:08 2012
New Revision: 244611
URL: http://svnweb.freebsd.org/changeset/base/244611

Log:
  MFC r243497: zfs: create devices/geoms from zvols after receiveing them
  
  PR:   kern/167066

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Dec 
23 11:52:46 2012(r244610)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Dec 
23 11:56:08 2012(r244611)
@@ -3817,6 +3817,12 @@ zfs_ioc_recv(zfs_cmd_t *zc)
error = 1;
}
 #endif
+
+#ifdef __FreeBSD__
+   if (error == 0)
+   zvol_create_minors(tofs);
+#endif
+
/*
 * On error, restore the original props.
 */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244612 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 11:56:28 2012
New Revision: 244612
URL: http://svnweb.freebsd.org/changeset/base/244612

Log:
  MFC r243497: zfs: create devices/geoms from zvols after receiveing them
  
  PR:   kern/167066

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Dec 
23 11:56:08 2012(r244611)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Dec 
23 11:56:28 2012(r244612)
@@ -3817,6 +3817,12 @@ zfs_ioc_recv(zfs_cmd_t *zc)
error = 1;
}
 #endif
+
+#ifdef __FreeBSD__
+   if (error == 0)
+   zvol_create_minors(tofs);
+#endif
+
/*
 * On error, restore the original props.
 */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244613 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 11:58:08 2012
New Revision: 244613
URL: http://svnweb.freebsd.org/changeset/base/244613

Log:
  MFC r243519: zfs_fhtovp: there is no reason to amend lock flags with
  LK_RETRY here

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 11:56:28 2012(r244612)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 11:58:08 2012(r244613)
@@ -2136,7 +2136,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int
VN_HOLD(*vpp);
}
ZFS_EXIT(zfsvfs);
-   err = zfs_vnode_lock(*vpp, flags | LK_RETRY);
+   err = zfs_vnode_lock(*vpp, flags);
if (err != 0)
*vpp = NULL;
return (err);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244614 - stable/9/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:06:00 2012
New Revision: 244614
URL: http://svnweb.freebsd.org/changeset/base/244614

Log:
  MFC r243760: acpi_cpu: change cpu_disable_idle to be a per-cpu flag

Modified:
  stable/9/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/acpica/acpi_cpu.c
==
--- stable/9/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 11:58:08 2012
(r244613)
+++ stable/9/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:06:00 2012
(r244614)
@@ -90,6 +90,7 @@ struct acpi_cpu_softc {
 struct sysctl_oid  *cpu_sysctl_tree;
 int cpu_cx_lowest;
 int cpu_cx_lowest_lim;
+int cpu_disable_idle; /* Disable entry to idle 
function */
 charcpu_cx_supported[64];
 int cpu_rid;
 };
@@ -137,9 +138,6 @@ static uint32_t  cpu_smi_cmd;   /* Value 
 static uint8_t  cpu_cst_cnt;   /* Indicate we are _CST aware. */
 static int  cpu_quirks;/* Indicate any hardware bugs. */
 
-/* Runtime state. */
-static int  cpu_disable_idle; /* Disable entry to idle function */
-
 /* Values for sysctl. */
 static struct sysctl_ctx_list cpu_sysctl_ctx;
 static struct sysctl_oid *cpu_sysctl_tree;
@@ -418,6 +416,39 @@ acpi_cpu_postattach(void *unused __unuse
 SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE,
 acpi_cpu_postattach, NULL);
 
+static void
+disable_idle(struct acpi_cpu_softc *sc)
+{
+cpuset_t cpuset;
+
+CPU_SETOF(sc->cpu_pcpu->pc_cpuid, &cpuset);
+sc->cpu_disable_idle = TRUE;
+
+/*
+ * Ensure that the CPU is not in idle state or in acpi_cpu_idle().
+ * Note that this code depends on the fact that the rendezvous IPI
+ * can not penetrate context where interrupts are disabled and 
acpi_cpu_idle
+ * is called and executed in such a context with interrupts being 
re-enabled
+ * right before return.
+ */
+smp_rendezvous_cpus(cpuset, smp_no_rendevous_barrier, NULL,
+   smp_no_rendevous_barrier, NULL);
+}
+
+static void
+enable_idle(struct acpi_cpu_softc *sc)
+{
+
+sc->cpu_disable_idle = FALSE;
+}
+
+static int
+is_idle_disabled(struct acpi_cpu_softc *sc)
+{
+
+return (sc->cpu_disable_idle);
+}
+
 /*
  * Disable any entry to the idle function during suspend and re-enable it
  * during resume.
@@ -430,7 +461,7 @@ acpi_cpu_suspend(device_t dev)
 error = bus_generic_suspend(dev);
 if (error)
return (error);
-cpu_disable_idle = TRUE;
+disable_idle(device_get_softc(dev));
 return (0);
 }
 
@@ -438,7 +469,7 @@ static int
 acpi_cpu_resume(device_t dev)
 {
 
-cpu_disable_idle = FALSE;
+enable_idle(device_get_softc(dev));
 return (bus_generic_resume(dev));
 }
 
@@ -572,12 +603,14 @@ acpi_cpu_shutdown(device_t dev)
 bus_generic_shutdown(dev);
 
 /*
- * Disable any entry to the idle function.  There is a small race where
- * an idle thread have passed this check but not gone to sleep.  This
- * is ok since device_shutdown() does not free the softc, otherwise
- * we'd have to be sure all threads were evicted before returning.
+ * Disable any entry to the idle function.
+ */
+disable_idle(device_get_softc(dev));
+
+/*
+ * CPU devices are not truely detached and remain referenced,
+ * so their resources are not freed.
  */
-cpu_disable_idle = TRUE;
 
 return_VALUE (0);
 }
@@ -860,7 +893,10 @@ acpi_cpu_startup(void *arg)
 
 /* Take over idling from cpu_idle_default(). */
 cpu_cx_lowest_lim = 0;
-cpu_disable_idle = FALSE;
+for (i = 0; i < cpu_ndevices; i++) {
+   sc = device_get_softc(cpu_devices[i]);
+   enable_idle(sc);
+}
 cpu_idle_hook = acpi_cpu_idle;
 }
 
@@ -926,12 +962,6 @@ acpi_cpu_idle()
 uint32_t   start_time, end_time;
 intbm_active, cx_next_idx, i;
 
-/* If disabled, return immediately. */
-if (cpu_disable_idle) {
-   ACPI_ENABLE_IRQS();
-   return;
-}
-
 /*
  * Look up our CPU id to get our softc.  If it's NULL, we'll use C1
  * since there is no ACPI processor object for this CPU.  This occurs
@@ -943,6 +973,12 @@ acpi_cpu_idle()
return;
 }
 
+/* If disabled, return immediately. */
+if (is_idle_disabled(sc)) {
+   ACPI_ENABLE_IRQS();
+   return;
+}
+
 /* Find the lowest state that has small enough latency. */
 cx_next_idx = 0;
 if (cpu_disable_deep_sleep)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244615 - stable/8/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:06:12 2012
New Revision: 244615
URL: http://svnweb.freebsd.org/changeset/base/244615

Log:
  MFC r243760: acpi_cpu: change cpu_disable_idle to be a per-cpu flag

Modified:
  stable/8/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/acpica/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi_cpu.c
==
--- stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:06:00 2012
(r244614)
+++ stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:06:12 2012
(r244615)
@@ -87,6 +87,7 @@ struct acpi_cpu_softc {
 struct sysctl_oid  *cpu_sysctl_tree;
 int cpu_cx_lowest;
 int cpu_cx_lowest_lim;
+int cpu_disable_idle; /* Disable entry to idle 
function */
 charcpu_cx_supported[64];
 int cpu_rid;
 };
@@ -134,9 +135,6 @@ static uint32_t  cpu_smi_cmd;   /* Value 
 static uint8_t  cpu_cst_cnt;   /* Indicate we are _CST aware. */
 static int  cpu_quirks;/* Indicate any hardware bugs. */
 
-/* Runtime state. */
-static int  cpu_disable_idle; /* Disable entry to idle function */
-
 /* Values for sysctl. */
 static struct sysctl_ctx_list cpu_sysctl_ctx;
 static struct sysctl_oid *cpu_sysctl_tree;
@@ -415,6 +413,39 @@ acpi_cpu_postattach(void *unused __unuse
 SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE,
 acpi_cpu_postattach, NULL);
 
+static void
+disable_idle(struct acpi_cpu_softc *sc)
+{
+cpuset_t cpuset;
+
+CPU_SETOF(sc->cpu_pcpu->pc_cpuid, &cpuset);
+sc->cpu_disable_idle = TRUE;
+
+/*
+ * Ensure that the CPU is not in idle state or in acpi_cpu_idle().
+ * Note that this code depends on the fact that the rendezvous IPI
+ * can not penetrate context where interrupts are disabled and 
acpi_cpu_idle
+ * is called and executed in such a context with interrupts being 
re-enabled
+ * right before return.
+ */
+smp_rendezvous_cpus(cpuset, smp_no_rendevous_barrier, NULL,
+   smp_no_rendevous_barrier, NULL);
+}
+
+static void
+enable_idle(struct acpi_cpu_softc *sc)
+{
+
+sc->cpu_disable_idle = FALSE;
+}
+
+static int
+is_idle_disabled(struct acpi_cpu_softc *sc)
+{
+
+return (sc->cpu_disable_idle);
+}
+
 /*
  * Disable any entry to the idle function during suspend and re-enable it
  * during resume.
@@ -427,7 +458,7 @@ acpi_cpu_suspend(device_t dev)
 error = bus_generic_suspend(dev);
 if (error)
return (error);
-cpu_disable_idle = TRUE;
+disable_idle(device_get_softc(dev));
 return (0);
 }
 
@@ -435,7 +466,7 @@ static int
 acpi_cpu_resume(device_t dev)
 {
 
-cpu_disable_idle = FALSE;
+enable_idle(device_get_softc(dev));
 return (bus_generic_resume(dev));
 }
 
@@ -561,12 +592,14 @@ acpi_cpu_shutdown(device_t dev)
 bus_generic_shutdown(dev);
 
 /*
- * Disable any entry to the idle function.  There is a small race where
- * an idle thread have passed this check but not gone to sleep.  This
- * is ok since device_shutdown() does not free the softc, otherwise
- * we'd have to be sure all threads were evicted before returning.
+ * Disable any entry to the idle function.
+ */
+disable_idle(device_get_softc(dev));
+
+/*
+ * CPU devices are not truely detached and remain referenced,
+ * so their resources are not freed.
  */
-cpu_disable_idle = TRUE;
 
 return_VALUE (0);
 }
@@ -847,7 +880,10 @@ acpi_cpu_startup(void *arg)
 
 /* Take over idling from cpu_idle_default(). */
 cpu_cx_lowest_lim = 0;
-cpu_disable_idle = FALSE;
+for (i = 0; i < cpu_ndevices; i++) {
+   sc = device_get_softc(cpu_devices[i]);
+   enable_idle(sc);
+}
 cpu_idle_hook = acpi_cpu_idle;
 }
 
@@ -917,12 +953,6 @@ acpi_cpu_idle()
 uint32_t   start_time, end_time;
 intbm_active, cx_next_idx, i;
 
-/* If disabled, return immediately. */
-if (cpu_disable_idle) {
-   ACPI_ENABLE_IRQS();
-   return;
-}
-
 /*
  * Look up our CPU id to get our softc.  If it's NULL, we'll use C1
  * since there is no ACPI processor object for this CPU.  This occurs
@@ -934,6 +964,12 @@ acpi_cpu_idle()
return;
 }
 
+/* If disabled, return immediately. */
+if (is_idle_disabled(sc)) {
+   ACPI_ENABLE_IRQS();
+   return;
+}
+
 /* Find the lowest state that has small enough latency. */
 cx_next_idx = 0;
 for (i = sc->cpu_cx_lowest; i >= 0; i--) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244616 - stable/9/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:07:42 2012
New Revision: 244616
URL: http://svnweb.freebsd.org/changeset/base/244616

Log:
  MFC r243761: acpi_cpu_notify: disable acpi_cpu_idle while updating
  C-state data

Modified:
  stable/9/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/acpica/acpi_cpu.c
==
--- stable/9/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:06:12 2012
(r244615)
+++ stable/9/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:07:42 2012
(r244616)
@@ -973,9 +973,9 @@ acpi_cpu_idle()
return;
 }
 
-/* If disabled, return immediately. */
+/* If disabled, take the safe path. */
 if (is_idle_disabled(sc)) {
-   ACPI_ENABLE_IRQS();
+   acpi_cpu_c1();
return;
 }
 
@@ -1081,23 +1081,31 @@ acpi_cpu_idle()
 
 /*
  * Re-evaluate the _CST object when we are notified that it changed.
- *
- * XXX Re-evaluation disabled until locking is done.
  */
 static void
 acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context)
 {
 struct acpi_cpu_softc *sc = (struct acpi_cpu_softc *)context;
-
+
 if (notify != ACPI_NOTIFY_CX_STATES)
return;
 
+/*
+ * C-state data for target CPU is going to be in flux while we execute
+ * acpi_cpu_cx_cst, so disable entering acpi_cpu_idle.
+ * Also, it may happen that multiple ACPI taskqueues may concurrently
+ * execute notifications for the same CPU.  ACPI_SERIAL is used to
+ * protect against that.
+ */
+ACPI_SERIAL_BEGIN(cpu);
+disable_idle(sc);
+
 /* Update the list of Cx states. */
 acpi_cpu_cx_cst(sc);
 acpi_cpu_cx_list(sc);
-
-ACPI_SERIAL_BEGIN(cpu);
 acpi_cpu_set_cx_lowest(sc);
+
+enable_idle(sc);
 ACPI_SERIAL_END(cpu);
 
 acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244617 - stable/8/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:07:52 2012
New Revision: 244617
URL: http://svnweb.freebsd.org/changeset/base/244617

Log:
  MFC r243761: acpi_cpu_notify: disable acpi_cpu_idle while updating
  C-state data

Modified:
  stable/8/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/acpica/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi_cpu.c
==
--- stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:07:42 2012
(r244616)
+++ stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:07:52 2012
(r244617)
@@ -964,9 +964,9 @@ acpi_cpu_idle()
return;
 }
 
-/* If disabled, return immediately. */
+/* If disabled, take the safe path. */
 if (is_idle_disabled(sc)) {
-   ACPI_ENABLE_IRQS();
+   acpi_cpu_c1();
return;
 }
 
@@ -1067,23 +1067,31 @@ acpi_cpu_idle()
 
 /*
  * Re-evaluate the _CST object when we are notified that it changed.
- *
- * XXX Re-evaluation disabled until locking is done.
  */
 static void
 acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context)
 {
 struct acpi_cpu_softc *sc = (struct acpi_cpu_softc *)context;
-
+
 if (notify != ACPI_NOTIFY_CX_STATES)
return;
 
+/*
+ * C-state data for target CPU is going to be in flux while we execute
+ * acpi_cpu_cx_cst, so disable entering acpi_cpu_idle.
+ * Also, it may happen that multiple ACPI taskqueues may concurrently
+ * execute notifications for the same CPU.  ACPI_SERIAL is used to
+ * protect against that.
+ */
+ACPI_SERIAL_BEGIN(cpu);
+disable_idle(sc);
+
 /* Update the list of Cx states. */
 acpi_cpu_cx_cst(sc);
 acpi_cpu_cx_list(sc);
-
-ACPI_SERIAL_BEGIN(cpu);
 acpi_cpu_set_cx_lowest(sc);
+
+enable_idle(sc);
 ACPI_SERIAL_END(cpu);
 
 acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244618 - stable/9/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:09:41 2012
New Revision: 244618
URL: http://svnweb.freebsd.org/changeset/base/244618

Log:
  MFC r243404: acpi_cpu: use fixed resource ids for cx state i/o resources

Modified:
  stable/9/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/acpica/acpi_cpu.c
==
--- stable/9/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:07:52 2012
(r244617)
+++ stable/9/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:09:41 2012
(r244618)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -68,6 +69,7 @@ struct acpi_cx {
 uint32_ttrans_lat; /* Transition latency (usec). */
 uint32_tpower; /* Power consumed (mW). */
 int res_type;  /* Resource type for p_lvlx. */
+int res_rid;   /* Resource ID for p_lvlx. */
 };
 #define MAX_CX_STATES   8
 
@@ -92,7 +94,6 @@ struct acpi_cpu_softc {
 int cpu_cx_lowest_lim;
 int cpu_disable_idle; /* Disable entry to idle 
function */
 charcpu_cx_supported[64];
-int cpu_rid;
 };
 
 struct acpi_cpu_device {
@@ -681,10 +682,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp
 gas.BitWidth = 8;
 if (AcpiGbl_FADT.C2Latency <= 100) {
gas.Address = sc->cpu_p_blk + 4;
-   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid,
+   cx_ptr->res_rid = 0;
+   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid,
&gas, &cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx != NULL) {
-   sc->cpu_rid++;
cx_ptr->type = ACPI_STATE_C2;
cx_ptr->trans_lat = AcpiGbl_FADT.C2Latency;
cx_ptr++;
@@ -698,10 +699,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp
 /* Validate and allocate resources for C3 (P_LVL3). */
 if (AcpiGbl_FADT.C3Latency <= 1000 && !(cpu_quirks & CPU_QUIRK_NO_C3)) {
gas.Address = sc->cpu_p_blk + 5;
-   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid, &gas,
-   &cx_ptr->p_lvlx, RF_SHAREABLE);
+   cx_ptr->res_rid = 1;
+   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid,
+   &gas, &cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx != NULL) {
-   sc->cpu_rid++;
cx_ptr->type = ACPI_STATE_C3;
cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency;
cx_ptr++;
@@ -803,19 +804,18 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s
break;
}
 
-#ifdef notyet
/* Free up any previous register. */
if (cx_ptr->p_lvlx != NULL) {
-   bus_release_resource(sc->cpu_dev, 0, 0, cx_ptr->p_lvlx);
+   bus_release_resource(sc->cpu_dev, cx_ptr->res_type, cx_ptr->res_rid,
+   cx_ptr->p_lvlx);
cx_ptr->p_lvlx = NULL;
}
-#endif
 
/* Allocate the control register for C2 or C3. */
-   acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, &sc->cpu_rid,
+   cx_ptr->res_rid = sc->cpu_cx_count;
+   acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, &cx_ptr->res_rid,
&cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx) {
-   sc->cpu_rid++;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 "acpi_cpu%d: Got C%d - %d latency\n",
 device_get_unit(sc->cpu_dev), cx_ptr->type,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244619 - stable/8/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:09:52 2012
New Revision: 244619
URL: http://svnweb.freebsd.org/changeset/base/244619

Log:
  MFC r243404: acpi_cpu: use fixed resource ids for cx state i/o resources

Modified:
  stable/8/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/acpica/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi_cpu.c
==
--- stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:09:41 2012
(r244618)
+++ stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 12:09:52 2012
(r244619)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -65,6 +66,7 @@ struct acpi_cx {
 uint32_ttrans_lat; /* Transition latency (usec). */
 uint32_tpower; /* Power consumed (mW). */
 int res_type;  /* Resource type for p_lvlx. */
+int res_rid;   /* Resource ID for p_lvlx. */
 };
 #define MAX_CX_STATES   8
 
@@ -89,7 +91,6 @@ struct acpi_cpu_softc {
 int cpu_cx_lowest_lim;
 int cpu_disable_idle; /* Disable entry to idle 
function */
 charcpu_cx_supported[64];
-int cpu_rid;
 };
 
 struct acpi_cpu_device {
@@ -670,10 +671,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp
 gas.BitWidth = 8;
 if (AcpiGbl_FADT.C2Latency <= 100) {
gas.Address = sc->cpu_p_blk + 4;
-   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid,
+   cx_ptr->res_rid = 0;
+   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid,
&gas, &cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx != NULL) {
-   sc->cpu_rid++;
cx_ptr->type = ACPI_STATE_C2;
cx_ptr->trans_lat = AcpiGbl_FADT.C2Latency;
cx_ptr++;
@@ -687,10 +688,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp
 /* Validate and allocate resources for C3 (P_LVL3). */
 if (AcpiGbl_FADT.C3Latency <= 1000 && !(cpu_quirks & CPU_QUIRK_NO_C3)) {
gas.Address = sc->cpu_p_blk + 5;
-   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid, &gas,
-   &cx_ptr->p_lvlx, RF_SHAREABLE);
+   cx_ptr->res_rid = 1;
+   acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid,
+   &gas, &cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx != NULL) {
-   sc->cpu_rid++;
cx_ptr->type = ACPI_STATE_C3;
cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency;
cx_ptr++;
@@ -790,19 +791,18 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s
break;
}
 
-#ifdef notyet
/* Free up any previous register. */
if (cx_ptr->p_lvlx != NULL) {
-   bus_release_resource(sc->cpu_dev, 0, 0, cx_ptr->p_lvlx);
+   bus_release_resource(sc->cpu_dev, cx_ptr->res_type, cx_ptr->res_rid,
+   cx_ptr->p_lvlx);
cx_ptr->p_lvlx = NULL;
}
-#endif
 
/* Allocate the control register for C2 or C3. */
-   acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, &sc->cpu_rid,
+   cx_ptr->res_rid = sc->cpu_cx_count;
+   acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, &cx_ptr->res_rid,
&cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx) {
-   sc->cpu_rid++;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 "acpi_cpu%d: Got C%d - %d latency\n",
 device_get_unit(sc->cpu_dev), cx_ptr->type,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244620 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:12:47 2012
New Revision: 244620
URL: http://svnweb.freebsd.org/changeset/base/244620

Log:
  MFC r243762: gfs_file_inactive: replace bad code with ugly code

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c   Sun Dec 23 
12:09:52 2012(r244619)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c   Sun Dec 23 
12:12:47 2012(r244620)
@@ -665,8 +665,10 @@ gfs_file_inactive(vnode_t *vp)
ge = NULL;
 
 found:
+#ifdef TODO
if (vp->v_flag & V_XATTRDIR)
VI_LOCK(fp->gfs_parent);
+#endif
VI_LOCK(vp);
/*
 * Really remove this vnode
@@ -687,16 +689,17 @@ found:
if (fp->gfs_parent) {
if (dp)
gfs_dir_unlock(dp);
-   VI_LOCK(fp->gfs_parent);
-   fp->gfs_parent->v_usecount--;
-   VI_UNLOCK(fp->gfs_parent);
+   VOP_UNLOCK(vp, 0);
+   VN_RELE(fp->gfs_parent);
+   vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
} else {
ASSERT(vp->v_vfsp != NULL);
VFS_RELE(vp->v_vfsp);
}
+#ifdef TODO
if (vp->v_flag & V_XATTRDIR)
VI_UNLOCK(fp->gfs_parent);
-
+#endif
return (data);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244621 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:13:07 2012
New Revision: 244621
URL: http://svnweb.freebsd.org/changeset/base/244621

Log:
  MFC r243762: gfs_file_inactive: replace bad code with ugly code
  
  PR:   kern/15

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c   Sun Dec 23 
12:12:47 2012(r244620)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c   Sun Dec 23 
12:13:07 2012(r244621)
@@ -665,8 +665,10 @@ gfs_file_inactive(vnode_t *vp)
ge = NULL;
 
 found:
+#ifdef TODO
if (vp->v_flag & V_XATTRDIR)
VI_LOCK(fp->gfs_parent);
+#endif
VI_LOCK(vp);
/*
 * Really remove this vnode
@@ -687,16 +689,17 @@ found:
if (fp->gfs_parent) {
if (dp)
gfs_dir_unlock(dp);
-   VI_LOCK(fp->gfs_parent);
-   fp->gfs_parent->v_usecount--;
-   VI_UNLOCK(fp->gfs_parent);
+   VOP_UNLOCK(vp, 0);
+   VN_RELE(fp->gfs_parent);
+   vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
} else {
ASSERT(vp->v_vfsp != NULL);
VFS_RELE(vp->v_vfsp);
}
+#ifdef TODO
if (vp->v_flag & V_XATTRDIR)
VI_UNLOCK(fp->gfs_parent);
-
+#endif
return (data);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244622 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:16:13 2012
New Revision: 244622
URL: http://svnweb.freebsd.org/changeset/base/244622

Log:
  MFC r243502: zfs roopool: add support for multi-vdev configurations

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 12:13:07 2012(r244621)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 12:16:13 2012(r244622)
@@ -3739,54 +3739,120 @@ out:
 
 #else
 
-extern int
-vdev_geom_read_pool_label(const char *name, nvlist_t **config);
+extern int vdev_geom_read_pool_label(const char *name, nvlist_t ***configs,
+uint64_t *count);
 
 static nvlist_t *
 spa_generate_rootconf(const char *name)
 {
+   nvlist_t **configs, **tops;
nvlist_t *config;
-   nvlist_t *nvtop, *nvroot;
+   nvlist_t *best_cfg, *nvtop, *nvroot;
+   uint64_t *holes;
+   uint64_t best_txg;
uint64_t nchildren;
uint64_t pgid;
+   uint64_t count;
+   uint64_t i;
+   uint_t   nholes;
 
-   if (vdev_geom_read_pool_label(name, &config) != 0)
+   if (vdev_geom_read_pool_label(name, &configs, &count) != 0)
return (NULL);
 
+   ASSERT3U(count, !=, 0);
+   best_txg = 0;
+   for (i = 0; i < count; i++) {
+   uint64_t txg;
+
+   VERIFY(nvlist_lookup_uint64(configs[i], ZPOOL_CONFIG_POOL_TXG,
+   &txg) == 0);
+   if (txg > best_txg) {
+   best_txg = txg;
+   best_cfg = configs[i];
+   }
+   }
+
/*
 * Multi-vdev root pool configuration discovery is not supported yet.
 */
nchildren = 0;
-   nvlist_lookup_uint64(config, ZPOOL_CONFIG_VDEV_CHILDREN, &nchildren);
-   if (nchildren != 1) {
-   nvlist_free(config);
-   return (NULL);
+   VERIFY(nvlist_lookup_uint64(best_cfg, ZPOOL_CONFIG_VDEV_CHILDREN,
+   &nchildren) == 0);
+   holes = NULL;
+   nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
+   &holes, &nholes);
+
+   tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+   for (i = 0; i < nchildren; i++) {
+   if (i >= count)
+   break;
+   if (configs[i] == NULL)
+   continue;
+   VERIFY(nvlist_lookup_nvlist(configs[i], ZPOOL_CONFIG_VDEV_TREE,
+   &nvtop) == 0);
+   nvlist_dup(nvtop, &tops[i], KM_SLEEP);
+   }
+   for (i = 0; holes != NULL && i < nholes; i++) {
+   if (i >= nchildren)
+   continue;
+   if (tops[holes[i]] != NULL)
+   continue;
+   nvlist_alloc(&tops[holes[i]], NV_UNIQUE_NAME, KM_SLEEP);
+   VERIFY(nvlist_add_string(tops[holes[i]], ZPOOL_CONFIG_TYPE,
+   VDEV_TYPE_HOLE) == 0);
+   VERIFY(nvlist_add_uint64(tops[holes[i]], ZPOOL_CONFIG_ID,
+   holes[i]) == 0);
+   VERIFY(nvlist_add_uint64(tops[holes[i]], ZPOOL_CONFIG_GUID,
+   0) == 0);
+   }
+   for (i = 0; i < nchildren; i++) {
+   if (tops[i] != NULL)
+   continue;
+   nvlist_alloc(&tops[i], NV_UNIQUE_NAME, KM_SLEEP);
+   VERIFY(nvlist_add_string(tops[i], ZPOOL_CONFIG_TYPE,
+   VDEV_TYPE_MISSING) == 0);
+   VERIFY(nvlist_add_uint64(tops[i], ZPOOL_CONFIG_ID,
+   i) == 0);
+   VERIFY(nvlist_add_uint64(tops[i], ZPOOL_CONFIG_GUID,
+   0) == 0);
}
 
/*
-* Add this top-level vdev to the child array.
+* Create pool config based on the best vdev config.
 */
-   VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
-   &nvtop) == 0);
-   VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
-   &pgid) == 0);
+   nvlist_dup(best_cfg, &config, KM_SLEEP);
 
/*
 * Put this pool's top-level vdevs into a root vdev.
 */
+   VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
+   &pgid) == 0);
VERIFY(nvlist_alloc(&nvroot, NV_UNIQUE_NAME, KM_SLEEP) == 0);
VERIFY(nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE,
VDEV_TYPE_ROOT) == 0);
VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) == 0);
VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid) == 0);
VERIFY(nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_C

svn commit: r244623 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:16:24 2012
New Revision: 244623
URL: http://svnweb.freebsd.org/changeset/base/244623

Log:
  MFC r243502: zfs roopool: add support for multi-vdev configurations

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 12:16:13 2012(r244622)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 12:16:24 2012(r244623)
@@ -3739,54 +3739,120 @@ out:
 
 #else
 
-extern int
-vdev_geom_read_pool_label(const char *name, nvlist_t **config);
+extern int vdev_geom_read_pool_label(const char *name, nvlist_t ***configs,
+uint64_t *count);
 
 static nvlist_t *
 spa_generate_rootconf(const char *name)
 {
+   nvlist_t **configs, **tops;
nvlist_t *config;
-   nvlist_t *nvtop, *nvroot;
+   nvlist_t *best_cfg, *nvtop, *nvroot;
+   uint64_t *holes;
+   uint64_t best_txg;
uint64_t nchildren;
uint64_t pgid;
+   uint64_t count;
+   uint64_t i;
+   uint_t   nholes;
 
-   if (vdev_geom_read_pool_label(name, &config) != 0)
+   if (vdev_geom_read_pool_label(name, &configs, &count) != 0)
return (NULL);
 
+   ASSERT3U(count, !=, 0);
+   best_txg = 0;
+   for (i = 0; i < count; i++) {
+   uint64_t txg;
+
+   VERIFY(nvlist_lookup_uint64(configs[i], ZPOOL_CONFIG_POOL_TXG,
+   &txg) == 0);
+   if (txg > best_txg) {
+   best_txg = txg;
+   best_cfg = configs[i];
+   }
+   }
+
/*
 * Multi-vdev root pool configuration discovery is not supported yet.
 */
nchildren = 0;
-   nvlist_lookup_uint64(config, ZPOOL_CONFIG_VDEV_CHILDREN, &nchildren);
-   if (nchildren != 1) {
-   nvlist_free(config);
-   return (NULL);
+   VERIFY(nvlist_lookup_uint64(best_cfg, ZPOOL_CONFIG_VDEV_CHILDREN,
+   &nchildren) == 0);
+   holes = NULL;
+   nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
+   &holes, &nholes);
+
+   tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+   for (i = 0; i < nchildren; i++) {
+   if (i >= count)
+   break;
+   if (configs[i] == NULL)
+   continue;
+   VERIFY(nvlist_lookup_nvlist(configs[i], ZPOOL_CONFIG_VDEV_TREE,
+   &nvtop) == 0);
+   nvlist_dup(nvtop, &tops[i], KM_SLEEP);
+   }
+   for (i = 0; holes != NULL && i < nholes; i++) {
+   if (i >= nchildren)
+   continue;
+   if (tops[holes[i]] != NULL)
+   continue;
+   nvlist_alloc(&tops[holes[i]], NV_UNIQUE_NAME, KM_SLEEP);
+   VERIFY(nvlist_add_string(tops[holes[i]], ZPOOL_CONFIG_TYPE,
+   VDEV_TYPE_HOLE) == 0);
+   VERIFY(nvlist_add_uint64(tops[holes[i]], ZPOOL_CONFIG_ID,
+   holes[i]) == 0);
+   VERIFY(nvlist_add_uint64(tops[holes[i]], ZPOOL_CONFIG_GUID,
+   0) == 0);
+   }
+   for (i = 0; i < nchildren; i++) {
+   if (tops[i] != NULL)
+   continue;
+   nvlist_alloc(&tops[i], NV_UNIQUE_NAME, KM_SLEEP);
+   VERIFY(nvlist_add_string(tops[i], ZPOOL_CONFIG_TYPE,
+   VDEV_TYPE_MISSING) == 0);
+   VERIFY(nvlist_add_uint64(tops[i], ZPOOL_CONFIG_ID,
+   i) == 0);
+   VERIFY(nvlist_add_uint64(tops[i], ZPOOL_CONFIG_GUID,
+   0) == 0);
}
 
/*
-* Add this top-level vdev to the child array.
+* Create pool config based on the best vdev config.
 */
-   VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
-   &nvtop) == 0);
-   VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
-   &pgid) == 0);
+   nvlist_dup(best_cfg, &config, KM_SLEEP);
 
/*
 * Put this pool's top-level vdevs into a root vdev.
 */
+   VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
+   &pgid) == 0);
VERIFY(nvlist_alloc(&nvroot, NV_UNIQUE_NAME, KM_SLEEP) == 0);
VERIFY(nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE,
VDEV_TYPE_ROOT) == 0);
VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) == 0);
VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid) == 0);
VERIFY(nvlist_

svn commit: r244624 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:19:07 2012
New Revision: 244624
URL: http://svnweb.freebsd.org/changeset/base/244624

Log:
  MFC r242567: zfs_mount: drop vfs.zfs.rootpool.prefer_cached_config tunable

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 12:16:24 2012(r244623)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 12:19:07 2012(r244624)
@@ -1656,24 +1656,12 @@ zfs_mount(vfs_t *vfsp)
if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 &&
(vfsp->vfs_flag & MNT_UPDATE) == 0) {
char pname[MAXNAMELEN];
-   spa_t *spa;
-   int prefer_cache;
 
error = getpoolname(osname, pname);
+   if (error == 0)
+   error = spa_import_rootpool(pname);
if (error)
goto out;
-
-   prefer_cache = 1;
-   TUNABLE_INT_FETCH("vfs.zfs.rootpool.prefer_cached_config",
-   &prefer_cache);
-   mutex_enter(&spa_namespace_lock);
-   spa = spa_lookup(pname);
-   mutex_exit(&spa_namespace_lock);
-   if (!prefer_cache || spa == NULL) {
-   error = spa_import_rootpool(pname);
-   if (error)
-   goto out;
-   }
}
DROP_GIANT();
error = zfs_domount(vfsp, osname);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244625 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:19:22 2012
New Revision: 244625
URL: http://svnweb.freebsd.org/changeset/base/244625

Log:
  MFC r242567: zfs_mount: drop vfs.zfs.rootpool.prefer_cached_config tunable

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 12:19:07 2012(r244624)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 12:19:22 2012(r244625)
@@ -1652,24 +1652,12 @@ zfs_mount(vfs_t *vfsp)
if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 &&
(vfsp->vfs_flag & MNT_UPDATE) == 0) {
char pname[MAXNAMELEN];
-   spa_t *spa;
-   int prefer_cache;
 
error = getpoolname(osname, pname);
+   if (error == 0)
+   error = spa_import_rootpool(pname);
if (error)
goto out;
-
-   prefer_cache = 1;
-   TUNABLE_INT_FETCH("vfs.zfs.rootpool.prefer_cached_config",
-   &prefer_cache);
-   mutex_enter(&spa_namespace_lock);
-   spa = spa_lookup(pname);
-   mutex_exit(&spa_namespace_lock);
-   if (!prefer_cache || spa == NULL) {
-   error = spa_import_rootpool(pname);
-   if (error)
-   goto out;
-   }
}
DROP_GIANT();
error = zfs_domount(vfsp, osname);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244626 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:46:28 2012
New Revision: 244626
URL: http://svnweb.freebsd.org/changeset/base/244626

Log:
  MFC r243520,243521: zfs: overhaul zfs-vfs glue for vnode life-cycle management

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: 
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h 
Sun Dec 23 12:19:22 2012(r244625)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h 
Sun Dec 23 12:46:28 2012(r244626)
@@ -207,8 +207,6 @@ typedef struct znode {
list_node_t z_link_node;/* all znodes in fs link */
sa_handle_t *z_sa_hdl;  /* handle to sa data */
boolean_t   z_is_sa;/* are we native sa? */
-   /* FreeBSD-specific field. */
-   struct task z_task;
 } znode_t;
 
 

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 12:19:22 2012(r244625)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Sun Dec 23 12:46:28 2012(r244626)
@@ -1848,18 +1848,6 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea
zfsvfs->z_unmounted = B_TRUE;
rrw_exit(&zfsvfs->z_teardown_lock, FTAG);
rw_exit(&zfsvfs->z_teardown_inactive_lock);
-
-#ifdef __FreeBSD__
-   /*
-* Some znodes might not be fully reclaimed, wait for them.
-*/
-   mutex_enter(&zfsvfs->z_znodes_lock);
-   while (list_head(&zfsvfs->z_all_znodes) != NULL) {
-   msleep(zfsvfs, &zfsvfs->z_znodes_lock, 0,
-   "zteardown", 0);
-   }
-   mutex_exit(&zfsvfs->z_znodes_lock);
-#endif
}
 
/*

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 
23 12:19:22 2012(r244625)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 
23 12:46:28 2012(r244626)
@@ -4578,14 +4578,22 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca
 * The fs has been unmounted, or we did a
 * suspend/resume and this file no longer exists.
 */
-   VI_LOCK(vp);
-   ASSERT(vp->v_count <= 1);
-   vp->v_count = 0;
-   VI_UNLOCK(vp);
+   rw_exit(&zfsvfs->z_teardown_inactive_lock);
vrecycle(vp, curthread);
+   return;
+   }
+
+   mutex_enter(&zp->z_lock);
+   if (zp->z_unlinked) {
+   /*
+* Fast path to recycle a vnode of a removed file.
+*/
+   mutex_exit(&zp->z_lock);
rw_exit(&zfsvfs->z_teardown_inactive_lock);
+   vrecycle(vp, curthread);
return;
}
+   mutex_exit(&zp->z_lock);
 
if (zp->z_atime_dirty && zp->z_unlinked == 0) {
dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os);
@@ -4604,8 +4612,6 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca
dmu_tx_commit(tx);
}
}
-
-   zfs_zinactive(zp);
rw_exit(&zfsvfs->z_teardown_inactive_lock);
 }
 
@@ -6121,28 +6127,6 @@ zfs_freebsd_inactive(ap)
return (0);
 }
 
-static void
-zfs_reclaim_complete(void *arg, int pending)
-{
-   znode_t *zp = arg;
-   zfsvfs_t *zfsvfs = zp->z_zfsvfs;
-
-   rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER);
-   if (zp->z_sa_hdl != NULL) {
-   ZFS_OBJ_HOLD_ENTER(zfsvfs, zp->z_id);
-   zfs_znode_dmu_fini(zp);
-   ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id);
-   }
-   zfs_znode_free(zp);
-   rw_exit(&zfsvfs->z_teardown_inactive_lock);
-   /*
-* If the file system is being unmounted, there is a process waiting
-* for us, wake it up.
-*/
-   if (zfsvfs->z_unmounted)
-   wakeup_one(zfsvfs);
-}
-
 static int
 zfs_freebsd_reclaim(ap)
struct vop_reclaim_args /* {
@@ -6153,53 +6137,25 @@ zfs_freebsd_reclaim(ap)
vnode_t *vp = ap->a_vp;
znode_t *zp = VTOZ(vp);
zfsvfs_t *zfsvfs = zp

svn commit: r244627 - head/share/man/man9

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 12:56:04 2012
New Revision: 244627
URL: http://svnweb.freebsd.org/changeset/base/244627

Log:
  lock.9: fix incorrect descriptions of LK_SHARED and LK_DOWNGRADE behavior
  
  Reviewed by:  attilio
  MFC after:5 days
  X-MFC after:  r243900

Modified:
  head/share/man/man9/lock.9

Modified: head/share/man/man9/lock.9
==
--- head/share/man/man9/lock.9  Sun Dec 23 12:46:28 2012(r244626)
+++ head/share/man/man9/lock.9  Sun Dec 23 12:56:04 2012(r244627)
@@ -148,7 +148,9 @@ Flags indicating what action is to be ta
 .Bl -tag -width ".Dv LK_CANRECURSE"
 .It Dv LK_SHARED
 Acquire a shared lock.
-If an exclusive lock is currently held, it will be downgraded.
+If an exclusive lock is currently held,
+.Dv EDEADLK
+will be returned.
 .It Dv LK_EXCLUSIVE
 Acquire an exclusive lock.
 If an exclusive lock is already held, and
@@ -158,7 +160,8 @@ is not set, the system will
 .It Dv LK_DOWNGRADE
 Downgrade exclusive lock to a shared lock.
 Downgrading a shared lock is not permitted.
-If an exclusive lock has been recursed, all references will be downgraded.
+If an exclusive lock has been recursed, the system will
+.Xr panic 9 .
 .It Dv LK_UPGRADE
 Upgrade a shared lock to an exclusive lock.
 If this call fails, the shared lock is lost.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244629 - head

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 13:04:04 2012
New Revision: 244629
URL: http://svnweb.freebsd.org/changeset/base/244629

Log:
  UPDATING: add a note about the clang+zfs+i386 stack overflow issue

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Sun Dec 23 13:04:00 2012(r244628)
+++ head/UPDATING   Sun Dec 23 13:04:04 2012(r244629)
@@ -26,6 +26,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20121223:
+   After switching to Clang as the default compiler some users of ZFS
+   on i386 systems started to experience stack overflow kernel panics.
+   Please consider using 'options KSTACK_PAGES=4' in such configurations.
+
 20121222:
GEOM_LABEL now mangles label names read from file system metadata.
Mangling affect labels containing spaces, non-printable characters,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244628 - in head: contrib/llvm/include/llvm/MC contrib/llvm/lib/ExecutionEngine/RuntimeDyld contrib/llvm/lib/MC contrib/llvm/lib/Target/Mips contrib/llvm/lib/Target/Mips/InstPrinter co...

2012-12-23 Thread Dimitry Andric
Author: dim
Date: Sun Dec 23 13:04:00 2012
New Revision: 244628
URL: http://svnweb.freebsd.org/changeset/base/244628

Log:
  Upgrade our copy of llvm/clang to 3.2 release.
  
  Release notes for llvm:
  http://llvm.org/releases/3.2/docs/ReleaseNotes.html
  
  Release notes for clang:
  http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html
  
  MFC after:2 weeks

Modified:
  head/contrib/llvm/include/llvm/MC/MCExpr.h
  head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
  head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
  head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
  head/contrib/llvm/lib/MC/MCExpr.cpp
  head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
  head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
  head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
  head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
  head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
  head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
  head/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
  head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp
  head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
  head/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
  head/contrib/llvm/lib/Target/Mips/MipsJITInfo.h
  head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp
  head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp
  head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h
  head/contrib/llvm/tools/clang/lib/Basic/Version.cpp
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
  head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp
  head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
  head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
  head/lib/clang/include/clang/Basic/Version.inc
  head/usr.bin/clang/clang/clang.1
Directory Properties:
  head/contrib/llvm/   (props changed)
  head/contrib/llvm/tools/clang/   (props changed)

Modified: head/contrib/llvm/include/llvm/MC/MCExpr.h
==
--- head/contrib/llvm/include/llvm/MC/MCExpr.h  Sun Dec 23 12:56:04 2012
(r244627)
+++ head/contrib/llvm/include/llvm/MC/MCExpr.h  Sun Dec 23 13:04:00 2012
(r244628)
@@ -197,7 +197,11 @@ public:
 VK_Mips_GOT_PAGE,
 VK_Mips_GOT_OFST,
 VK_Mips_HIGHER,
-VK_Mips_HIGHEST
+VK_Mips_HIGHEST,
+VK_Mips_GOT_HI16,
+VK_Mips_GOT_LO16,
+VK_Mips_CALL_HI16,
+VK_Mips_CALL_LO16
   };
 
 private:

Modified: head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
==
--- head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp   Sun Dec 
23 12:56:04 2012(r244627)
+++ head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp   Sun Dec 
23 13:04:00 2012(r244628)
@@ -346,7 +346,7 @@ uint8_t *RuntimeDyldImpl::createStubFunc
 uint32_t *StubAddr = (uint32_t*)Addr;
 *StubAddr = 0xe51ff004; // ldr pc,
 return (uint8_t*)++StubAddr;
-  } else if (Arch == Triple::mipsel) {
+  } else if (Arch == Triple::mipsel || Arch == Triple::mips) {
 uint32_t *StubAddr = (uint32_t*)Addr;
 // 0:   3c19lui t9,%hi(addr).
 // 4:   2739addiu   t9,t9,%lo(addr).

Modified: head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
==
--- head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Sun Dec 23 12:56:04 2012(r244627)
+++ head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Sun Dec 23 13:04:00 2012(r244628)
@@ -676,7 +676,8 @@ void RuntimeDyldELF::processRelocationRe
 RelType, 0);
   Section.StubOffset += getMaxStubSize();
 }
-  } else if (Arch == Triple::mipsel && RelType == ELF::R_MIPS_26) {
+  } else if ((Arch == Triple::mipsel || Arch == Triple::mips) &&
+ RelType == ELF::R_MIPS_26) {
 // This is an Mips branch relocation, need to use a stub function.
 DEBUG(dbgs() << "\t\tThis is a Mips branch relocation.");
 SectionEntry &Section = Sections[Rel.SectionID];

Modified: head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
==
--- head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h Sun Dec 
23 12:56:04 2012(r244627)
+++ head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h Sun Dec 
23 13:04:00 2012(r244628)
@@ -168,7 +168,7 @@ protected:
   inline unsigned getMaxStubSize() {
 if (Arch == Triple::arm || Arch == Triple::thumb)
   return 8; // 32-bit instruction and 32-bit address
-else if (Arch == Triple::mipsel)
+else if (Arch

Re: svn commit: r244605 - head/usr.sbin/gssd

2012-12-23 Thread Rick Macklem
Benjamin Kaduk wrote:
> Hi Rick,
> 
> 
> Thanks for all this -- it's good stuff to have.
> 
> 
> On Sat, Dec 22, 2012 at 6:34 PM, Rick Macklem < rmack...@freebsd.org >
> wrote:
> 
> 
> Author: rmacklem
> Date: Sat Dec 22 23:34:28 2012
> New Revision: 244605
> URL: http://svnweb.freebsd.org/changeset/base/244605
> 
> Log:
> Document the new gssd daemon options added by r244604.
> This is a content change.
> 
> MFC after: 2 weeks
> 
> Modified:
> head/usr.sbin/gssd/gssd.8
> 
> Modified: head/usr.sbin/gssd/gssd.8
> ==
> --- head/usr.sbin/gssd/gssd.8 Sat Dec 22 23:21:17 2012 (r244604)
> +++ head/usr.sbin/gssd/gssd.8 Sat Dec 22 23:34:28 2012 (r244605)
> @@ -46,6 +49,29 @@ Run in debug mode.
> In this mode,
> .Nm
> will not fork when it starts.
> +.It Fl s Ar dir-list
> +Look for an appropriate credential cache file in this list of
> directories.
> +The list should be full pathnames from root, separated by ':'
> characters.
> +Usually this list will simply be "/tmp".
> +Without this option, the
> +.Nm
> +daemon assumes that the credential cache file is called
> /tmp/krb5cc_,
> +where  is the effective uid for the RPC caller.
> +.It Fl c Ar file-substring
> +Set a file-substring for the credential cache file names.
> +Only files with this substring embedded in their names will be
> +selected as candidates when the
> +.Fl s
> +has been specified.
> 
> 
> 
> This grammar seems a bit fishy ("when the -s has been specified");
> "when -s has been specified" or
> "when a search directory has been specified with -s" would probably be
> better.
> 
Sure.

> 
> +If not specified, it defaults to "krb5cc_".
> +.It Fl r Ar preferred-realm
> +Set a preferred Kerberos realm for the search of the directory list
> for
> 
> 
> 
> "Directory list" sounds like there are multiple directories involved,
> perhaps
> "directory listing" is better?
> 
It can be a list, for example: "/tmp:/var/tmp". Personally, I thought
having a list was overkill, but during the email discussion with the people
that reported the problem, it was felt that a list might be needed (and
the Linux gssd does take a list of directories).

However, it probably isn't clear that the preferred realm applies to
the principal names in the credential cache file entries being examined.

> 
> +a credentials cache file.
> +When set, files with TGT credentials for this realm will be selected
> over
> +other credential files.
> +This option is only meaningful when the
> +.Fl s
> +option has been specified.
> 
> 
> 
> There is something of a movement among the doc types to remove
> "redundant" words,
> making this "when -s has been specified", but others (some quite
> senior) do not approve
> of this "useless churn". Might not be worth changing now, but for new
> content, something
> to consider.
> 
> 
> Let me know if I should make the patch.
> 
Sure, if you'd like to. Otherwise, I'll try and come up with a fixup.

Thanks for pointing this out, rick

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


Re: svn commit: r244604 - head/usr.sbin/gssd

2012-12-23 Thread Stefan Farfeleder
On Sat, Dec 22, 2012 at 11:21:17PM +, Rick Macklem wrote:
> Author: rmacklem
> Date: Sat Dec 22 23:21:17 2012
> New Revision: 244604
> URL: http://svnweb.freebsd.org/changeset/base/244604
> 
> Log:
>   It was reported via email that some sshds create kerberos
>   credential cache files with names other than /tmp/krb5cc_.
>   The gssd daemon does not know how to find these credential caches.
>   This patch implements a new option "-s" that does a search for
>   credential cache files, using roughly the same algorithm as the
>   gssd daemon for Linux uses. The gssd behaviour is only changed
>   if the new "-s" option is specified. It also implements two other
>   new options related to the "-s" option.
>   
>   Reported by:Piete.Brooks at cl.cam.ac.uk, Herbert Poeckl
>   Tested by:  Herbert Poeckl (admin at ist.tugraz.at), Illias A. Marinos
>   MFC after:  2 weeks
> 
> Modified:
>   head/usr.sbin/gssd/gssd.c

I think you forgot to add -lkrb5 to the Makefile.

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


svn commit: r244631 - head/sys/cddl/dev/dtrace

2012-12-23 Thread Ryan Stone
Author: rstone
Date: Sun Dec 23 15:50:37 2012
New Revision: 244631
URL: http://svnweb.freebsd.org/changeset/base/244631

Log:
  Correct a series of errors in the hand-rolled locking for drace_debug.c:
  
  - Use spinlock_enter()/spinlock_exit() to prevent a thread holding a
debug lock from being preempted to prevent other threads waiting
on that lock from starvation.
  
  - Handle the possibility of CPU migration in between the fetch of curcpu
and the call to spinlock_enter() by saving curcpu in a local variable.
  
  - Use memory barriers to prevent reordering of loads and stores of the
data protected by the lock outside of the critical section
  
  - Eliminate false sharing of the locks by moving them into the structures
that they protect and aligning them to a cacheline boundary.
  
  - Record the owning thread in the lock to make debugging future problems
easier.
  
  Reviewed by:  rpaulo (initial version)
  MFC after:2 weeks

Modified:
  head/sys/cddl/dev/dtrace/dtrace_debug.c

Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c
==
--- head/sys/cddl/dev/dtrace/dtrace_debug.c Sun Dec 23 14:19:04 2012
(r244630)
+++ head/sys/cddl/dev/dtrace/dtrace_debug.c Sun Dec 23 15:50:37 2012
(r244631)
@@ -33,11 +33,10 @@
 
 #include 
 
-#definedtrace_cmpset_long  atomic_cmpset_long
-
 #define DTRACE_DEBUG_BUFR_SIZE (32 * 1024)
 
 struct dtrace_debug_data {
+   uintptr_t lock __aligned(CACHE_LINE_SIZE);
char bufr[DTRACE_DEBUG_BUFR_SIZE];
char *first;
char *last;
@@ -46,20 +45,22 @@ struct dtrace_debug_data {
 
 static char dtrace_debug_bufr[DTRACE_DEBUG_BUFR_SIZE];
 
-static volatile u_long dtrace_debug_flag[MAXCPU];
-
 static void
 dtrace_debug_lock(int cpu)
 {
-   while (dtrace_cmpset_long(&dtrace_debug_flag[cpu], 0, 1) == 0)
-   /* Loop until the lock is obtained. */
+uintptr_t tid;
+
+   tid = (uintptr_t)curthread;
+   spinlock_enter();
+   while (atomic_cmpset_acq_ptr(&dtrace_debug_data[cpu].lock, 0, tid) == 
0)/* Loop until the lock is obtained. */
;
 }
 
 static void
 dtrace_debug_unlock(int cpu)
 {
-   dtrace_debug_flag[cpu] = 0;
+   atomic_store_rel_ptr(&dtrace_debug_data[cpu].lock, 0);
+   spinlock_exit();
 }
 
 static void
@@ -151,10 +152,11 @@ dtrace_debug_output(void)
  */
 
 static __inline void
-dtrace_debug__putc(char c)
+dtrace_debug__putc(int cpu, char c)
 {
-   struct dtrace_debug_data *d = &dtrace_debug_data[curcpu];
+   struct dtrace_debug_data *d;
 
+   d = &dtrace_debug_data[cpu];
*d->next++ = c;
 
if (d->next == d->last)
@@ -172,24 +174,30 @@ dtrace_debug__putc(char c)
 static void __used
 dtrace_debug_putc(char c)
 {
-   dtrace_debug_lock(curcpu);
+   int cpu;
+
+   cpu = curcpu;
+   dtrace_debug_lock(cpu);
 
-   dtrace_debug__putc(c);
+   dtrace_debug__putc(cpu, c);
 
-   dtrace_debug_unlock(curcpu);
+   dtrace_debug_unlock(cpu);
 }
 
 static void __used
 dtrace_debug_puts(const char *s)
 {
-   dtrace_debug_lock(curcpu);
+   int cpu;
+   
+   cpu = curcpu;
+   dtrace_debug_lock(cpu);
 
while (*s != '\0')
-   dtrace_debug__putc(*s++);
+   dtrace_debug__putc(cpu, *s++);
 
-   dtrace_debug__putc('\0');
+   dtrace_debug__putc(cpu, '\0');
 
-   dtrace_debug_unlock(curcpu);
+   dtrace_debug_unlock(cpu);
 }
 
 /*
@@ -219,7 +227,7 @@ dtrace_debug_ksprintn(char *nbuf, uintma
 #define MAXNBUF (sizeof(intmax_t) * NBBY + 1)
 
 static void
-dtrace_debug_vprintf(const char *fmt, va_list ap)
+dtrace_debug_vprintf(int cpu, const char *fmt, va_list ap)
 {
char nbuf[MAXNBUF];
const char *p, *percent, *q;
@@ -243,10 +251,10 @@ dtrace_debug_vprintf(const char *fmt, va
width = 0;
while ((ch = (u_char)*fmt++) != '%' || stop) {
if (ch == '\0') {
-   dtrace_debug__putc('\0');
+   dtrace_debug__putc(cpu, '\0');
return;
}
-   dtrace_debug__putc(ch);
+   dtrace_debug__putc(cpu, ch);
}
percent = fmt - 1;
qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0;
@@ -266,7 +274,7 @@ reswitch:   switch (ch = (u_char)*fmt++) {
ladjust = 1;
goto reswitch;
case '%':
-   dtrace_debug__putc(ch);
+   dtrace_debug__putc(cpu, ch);
break;
case '*':
if (!dot) {
@@ -301,7 +309,7 @@ reswitch:   switch (ch = (u_char)*fmt++) {
num = (u_int)va_arg(ap, int);
p = va_arg(ap, char *);
 

svn commit: r244632 - stable/8/sys/dev/acpica

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 16:11:43 2012
New Revision: 244632
URL: http://svnweb.freebsd.org/changeset/base/244632

Log:
  fix r243760 by accounting for cpuset vs cpumask differences
  
  This is a direct commit.
  
  Pointyhat to: avg

Modified:
  stable/8/sys/dev/acpica/acpi_cpu.c

Modified: stable/8/sys/dev/acpica/acpi_cpu.c
==
--- stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 15:50:37 2012
(r244631)
+++ stable/8/sys/dev/acpica/acpi_cpu.c  Sun Dec 23 16:11:43 2012
(r244632)
@@ -417,9 +417,9 @@ SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_O
 static void
 disable_idle(struct acpi_cpu_softc *sc)
 {
-cpuset_t cpuset;
+cpumask_t cpuset;
 
-CPU_SETOF(sc->cpu_pcpu->pc_cpuid, &cpuset);
+cpuset = sc->cpu_pcpu->pc_cpumask;
 sc->cpu_disable_idle = TRUE;
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244633 - head/sys/netpfil/ipfw

2012-12-23 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Dec 23 16:28:18 2012
New Revision: 244633
URL: http://svnweb.freebsd.org/changeset/base/244633

Log:
  Use unified IP_FW_ARG_TABLEARG() macro for most tablearg checks.
  Log real value instead of IP_FW_TABLEARG (65535) in ipfw_log().
  
  Noticed by:   Vitaliy Tokarenko 
  MFC after:2 weeks

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c
  head/sys/netpfil/ipfw/ip_fw_dynamic.c
  head/sys/netpfil/ipfw/ip_fw_log.c
  head/sys/netpfil/ipfw/ip_fw_private.h

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Sun Dec 23 16:11:43 2012
(r244632)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Sun Dec 23 16:28:18 2012
(r244633)
@@ -1850,8 +1850,7 @@ do {  
\
 
case O_TAG: {
struct m_tag *mtag;
-   uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ?
-   tablearg : cmd->arg1;
+   uint32_t tag = IP_FW_ARG_TABLEARG(cmd->arg1);
 
/* Packet is already tagged with this tag? */
mtag = m_tag_locate(m, MTAG_IPFW, tag, NULL);
@@ -1930,8 +1929,7 @@ do {  
\
 
case O_TAGGED: {
struct m_tag *mtag;
-   uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ?
-   tablearg : cmd->arg1;
+   uint32_t tag = IP_FW_ARG_TABLEARG(cmd->arg1);
 
if (cmdlen == 1) {
match = m_tag_locate(m, MTAG_IPFW,
@@ -2069,8 +2067,7 @@ do {  
\
case O_PIPE:
case O_QUEUE:
set_match(args, f_pos, chain);
-   args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) 
?
-   tablearg : cmd->arg1;
+   args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1);
if (cmd->opcode == O_PIPE)
args->rule.info |= IPFW_IS_PIPE;
if (V_fw_one_pass)
@@ -2090,8 +2087,7 @@ do {  
\
retval = (cmd->opcode == O_DIVERT) ?
IP_FW_DIVERT : IP_FW_TEE;
set_match(args, f_pos, chain);
-   args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) 
?
-   tablearg : cmd->arg1;
+   args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1);
break;
 
case O_COUNT:
@@ -2109,8 +2105,7 @@ do {  
\
(uintptr_t)f->x_next == chain->id) {
f_pos = (uintptr_t)f->next_rule;
} else {
-   int i = (cmd->arg1 == IP_FW_TABLEARG) ?
-   tablearg : cmd->arg1;
+   int i = IP_FW_ARG_TABLEARG(cmd->arg1);
/* make sure we do not jump backward */
if (i <= f->rulenum)
i = f->rulenum + 1;
@@ -2215,9 +2210,8 @@ do {  
\
(uintptr_t)f->x_next == chain->id) {
f_pos = (uintptr_t)f->next_rule;
} else {
-   jmpto = (cmd->arg1 ==
-   IP_FW_TABLEARG) ? tablearg:
-   cmd->arg1;
+   jmpto = IP_FW_ARG_TABLEARG(
+   cmd->arg1);
f_pos = ipfw_find_rule(chain,
jmpto, 0);
/* update the cache */
@@ -2337,8 +2331,7 @@ do {  
\
case O_NETGRAPH:
case O_NGTEE:
set_match(args, f_pos, chain);
-   args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) 
?
-   tablearg : cmd->arg1;
+  

svn commit: r244634 - head/sys/netpfil/ipfw

2012-12-23 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Dec 23 18:35:42 2012
New Revision: 244634
URL: http://svnweb.freebsd.org/changeset/base/244634

Log:
  Add parentheses to IP_FW_ARG_TABLEARG() definition.
  
  Suggested by: glebius
  MFC with: r244633

Modified:
  head/sys/netpfil/ipfw/ip_fw_private.h

Modified: head/sys/netpfil/ipfw/ip_fw_private.h
==
--- head/sys/netpfil/ipfw/ip_fw_private.h   Sun Dec 23 16:28:18 2012
(r244633)
+++ head/sys/netpfil/ipfw/ip_fw_private.h   Sun Dec 23 18:35:42 2012
(r244634)
@@ -259,7 +259,7 @@ struct sockopt; /* used by tcp_var.h */
(_cntr)->bcnt = 0;  \
} while (0)
 
-#defineIP_FW_ARG_TABLEARG(a)   ((a) == IP_FW_TABLEARG) ? tablearg : (a)
+#defineIP_FW_ARG_TABLEARG(a)   (((a) == IP_FW_TABLEARG) ? tablearg : 
(a))
 /*
  * The lock is heavily used by ip_fw2.c (the main file) and ip_fw_nat.c
  * so the variable and the macros must be here.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244635 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 19:58:41 2012
New Revision: 244635
URL: http://svnweb.freebsd.org/changeset/base/244635

Log:
  zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead
  
  To do:remove KM_ZERO declaration
  Pointyhat to: avg (for mindlessly using the pseudo-flag)
  MFC after:instantly (to fix stable/8 build)

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 23 
18:35:42 2012(r244634)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 23 
19:58:41 2012(r244635)
@@ -3799,7 +3799,7 @@ spa_generate_rootconf(const char *name)
nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
&holes, &nholes);
 
-   tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+   tops = kmem_zalloc(nchildren * sizeof(void *), KM_SLEEP);
for (i = 0; i < nchildren; i++) {
if (i >= count)
break;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 
23 18:35:42 2012(r244634)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 
23 19:58:41 2012(r244635)
@@ -300,8 +300,8 @@ resize_configs(nvlist_t ***configs, uint
 
if (id < *count)
return;
-   new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *),
-   KM_SLEEP | KM_ZERO);
+   new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *),
+   KM_SLEEP);
for (i = 0; i < *count; i++)
new_configs[i] = (*configs)[i];
if (*configs != NULL)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244636 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 20:03:10 2012
New Revision: 244636
URL: http://svnweb.freebsd.org/changeset/base/244636

Log:
  MFC r244635: zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used 
instead

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 19:58:41 2012(r244635)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 20:03:10 2012(r244636)
@@ -3782,7 +3782,7 @@ spa_generate_rootconf(const char *name)
nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
&holes, &nholes);
 
-   tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+   tops = kmem_zalloc(nchildren * sizeof(void *), KM_SLEEP);
for (i = 0; i < nchildren; i++) {
if (i >= count)
break;

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 
23 19:58:41 2012(r244635)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 
23 20:03:10 2012(r244636)
@@ -297,8 +297,8 @@ resize_configs(nvlist_t ***configs, uint
 
if (id < *count)
return;
-   new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *),
-   KM_SLEEP | KM_ZERO);
+   new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *),
+   KM_SLEEP);
for (i = 0; i < *count; i++)
new_configs[i] = (*configs)[i];
if (*configs != NULL)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244637 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-12-23 Thread Andriy Gapon
Author: avg
Date: Sun Dec 23 20:03:53 2012
New Revision: 244637
URL: http://svnweb.freebsd.org/changeset/base/244637

Log:
  MFC r244635: zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used 
instead
  
  This should fix build failure caused by r244623.

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 20:03:10 2012(r244636)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Dec 
23 20:03:53 2012(r244637)
@@ -3782,7 +3782,7 @@ spa_generate_rootconf(const char *name)
nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
&holes, &nholes);
 
-   tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+   tops = kmem_zalloc(nchildren * sizeof(void *), KM_SLEEP);
for (i = 0; i < nchildren; i++) {
if (i >= count)
break;

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 
23 20:03:10 2012(r244636)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Dec 
23 20:03:53 2012(r244637)
@@ -297,8 +297,8 @@ resize_configs(nvlist_t ***configs, uint
 
if (id < *count)
return;
-   new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *),
-   KM_SLEEP | KM_ZERO);
+   new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *),
+   KM_SLEEP);
for (i = 0; i < *count; i++)
new_configs[i] = (*configs)[i];
if (*configs != NULL)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244638 - head/usr.sbin/gssd

2012-12-23 Thread Rick Macklem
Author: rmacklem
Date: Sun Dec 23 20:12:57 2012
New Revision: 244638
URL: http://svnweb.freebsd.org/changeset/base/244638

Log:
  Fix the Makefile so it can build gssd.c after r244604.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/gssd/Makefile

Modified: head/usr.sbin/gssd/Makefile
==
--- head/usr.sbin/gssd/Makefile Sun Dec 23 20:03:53 2012(r244637)
+++ head/usr.sbin/gssd/Makefile Sun Dec 23 20:12:57 2012(r244638)
@@ -7,8 +7,8 @@ SRCS=   gssd.c gssd.h gssd_svc.c gssd_xdr.
 CFLAGS+= -I.
 WARNS?= 1
 
-DPADD= ${LIBGSSAPI}
-LDADD= -lgssapi
+DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} 
${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
+LDADD= -lgssapi -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
 
 CLEANFILES= gssd_svc.c gssd.h
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r244608 - head/usr.sbin/pkg

2012-12-23 Thread Pawel Jakub Dawidek
On Sun, Dec 23, 2012 at 11:22:18AM +, Matthew Seaman wrote:
> Author: matthew (ports committer)
> Date: Sun Dec 23 11:22:18 2012
> New Revision: 244608
> URL: http://svnweb.freebsd.org/changeset/base/244608
> 
> Log:
>   Third time's the charm.  pkg -N output needs to go to stderr.
>   
>   Approved by:bapt
>   MFC after:  2 weeks
> 
> Modified:
>   head/usr.sbin/pkg/pkg.c
> 
> Modified: head/usr.sbin/pkg/pkg.c
> ==
> --- head/usr.sbin/pkg/pkg.c   Sun Dec 23 10:21:01 2012(r244607)
> +++ head/usr.sbin/pkg/pkg.c   Sun Dec 23 11:22:18 2012(r244608)
> @@ -457,10 +457,8 @@ main(__unused int argc, char *argv[])
>* a system is configured to use pkg, don't bootstrap pkg
>* when that argument is given as argv[1].
>*/
> - if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0) {
> - printf("%s", "pkg is not installed\n");
> - exit(EXIT_FAILURE);
> - }
> + if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0)
> + errx(EXIT_FAILURE, "pkg is not installed\n");

How about removing space after 'if (' and redundant '\n'?

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgpJwhCO4eTBw.pgp
Description: PGP signature


Re: svn commit: r244604 - head/usr.sbin/gssd

2012-12-23 Thread Rick Macklem
Stefan Farfeleder wrote:
> On Sat, Dec 22, 2012 at 11:21:17PM +, Rick Macklem wrote:
> > Author: rmacklem
> > Date: Sat Dec 22 23:21:17 2012
> > New Revision: 244604
> > URL: http://svnweb.freebsd.org/changeset/base/244604
> >
> > Log:
> >   It was reported via email that some sshds create kerberos
> >   credential cache files with names other than /tmp/krb5cc_.
> >   The gssd daemon does not know how to find these credential caches.
> >   This patch implements a new option "-s" that does a search for
> >   credential cache files, using roughly the same algorithm as the
> >   gssd daemon for Linux uses. The gssd behaviour is only changed
> >   if the new "-s" option is specified. It also implements two other
> >   new options related to the "-s" option.
> >
> >   Reported by: Piete.Brooks at cl.cam.ac.uk, Herbert Poeckl
> >   Tested by: Herbert Poeckl (admin at ist.tugraz.at), Illias A.
> >   Marinos
> >   MFC after: 2 weeks
> >
> > Modified:
> >   head/usr.sbin/gssd/gssd.c
> 
> I think you forgot to add -lkrb5 to the Makefile.
> 
Oops, I forgot to commit the Makefile fix. It has been committed now.
(which for wonderful Kerberos, includes a half dozen extra libraries;-)

Thanks for pointing it out, rick

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


svn commit: r244639 - head/usr.sbin/pkg

2012-12-23 Thread Matthew Seaman
Author: matthew (ports committer)
Date: Sun Dec 23 20:39:03 2012
New Revision: 244639
URL: http://svnweb.freebsd.org/changeset/base/244639

Log:
  Remove extraneous space and new-line.
  
  Submitted by: pjd, gcooper
  Approved by:  bapt
  MFC after:2 weeks

Modified:
  head/usr.sbin/pkg/pkg.c

Modified: head/usr.sbin/pkg/pkg.c
==
--- head/usr.sbin/pkg/pkg.c Sun Dec 23 20:12:57 2012(r244638)
+++ head/usr.sbin/pkg/pkg.c Sun Dec 23 20:39:03 2012(r244639)
@@ -457,8 +457,8 @@ main(__unused int argc, char *argv[])
 * a system is configured to use pkg, don't bootstrap pkg
 * when that argument is given as argv[1].
 */
-   if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0)
-   errx(EXIT_FAILURE, "pkg is not installed\n");
+   if (argv[1] != NULL && strcmp(argv[1], "-N") == 0)
+   errx(EXIT_FAILURE, "pkg is not installed");
 
/*
 * Do not ask for confirmation if either of stdin or stdout is
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244640 - in head/contrib/llvm/tools/clang/lib: Basic Driver

2012-12-23 Thread Andrew Turner
Author: andrew
Date: Sun Dec 23 21:41:39 2012
New Revision: 244640
URL: http://svnweb.freebsd.org/changeset/base/244640

Log:
  Pull in r170096 from upstream clang trunk:
  
Initial support for FreeBSD on ARM.

Modified:
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
  head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp

Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
==
--- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Dec 23 20:39:03 
2012(r244639)
+++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Dec 23 21:41:39 
2012(r244640)
@@ -3078,7 +3078,9 @@ public:
 // name.
 if (Name == "apcs-gnu") {
   DoubleAlign = LongLongAlign = LongDoubleAlign = SuitableAlign = 32;
-  SizeType = UnsignedLong;
+  // size_t is unsigned int on FreeBSD.
+  if (getTriple().getOS() != llvm::Triple::FreeBSD)
+SizeType = UnsignedLong;
 
   // Revert to using SignedInt on apcs-gnu to comply with existing 
behaviour.
   WCharType = SignedInt;

Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
==
--- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Sun Dec 23 
20:39:03 2012(r244639)
+++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Sun Dec 23 
21:41:39 2012(r244640)
@@ -1667,6 +1667,19 @@ Tool &FreeBSD::SelectTool(const Compilat
   return *T;
 }
 
+bool FreeBSD::UseSjLjExceptions() const {
+  // FreeBSD uses SjLj exceptions on ARM oabi.
+  switch (getTriple().getEnvironment()) {
+  case llvm::Triple::GNUEABI:
+  case llvm::Triple::EABI:
+return false;
+
+  default:
+return (getTriple().getArch() == llvm::Triple::arm ||
+getTriple().getArch() == llvm::Triple::thumb);
+  }
+}
+
 /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
 
 NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList 
&Args)

Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
==
--- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h   Sun Dec 23 
20:39:03 2012(r244639)
+++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h   Sun Dec 23 
21:41:39 2012(r244640)
@@ -468,6 +468,7 @@ public:
 
   virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,
const ActionList &Inputs) const;
+  virtual bool UseSjLjExceptions() const;
 };
 
 class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {

Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==
--- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp  Sun Dec 23 20:39:03 
2012(r244639)
+++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp  Sun Dec 23 21:41:39 
2012(r244640)
@@ -665,6 +665,11 @@ static StringRef getARMFloatABI(const Dr
   break;
 }
 
+case llvm::Triple::FreeBSD:
+  // FreeBSD defaults to soft float
+  FloatABI = "soft";
+  break;
+
 default:
   switch(Triple.getEnvironment()) {
   case llvm::Triple::GNUEABIHF:
@@ -5422,6 +5427,17 @@ void freebsd::Assemble::ConstructJob(Com
  LastPICArg->getOption().matches(options::OPT_fpie))) {
   CmdArgs.push_back("-KPIC");
 }
+  } else if (getToolChain().getArch() == llvm::Triple::arm ||
+ getToolChain().getArch() == llvm::Triple::thumb) {
+CmdArgs.push_back("-mfpu=softvfp");
+switch(getToolChain().getTriple().getEnvironment()) {
+case llvm::Triple::GNUEABI:
+case llvm::Triple::EABI:
+  break;
+
+default:
+  CmdArgs.push_back("-matpcs");
+}
   }
 
   Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244641 - stable/9/release/doc/en_US.ISO8859-1/relnotes

2012-12-23 Thread Hiroki Sato
Author: hrs
Date: Sun Dec 23 22:13:53 2012
New Revision: 244641
URL: http://svnweb.freebsd.org/changeset/base/244641

Log:
  Add items for 9.1R relnotes:
jail devfs/nullfs/zfs support and new params,
kern.eventtimer.activetick,
posix_fadvise(2) added,
filemon(4) added,
kern.stop_scheduler_on_panic=1 by default,
linux_fadvice64() added,
hw.memtest.tests=0 by default on VM,
kern.msgbuf_show_timestamp added,
null(4) and zero(4) non-blocking mode,
ULE CPU selection for SMT improved,
PREEMPTION on sparc64,
security.bsd.unprivileged_idprio added,
splash(4) TheDraw support,
boot0cfg PXE support,
/boot/config support,
backup GPT handling change in gptboot,
zfsboot/zfsloader device name/root storage pool format change,
zfsboot on sparc64,
abtn(4) on powerpc,
AMD 10h/12h family errata,
atibl(4) on powerpc,
acpi_wmi(4) multiple instances,
adm1030(4) on powerpc,
cesa(4) on arm,
PMC support for PowerPC G4, Sandy Bridge, software events,
pcf8563(4) RTC,
PWM fan control on PowerMac SMU,
Atmel SAM9XE support on arm,
kern.proc.* added,
USB suspend/resume improved,
xhci(4) USB 3.0 hub bugfix,
viawd(4) watch dog timer driver,
wbwd(4) watch dog timer driver,
drm2(4) new Intel GPU driver,
snd_hda(4) improved,
snd_hdspe(4) added,
snd_emu10kx(4), snd_maestro3(4), and snd_csa(4) GPL-free,
ae(4) bugfix,
axe(4) checksum offloading support,
bce(4) improved,
bge(4) improved,
cxgb(4) and cxgbe(4) updated,
dc(4) M5261/M5263 support added,
et(4) bugfixes,
igb(4) updated to 2.3.4,
iwn(4) new device support,
miibus(4) improved,
msk(4) 64-bit DMA support,
mxge(4) updated to 1.4.55,
nsphyter(4) National DP83849 support,
oce(4) for Emulex OneConnect 10Gbit Ethernet added,
ral(4) Ralink RT2800 and RT3000 support,
re(4) RTL8411 support,
runfw(4) updated to 0.236,
sfxge(4) for Solarflare SFC9000 added,
smcphy(4) Seeq Technology 80220 PHY support,
ti(4) ALTQ and PAE support,
vge(4) link-state detection support,
vr(4) flow control support,
xnb(4) netback improved,
if_bridge(4) link-state detection support,
ipfw(4) table extended,
ip6(4) performance improvement, multiple FIB, default route handling,
IPV6_MULTICASE_HOPS fixed,
NET_RT_IFLISTL added,
netmap(4) added,
sctp(4) improved,
SO_PROTOCOL added,
TCP_KEEP* options added,
arcmsr(4) updated to 1.20.00.25,
ahci(4) hw.ahci.force tunable added,
hw.ata.ata_dma backward compatibility improved,
cam(4) SEMB device support,
cam(4) kern.cam.pmp.hide_special added,
ctl(4) CAM Target Layer added,
cd(4) now uses READ CD for Audio CD,
da(4) BIO_DELETE support,
GEOM_MIRROR BIO_DELETE support,
GEOM_MULTIPATH improved,
GEOM_PART_MBR supports Linux swap partition,
GEOM_PART_LDM added,
GEOM_RAID added to GENERIC, DDF format support,
GEOM_UNCOMPRESS added,
hpt27xx(4) for HighPoint RocketRAID 27xx added,
isci(4) for Intel C600 (Patsburg) chipset added,
isp(4) target mode bugfix,
ixgbe(4) Intel X540 support,
mfi(4) bugfix, MSI support, Drake Skinny and Thunderbolt support,
mps(4) updated to 14.00.00.01-fbsd,
mpt(4) bugfix,
usb(4) storage device power saving mode support,
NFS bugfix, positive name cache, vfs.nfsd.disable_checkutf8,
tmpfs(5) vfs.tmpfs.memory_reserved,
ZFS improvements,
auth.conf(5) removed,
camcontorl(8) fwdownload,
dhclient(8) domain-search option support,
dump(8) devicename length in /etc/dumpdates changed,
fetch(1) %-encoding in user and password part,
fdlopen(3) added,
fopen(3) "x" mode,
gcc(1) -ffast-math bugfix,
hastd(8) pidfile,
ifconfig(8) vlanhwcsum,
ifconfig(8) IPv6 fix in an IPv4-only jail,
ifconfig(8) carp state parameter,
jail(8) configuration file support,
kdump(1) -p pid,
kenv(1) -v and -N,
kldload(8) -n,
libedit updated to 2009/12/28 snapshot,
libmap.conf(5) include and includedir directive,
libthr mutex performance improved,
libcxxrt and libc++ import,
limits(1) -P pid,
pciconf(8) -le,
procstat(1) superpage flag, -e, -x, -l,
remquo(3) bugfix,
rtld(1) GCC RELRO, GNU hash section,
setbuf(1) and libstdbuf,
top(1) per-thread I/O stat,
unzip(1) -Z,
xlocale(3) API import,
periodic: daily_status_zfs_zpool_list_enable i

svn commit: r244642 - head/release/picobsd/build

2012-12-23 Thread Luigi Rizzo
Author: luigi
Date: Sun Dec 23 22:41:54 2012
New Revision: 244642
URL: http://svnweb.freebsd.org/changeset/base/244642

Log:
  enable building picobsd with CC instead of CLANG

Modified:
  head/release/picobsd/build/picobsd

Modified: head/release/picobsd/build/picobsd
==
--- head/release/picobsd/build/picobsd  Sun Dec 23 22:13:53 2012
(r244641)
+++ head/release/picobsd/build/picobsd  Sun Dec 23 22:41:54 2012
(r244642)
@@ -445,6 +445,8 @@ do_kernel() {   # OK
${BINMAKE} ${o_par} KERNCONF=${l_kernconf}  \
-v -f ${PICO_TREE}/build/Makefile.conf ) || \
fail $? missing_kernel
+#  -DWITHOUT_CLANG_IS_CC   \
+
 }
 
 # Populate the variable part of the floppy filesystem. Must be done before
@@ -973,6 +975,7 @@ set_build_parameters() {
 if [ ${OSVERSION} -ge 500035 ] ; then
export MAKEOBJDIRPREFIX=${l_objtree}
export TARGET_ARCH=${o_arch} TARGET=${o_arch}
+   export WITHOUT_CLANG_IS_CC=1
# XXX why change machine_arch ?
#-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m`
# export CWARNFLAGS="-Wextra -Wno-sign-compare 
-Wno-missing-field-initializers"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244643 - in head/sys: fs/devfs kern sys

2012-12-23 Thread Konstantin Belousov
Author: kib
Date: Sun Dec 23 22:43:27 2012
New Revision: 244643
URL: http://svnweb.freebsd.org/changeset/base/244643

Log:
  Do not force a writer to the devfs file to drain the buffer writes.
  
  Requested and tested by:  Ian Lepore 
  MFC after:2 weeks

Modified:
  head/sys/fs/devfs/devfs_vnops.c
  head/sys/kern/sys_generic.c
  head/sys/sys/file.h

Modified: head/sys/fs/devfs/devfs_vnops.c
==
--- head/sys/fs/devfs/devfs_vnops.c Sun Dec 23 22:41:54 2012
(r244642)
+++ head/sys/fs/devfs/devfs_vnops.c Sun Dec 23 22:43:27 2012
(r244643)
@@ -1049,6 +1049,7 @@ devfs_open(struct vop_open_args *ap)
int error, ref, vlocked;
struct cdevsw *dsw;
struct file *fpop;
+   struct mtx *mtxp;
 
if (vp->v_type == VBLK)
return (ENXIO);
@@ -1099,6 +1100,16 @@ devfs_open(struct vop_open_args *ap)
 #endif
if (fp->f_ops == &badfileops)
finit(fp, fp->f_flag, DTYPE_VNODE, dev, &devfs_ops_f);
+   mtxp = mtx_pool_find(mtxpool_sleep, fp);
+
+   /*
+* Hint to the dofilewrite() to not force the buffer draining
+* on the writer to the file.  Most likely, the write would
+* not need normal buffers.
+*/
+   mtx_lock(mtxp);
+   fp->f_vnread_flags |= FDEVFS_VNODE;
+   mtx_unlock(mtxp);
return (error);
 }
 

Modified: head/sys/kern/sys_generic.c
==
--- head/sys/kern/sys_generic.c Sun Dec 23 22:41:54 2012(r244642)
+++ head/sys/kern/sys_generic.c Sun Dec 23 22:43:27 2012(r244643)
@@ -536,7 +536,8 @@ dofilewrite(td, fd, fp, auio, offset, fl
ktruio = cloneuio(auio);
 #endif
cnt = auio->uio_resid;
-   if (fp->f_type == DTYPE_VNODE)
+   if (fp->f_type == DTYPE_VNODE &&
+   (fp->f_vnread_flags & FDEVFS_VNODE) == 0)
bwillwrite();
if ((error = fo_write(fp, auio, td->td_ucred, flags, td))) {
if (auio->uio_resid != cnt && (error == ERESTART ||

Modified: head/sys/sys/file.h
==
--- head/sys/sys/file.h Sun Dec 23 22:41:54 2012(r244642)
+++ head/sys/sys/file.h Sun Dec 23 22:43:27 2012(r244643)
@@ -178,7 +178,8 @@ struct file {
 #definef_advicef_vnun.fvn_advice
 
 #defineFOFFSET_LOCKED   0x1
-#defineFOFFSET_LOCK_WAITING 0x2 
+#defineFOFFSET_LOCK_WAITING 0x2
+#defineFDEVFS_VNODE 0x4
 
 #endif /* _KERNEL || _WANT_FILE */
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244644 - head/tools/tools/netrate/netreceive

2012-12-23 Thread Luigi Rizzo
Author: luigi
Date: Sun Dec 23 23:03:45 2012
New Revision: 244644
URL: http://svnweb.freebsd.org/changeset/base/244644

Log:
  small cleanup of the code, and add support for running multiple
  threads on each socket.

Modified:
  head/tools/tools/netrate/netreceive/netreceive.c

Modified: head/tools/tools/netrate/netreceive/netreceive.c
==
--- head/tools/tools/netrate/netreceive/netreceive.cSun Dec 23 22:43:27 
2012(r244643)
+++ head/tools/tools/netrate/netreceive/netreceive.cSun Dec 23 23:03:45 
2012(r244644)
@@ -43,27 +43,158 @@
 
 #define MAXSOCK 20
 
+#include 
+#include 
+#include   /* clock_getres() */
+
+static int round_to(int n, int l)
+{
+   return ((n + l - 1)/l)*l;
+}
+
+/*
+ * Each socket uses multiple threads so the receiver is
+ * more efficient. A collector thread runs the stats.
+ */
+struct td_desc {
+   pthread_t td_id;
+   uint64_t count; /* rx counter */
+   int fd;
+   char *buf;
+   int buflen;
+};
+
 static void
 usage(void)
 {
 
-   fprintf(stderr, "netreceive [port]\n");
+   fprintf(stderr, "netreceive port [nthreads]\n");
exit(-1);
 }
 
+static __inline void
+timespec_add(struct timespec *tsa, struct timespec *tsb)
+{
+
+tsa->tv_sec += tsb->tv_sec;
+tsa->tv_nsec += tsb->tv_nsec;
+if (tsa->tv_nsec >= 10) {
+tsa->tv_sec++;
+tsa->tv_nsec -= 10;
+}
+}
+
+static __inline void
+timespec_sub(struct timespec *tsa, struct timespec *tsb)
+{
+
+tsa->tv_sec -= tsb->tv_sec;
+tsa->tv_nsec -= tsb->tv_nsec;
+if (tsa->tv_nsec < 0) {
+tsa->tv_sec--;
+tsa->tv_nsec += 10;
+}
+}
+
+static void *
+rx_body(void *data)
+{
+   struct td_desc *t = data;
+   struct pollfd fds;
+   int y;
+
+   fds.fd = t->fd;
+   fds.events = POLLIN;
+
+   for (;;) {
+   if (poll(&fds, 1, -1) < 0) 
+   perror("poll on thread");
+   if (!(fds.revents & POLLIN))
+   continue;
+   for (;;) {
+   y = recv(t->fd, t->buf, t->buflen, MSG_DONTWAIT);
+   if (y < 0)
+   break;
+   t->count++;
+   }
+   }
+   return NULL;
+}
+
+int
+make_threads(struct td_desc **tp, int *s, int nsock, int nthreads)
+{
+   int i, si, nt = nsock * nthreads;
+   int lb = round_to(nt * sizeof (struct td_desc *), 64);
+   int td_len = round_to(sizeof(struct td_desc), 64); // cache align
+   char *m = calloc(1, lb + td_len * nt);
+
+   printf("td len %d -> %d\n", (int)sizeof(struct td_desc) , td_len);
+   /* pointers plus the structs */
+   if (m == NULL) {
+   perror("no room for pointers!");
+   exit(1);
+   }
+   tp = (struct td_desc **)m;
+   m += lb;/* skip the pointers */
+   for (si = i = 0; i < nt; i++, m += td_len) {
+   tp[i] = (struct td_desc *)m;
+   tp[i]->fd = s[si];
+   if (++si == nsock)
+   si = 0;
+   if (pthread_create(&tp[i]->td_id, NULL, rx_body, tp[i])) {
+   perror("unable to create thread");
+   exit(1);
+   }
+   }
+}
+
+int
+main_thread(struct td_desc **tp, int nsock, int nthreads)
+{
+   uint64_t c0, c1;
+   struct timespec now, then, delta;
+   /* now the parent collects and prints results */
+   c0 = c1 = 0;
+   clock_gettime(CLOCK_REALTIME, &then);
+   fprintf(stderr, "start at %ld.%09ld\n", then.tv_sec, then.tv_nsec);
+   while (1) {
+   int i, nt = nsock * nthreads;
+   int64_t dn;
+   uint64_t pps;
+
+   if (poll(NULL, 0, 500) < 0) 
+   perror("poll");
+   c0 = 0;
+   for (i = 0; i < nt; i++) {
+   c0 += tp[i]->count;
+   }
+   dn = c0 - c1;
+   clock_gettime(CLOCK_REALTIME, &now);
+   delta = now;
+   timespec_sub(&delta, &then);
+   then = now;
+   pps = dn;
+   pps = (pps * 10) / (delta.tv_sec*10 + 
delta.tv_nsec + 1);
+   fprintf(stderr, "%d pkts in %ld.%09ld ns %ld pps\n",
+   (int)dn, delta.tv_sec, delta.tv_nsec, (long)pps);
+   c1 = c0;
+   }
+}
+
 int
 main(int argc, char *argv[])
 {
struct addrinfo hints, *res, *res0;
char *dummy, *packet;
int port;
-   int error, v, i;
+   int error, v, nthreads = 1;
+   struct td_desc **tp;
const char *cause = NULL;
int s[MAXSOCK];
-   struct pollfd fds[MAXSOCK];
int nsock;
 
-   if (argc != 2)
+   if (argc < 2)

svn commit: r244645 - stable/9/release/doc/en_US.ISO8859-1/relnotes

2012-12-23 Thread Hiroki Sato
Author: hrs
Date: Mon Dec 24 00:08:58 2012
New Revision: 244645
URL: http://svnweb.freebsd.org/changeset/base/244645

Log:
  Fix typos.

Modified:
  stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml   Sun Dec 23 
23:03:45 2012(r244644)
+++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml   Mon Dec 24 
00:08:58 2012(r244645)
@@ -200,7 +200,7 @@
   &os;/powerpc64 now
supports kernel profiling by using &man.kgmon.8;.
 
-  The &os; Linux ABI compatiblity layer
+  The &os; Linux ABI compatibility layer
now supports linux_fadvice64() and
linux_fadvice64_64() system call.
 
@@ -386,13 +386,13 @@
  The drm2(4) Intel GPU driver,
which supports GEM, KMS, and works with new generations of
GPUs such as IronLake, SandyBridge, and IvyBridge, has been
-   added.  The &man.agp.4; dirver now supports SandyBridge
+   added.  The &man.agp.4; driver now supports SandyBridge
and IvyBridge CPU northbridges.
 
  The &man.snd.hda.4; driver has been
updated.  It now supports HDMI, new volume control,
automatic recording source selection, runtime
-   reconfigureation, more then 4 PCM devices on a controller,
+   reconfiguration, more then 4 PCM devices on a controller,
multichannel recording, additional playback/record
streams, higher bandwidth, and more informative device
names.
@@ -477,7 +477,7 @@
  The &man.cxgbe.4; and
&man.cxgb.4; driver has been updated to firmware version
1.5.2.0.  This now supports device configuration via a
-   plain text configration file, IPv6 hardware checksumming,
+   plain text configuration file, IPv6 hardware checksumming,
IPv6 TSO and LRO, loadfw command in the
cxgbetool(8) utility which allows to install a firmware to
the card, &man.sysctl.8; variables under
@@ -489,7 +489,7 @@
are found on ULi M1563 South Bridge and M1689 Bridge.
 
  The &man.et.4; driver
-   now works on all platfomrs.  A bug which could prevent
+   now works on all platforms.  A bug which could prevent
&man.altq.4; support from working has been fixed.  A new
&man.sysctl.8; variables under
dev.et.N.stats
@@ -543,7 +543,7 @@
 
  The smcphy(4); driver now supports
Seeq Technology 80220 PHY.  This is found on Adaptec
-   AIC-6915 Starfire ethernet controller supported by the
+   AIC-6915 Starfire Ethernet controller supported by the
&man.sf.4; driver.
 
  The &man.ti.4; driver now
@@ -678,7 +678,7 @@
  &man.cam.4; Target Layer and &man.ctladm.8;, a userland
  control utility, have been added.  ctl(4) is a disk and
  processor device emulation subsystem supporting tagged
- queueing, SCSI task attribute, SCSI implicit command
+ queuing, SCSI task attribute, SCSI implicit command
  ordering, full task management, multiple ports, multiple
  simultaneous initiators, multiple simultaneous backing
  stores, mode sense/select, and error injection
@@ -797,7 +797,7 @@
  &man.mkuzip.8; utility.
 
The &man.hpt27xx.4;
- dirver has been added.  This supports HighPoint RocketRAID
+ driver has been added.  This supports HighPoint RocketRAID
  27xx-based SAS 6Gb/s HBA.
 
The &man.isci.4;
@@ -819,7 +819,7 @@
 
The &man.mfi.4; driver now
  supports single-message MSI, and Drake Skinny and
- ThunderBolt cards.  The &man.loader.8; tunable
+ Thunderbolt cards.  The &man.loader.8; tunable
  hw.mfi.msi has been added and it is
  enabled by default.
 
@@ -905,7 +905,7 @@
  now reports estimated size of the stream.
 
  &man.zfs.8; destroy command
- now reports estimatated space which would be reclaimed when
+ now reports estimated space which would be reclaimed when
  -n flag is specified.
 
  &man.zfs.8; get command now
@@ -929,7 +929,7 @@
 &prompt.root; make
 &prompt.root; make install
 
-   After that, the following cmmand can be used to check the
+   After that, the following command can be used to check the
  system.  poolname is the ZFS
  storage pool name to boot:
 
@@ -1239,7 +1239,7 @@
 
   User-visible incompatibilities
 
-  FreeBSD 9.0 and later have several incompatiblities in
+  FreeBSD 9.0 and later have several incompatibilities in
system configuration which you might want to know before
upgrading your system.  Please read this section and
 

svn commit: r244646 - stable/9/release

2012-12-23 Thread Hiroki Sato
Author: hrs
Date: Mon Dec 24 00:40:21 2012
New Revision: 244646
URL: http://svnweb.freebsd.org/changeset/base/244646

Log:
  MFC: r232679:
  
  - Clean up extra ${.OBJDIR}.
  - Add ${IMAGE} for the supported image files.  This fixes the install target
on FreeBSD/pc98.
  - Use "mkdir -p" instead of "-mkdir" consistently.

Modified:
  stable/9/release/Makefile
Directory Properties:
  stable/9/release/   (props changed)

Modified: stable/9/release/Makefile
==
--- stable/9/release/Makefile   Mon Dec 24 00:08:58 2012(r244645)
+++ stable/9/release/Makefile   Mon Dec 24 00:40:21 2012(r244646)
@@ -32,7 +32,7 @@ TARGET_ARCH?= ${MACHINE_ARCH}
 TARGET_ARCH?=  ${TARGET}
 .endif
 IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
-DISTDIR=   ${.OBJDIR}/dist
+DISTDIR=   dist
 
 .if !exists(${DOCDIR})
 NODOC= true
@@ -53,38 +53,41 @@ EXTRA_PACKAGES+= reldoc
 .endif
 
 RELEASE_TARGETS= ftp
+IMAGES=
 .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
 RELEASE_TARGETS+= cdrom
+IMAGES+=   release.iso bootonly.iso
 .endif
 .if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
 RELEASE_TARGETS+= memstick
+IMAGES+=   memstick
 .endif
 
 .include 
 
 base.txz:
-   -mkdir ${DISTDIR}
-   cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${DISTDIR}
+   mkdir -p ${DISTDIR}
+   cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
 # Set up mergemaster root database
sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
-   "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${DISTDIR}/base"
+   "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D 
"${.OBJDIR}/${DISTDIR}/base"
 # Package all components
-   cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${DISTDIR}
-   mv ${DISTDIR}/*.txz ${.OBJDIR}
+   cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
+   mv ${DISTDIR}/*.txz .
 
 kernel.txz:
-   -mkdir ${DISTDIR}
-   cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel 
DISTDIR=${DISTDIR}
-   mv ${DISTDIR}/kernel*.txz ${.OBJDIR}
+   mkdir -p ${DISTDIR}
+   cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel 
DISTDIR=${.OBJDIR}/${DISTDIR}
+   mv ${DISTDIR}/kernel*.txz .
 
 src.txz:
-   -mkdir -p ${DISTDIR}/usr
+   mkdir -p ${DISTDIR}/usr
ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude 
.zfs \
--exclude CVS --exclude @ --exclude usr/src/release/dist usr/src
 
 ports.txz:
-   -mkdir -p ${DISTDIR}/usr
+   mkdir -p ${DISTDIR}/usr
ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \
--exclude CVS --exclude .svn \
@@ -94,38 +97,35 @@ ports.txz:
 reldoc:
cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
-   -mkdir ${.OBJDIR}/reldoc
+   mkdir -p reldoc
 .for i in hardware readme relnotes errata
-   ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.txt \
-   ${.OBJDIR}/reldoc/${i:U}.TXT
-   ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.html \
-   ${.OBJDIR}/reldoc/${i:U}.HTM
+   ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:U}.TXT
+   ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:U}.HTM
 .endfor
-   cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css ${.OBJDIR}/reldoc
+   cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc
 
 system: packagesystem
 # Install system
-   -mkdir ${.OBJDIR}/release
+   mkdir -p release
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
DESTDIR=${.OBJDIR}/release WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1
 # Copy distfiles
-   mkdir ${.OBJDIR}/release/usr/freebsd-dist
-   cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST \
-   ${.OBJDIR}/release/usr/freebsd-dist
+   mkdir -p release/usr/freebsd-dist
+   cp *.txz MANIFEST release/usr/freebsd-dist
 # Copy documentation, if generated
 .if !defined(NODOC)
-   cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release
+   cp reldoc/* release
 .endif
 # Set up installation environment
-   ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/release/etc/resolv.conf
-   echo sendmail_enable=\"NONE\" > ${.OBJDIR}/release/etc/rc.conf
-   echo hostid_enable=\"NO\" >> ${.OBJDIR}/release/etc/rc.conf
-   cp ${.CURDIR}/rc.local ${.OBJDIR}/release/etc
-   touch ${.OBJDIR}/${.TARGET}
+   ln -s /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf
+   echo sendmail_enable=\"NONE\" > release/etc/rc.conf
+   echo hostid_enable=\"NO\" >> release/etc/rc.conf
+   cp ${.CURDIR}/rc.local release/etc
+   touch ${.TARGET}
 
 bootonly: packagesystem
 # Install system
-   mkdir ${.OBJDIR}/bootonly
+   mkdir -p booto

svn commit: r244647 - stable/9/etc

2012-12-23 Thread Xin LI
Author: delphij
Date: Mon Dec 24 00:45:54 2012
New Revision: 244647
URL: http://svnweb.freebsd.org/changeset/base/244647

Log:
  MFC r244096:
  
  Sync pf.os with OpenBSD.

Modified:
  stable/9/etc/pf.os
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/pf.os
==
--- stable/9/etc/pf.os  Mon Dec 24 00:40:21 2012(r244646)
+++ stable/9/etc/pf.os  Mon Dec 24 00:45:54 2012(r244647)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-# $OpenBSD: pf.os,v 1.25 2010/10/18 15:55:27 deraadt Exp $
+# $OpenBSD: pf.os,v 1.26 2012/08/03 12:25:16 jsg Exp $
 # passive OS fingerprinting
 # -
 #
@@ -226,7 +226,13 @@ S2:64:1:60:M*,S,T,N,W0:Linux:2.4::Linu
 S3:64:1:60:M*,S,T,N,W0:Linux:2.4:.18-21:Linux 2.4.18 and newer
 S4:64:1:60:M*,S,T,N,W0:Linux:2.4::Linux 2.4/2.6 <= 2.6.7
 S4:64:1:60:M*,S,T,N,W0:Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7
-S4:64:1:60:M*,S,T,N,W7:Linux:2.6:8:Linux 2.6.8 and newer (?)
+
+S4:64:1:60:M*,S,T,N,W5:Linux:2.6::Linux 2.6 (newer, 1)
+S4:64:1:60:M*,S,T,N,W6:Linux:2.6::Linux 2.6 (newer, 2)
+S4:64:1:60:M*,S,T,N,W7:Linux:2.6::Linux 2.6 (newer, 3)
+T4:64:1:60:M*,S,T,N,W7:Linux:2.6::Linux 2.6 (newer, 4)
+
+S10:64:1:60:M*,S,T,N,W4:   Linux:3.0::Linux 3.0
 
 S3:64:1:60:M*,S,T,N,W1:Linux:2.5::Linux 2.5 (sometimes 2.4)
 S4:64:1:60:M*,S,T,N,W1:Linux:2.5-2.6::Linux 2.5/2.6
@@ -429,6 +435,8 @@ S44:128:1:48:M*,N,N,S:  Windows:XP:SP1:
 32767:128:1:48:M*,N,N,S:   Windows:2000:SP4:Windows SP1, 2000 SP4
 32767:128:1:48:M*,N,N,S:   Windows:XP:SP1:Windows SP1, 2000 SP4
 
+8192:128:1:52:M*,N,W2,N,N,S:   Windows:Vista::Windows Vista/7
+
 # Odds, ends, mods:
 
 S52:128:1:48:M1260,N,N,S:  Windows:2000:cisco:Windows XP/2000 via 
Cisco
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r244648 - stable/8/etc

2012-12-23 Thread Xin LI
Author: delphij
Date: Mon Dec 24 00:46:34 2012
New Revision: 244648
URL: http://svnweb.freebsd.org/changeset/base/244648

Log:
  MFC r244096:
  
  Sync pf.os with OpenBSD.

Modified:
  stable/8/etc/pf.os
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/pf.os
==
--- stable/8/etc/pf.os  Mon Dec 24 00:45:54 2012(r244647)
+++ stable/8/etc/pf.os  Mon Dec 24 00:46:34 2012(r244648)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-# $OpenBSD: pf.os,v 1.25 2010/10/18 15:55:27 deraadt Exp $
+# $OpenBSD: pf.os,v 1.26 2012/08/03 12:25:16 jsg Exp $
 # passive OS fingerprinting
 # -
 #
@@ -226,7 +226,13 @@ S2:64:1:60:M*,S,T,N,W0:Linux:2.4::Linu
 S3:64:1:60:M*,S,T,N,W0:Linux:2.4:.18-21:Linux 2.4.18 and newer
 S4:64:1:60:M*,S,T,N,W0:Linux:2.4::Linux 2.4/2.6 <= 2.6.7
 S4:64:1:60:M*,S,T,N,W0:Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7
-S4:64:1:60:M*,S,T,N,W7:Linux:2.6:8:Linux 2.6.8 and newer (?)
+
+S4:64:1:60:M*,S,T,N,W5:Linux:2.6::Linux 2.6 (newer, 1)
+S4:64:1:60:M*,S,T,N,W6:Linux:2.6::Linux 2.6 (newer, 2)
+S4:64:1:60:M*,S,T,N,W7:Linux:2.6::Linux 2.6 (newer, 3)
+T4:64:1:60:M*,S,T,N,W7:Linux:2.6::Linux 2.6 (newer, 4)
+
+S10:64:1:60:M*,S,T,N,W4:   Linux:3.0::Linux 3.0
 
 S3:64:1:60:M*,S,T,N,W1:Linux:2.5::Linux 2.5 (sometimes 2.4)
 S4:64:1:60:M*,S,T,N,W1:Linux:2.5-2.6::Linux 2.5/2.6
@@ -429,6 +435,8 @@ S44:128:1:48:M*,N,N,S:  Windows:XP:SP1:
 32767:128:1:48:M*,N,N,S:   Windows:2000:SP4:Windows SP1, 2000 SP4
 32767:128:1:48:M*,N,N,S:   Windows:XP:SP1:Windows SP1, 2000 SP4
 
+8192:128:1:52:M*,N,W2,N,N,S:   Windows:Vista::Windows Vista/7
+
 # Odds, ends, mods:
 
 S52:128:1:48:M1260,N,N,S:  Windows:2000:cisco:Windows XP/2000 via 
Cisco
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"