svn commit: r228054 - head/cddl/contrib/opensolaris/cmd/zfs

2011-11-28 Thread Martin Matuska
Author: mm
Date: Mon Nov 28 09:14:51 2011
New Revision: 228054
URL: http://svn.freebsd.org/changeset/base/228054

Log:
  Add missing warning to zfs(8) for using zfs destroy with -r and -R flags.
  
  Obtained from:illumos
  MFC after:6 days

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs.8

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 08:16:00 2011
(r228053)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 09:14:51 2011
(r228054)
@@ -1423,6 +1423,13 @@ Force an unmount of any file systems usi
 command. This option has no effect on non-file systems or unmounted file
 systems.
 .El
+.Pp
+Extreme care should be taken when applying either the
+.Fl r
+or the
+.Fl R
+options, as they can destroy large portions of a pool and cause unexpected
+behavior for mounted file systems in use.
 .It Xo
 .Nm
 .Cm destroy
@@ -1450,6 +1457,13 @@ Recursively destroy all dependents.
 .It Fl d
 Defer snapshot deletion.
 .El
+.Pp
+Extreme care should be taken when applying either the
+.Fl r
+or the
+.Fl R
+options, as they can destroy large portions of a pool and cause unexpected
+behavior for mounted file systems in use.
 .It Xo
 .Nm
 .Cm snapshot
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228055 - head/cddl/contrib/opensolaris/cmd/zfs

2011-11-28 Thread Martin Matuska
Author: mm
Date: Mon Nov 28 09:33:13 2011
New Revision: 228055
URL: http://svn.freebsd.org/changeset/base/228055

Log:
  Use singular form for zfs destroy snapshot in zfs(8).
  
  MFC after:6 days

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs.8

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 09:14:51 2011
(r228054)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 09:33:13 2011
(r228055)
@@ -1437,7 +1437,7 @@ behavior for mounted file systems in use
 .Ar snapshot
 .Xc
 .Pp
-The given snapshots are destroyed immediately if and only if the
+The given snapshot is destroyed immediately if and only if the
 .Qq Nm Cm destroy
 command without the
 .Fl d
@@ -1445,7 +1445,7 @@ option would have destroyed it. Such imm
 example, if the snapshot had no clones and the user-initiated reference count
 were zero.
 .Pp
-If a snapshot does not qualify for immediate destruction, it is marked for
+If the snapshot does not qualify for immediate destruction, it is marked for
 deferred deletion. In this state, it exists as a usable, visible snapshot until
 both of the preconditions listed above are met, at which point it is destroyed.
 .Bl -tag -width indent
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


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

2011-11-28 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Nov 28 09:54:41 2011
New Revision: 228056
URL: http://svn.freebsd.org/changeset/base/228056

Log:
  This commit marks the beginning of a new internal USB
  transfer statemachine. This work is about using a single
  state variable instead of multiple state bits as input
  for the USB statemachine to determine what to do in the
  various parts of the code. No APIs towards USB device
  drivers or USB host controller drivers will be changed.
  
  MFC after:1 month

Modified:
  head/sys/dev/usb/usb_transfer.h

Modified: head/sys/dev/usb/usb_transfer.h
==
--- head/sys/dev/usb/usb_transfer.h Mon Nov 28 09:33:13 2011
(r228055)
+++ head/sys/dev/usb/usb_transfer.h Mon Nov 28 09:54:41 2011
(r228056)
@@ -28,6 +28,120 @@
 #define_USB_TRANSFER_H_
 
 /*
+ * Definition of internal USB transfer states:
+ * ===
+ *
+ * The main reason there are many USB states is that we are allowed to
+ * cancel USB transfers, then start the USB transfer again and that
+ * this state transaction cannot always be done in a single atomic
+ * operation without blocking the calling thread. One reason for this
+ * is that the USB hardware sometimes needs to wait for DMA
+ * controllers to finish which is done asynchronously and grows the
+ * statemachine.
+ *
+ * When extending the following statemachine there are basically two
+ * things you should think about: Which states should be executed or
+ * modified in case of USB transfer stop and which states should be
+ * executed or modified in case of USB transfer start. Also respect
+ * the can_cancel_immed flag which basically tells if you can go
+ * directly from a wait state to the cancelling states.
+ */
+
+enum {
+   /* XFER start execute state */
+
+   /* USB_ST_SETUP = 0 (already defined) */
+
+   /* XFER transferred execute state */
+
+   /* USB_ST_TRANSFERRED = 1 (already defined) */
+
+   /* XFER error execute state */
+
+   /* USB_ST_ERROR = 2 (already defined) */
+
+   /* XFER restart after error execute state */
+
+   USB_ST_RESTART = 8,
+
+   /* XFER transfer idle state */
+
+   USB_ST_WAIT_SETUP,
+
+   /* Other XFER execute states */
+
+   USB_ST_PIPE_OPEN = 16,
+   USB_ST_PIPE_OPEN_ERROR,
+   USB_ST_PIPE_OPEN_RESTART,
+
+   USB_ST_BDMA_LOAD,
+   USB_ST_BDMA_LOAD_ERROR,
+   USB_ST_BDMA_LOAD_RESTART,
+
+   USB_ST_IVAL_DLY,
+   USB_ST_IVAL_DLY_ERROR,
+   USB_ST_IVAL_DLY_RESTART,
+
+   USB_ST_PIPE_STALL,
+   USB_ST_PIPE_STALL_ERROR,
+   USB_ST_PIPE_STALL_RESTART,
+
+   USB_ST_ENTER,
+   USB_ST_ENTER_ERROR,
+   USB_ST_ENTER_RESTART,
+
+   USB_ST_START,
+   USB_ST_START_ERROR,
+   USB_ST_START_RESTART,
+
+   USB_ST_PIPE_CLOSE,
+   USB_ST_PIPE_CLOSE_ERROR,
+   USB_ST_PIPE_CLOSE_RESTART,
+
+   USB_ST_BDMA_DLY,
+   USB_ST_BDMA_DLY_ERROR,
+   USB_ST_BDMA_DLY_RESTART,
+
+   /* XFER transfer wait states */
+
+   USB_ST_WAIT_PIPE_OPEN = 64,
+   USB_ST_WAIT_PIPE_OPEN_ERROR,
+   USB_ST_WAIT_PIPE_OPEN_RESTART,
+
+   USB_ST_WAIT_BDMA_LOAD,
+   USB_ST_WAIT_BDMA_LOAD_ERROR,
+   USB_ST_WAIT_BDMA_LOAD_RESTART,
+
+   USB_ST_WAIT_IVAL_DLY,
+   USB_ST_WAIT_IVAL_DLY_ERROR,
+   USB_ST_WAIT_IVAL_DLY_RESTART,
+
+   USB_ST_WAIT_PIPE_STALL,
+   USB_ST_WAIT_PIPE_STALL_ERROR,
+   USB_ST_WAIT_PIPE_STALL_RESTART,
+
+   USB_ST_WAIT_ENTER,
+   USB_ST_WAIT_ENTER_ERROR,
+   USB_ST_WAIT_ENTER_RESTART,
+
+   USB_ST_WAIT_START,
+   USB_ST_WAIT_START_ERROR,
+   USB_ST_WAIT_START_RESTART,
+
+   USB_ST_WAIT_PIPE_CLOSE,
+   USB_ST_WAIT_PIPE_CLOSE_ERROR,
+   USB_ST_WAIT_PIPE_CLOSE_RESTART,
+
+   USB_ST_WAIT_BDMA_DLY,
+   USB_ST_WAIT_BDMA_DLY_ERROR,
+   USB_ST_WAIT_BDMA_DLY_RESTART,
+
+   USB_ST_WAIT_TRANSFERRED,
+   USB_ST_WAIT_TRANSFERRED_ERROR,
+   USB_ST_WAIT_TRANSFERRED_RESTART,
+};
+
+/*
  * The following structure defines the messages that is used to signal
  * the done_p USB process.
  */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228057 - head/cddl/lib/drti

2011-11-28 Thread Robert Watson
Author: rwatson
Date: Mon Nov 28 10:01:36 2011
New Revision: 228057
URL: http://svn.freebsd.org/changeset/base/228057

Log:
  Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of
  bsd.prog.mk -- we need to compile PIC, which requires a library build.
  With this change, USDT (userspace DTrace probes) work from within
  shared libraries.
  
  PR:   kern/159046
  Submitted by: Alex Samorukov samm at os2.kiev.ua
  Comments by:  Scott Lystig Fritchie slfritchie at snookles.com
  MFC after:3 days

Modified:
  head/cddl/lib/drti/Makefile

Modified: head/cddl/lib/drti/Makefile
==
--- head/cddl/lib/drti/Makefile Mon Nov 28 09:54:41 2011(r228056)
+++ head/cddl/lib/drti/Makefile Mon Nov 28 10:01:36 2011(r228057)
@@ -18,4 +18,4 @@ CFLAGS+=  -I${.CURDIR}/../../../sys/cddl/
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
-DPIC ${PICFLAG}
 
-.include bsd.prog.mk
+.include bsd.lib.mk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228050 - head/sys/mips/atheros

2011-11-28 Thread Adrian Chadd
On 28 November 2011 16:10, Gleb Smirnoff gleb...@freebsd.org wrote:
 Author: glebius
 Date: Mon Nov 28 08:10:12 2011
 New Revision: 228050
 URL: http://svn.freebsd.org/changeset/base/228050

 Log:
  Fix build, fininshing r228018.

Thanks,


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


Re: svn commit: r228050 - head/sys/mips/atheros

2011-11-28 Thread Aleksandr Rybalko
On Mon, 28 Nov 2011 08:10:12 + (UTC)
Gleb Smirnoff gleb...@freebsd.org wrote:

 Author: glebius
 Date: Mon Nov 28 08:10:12 2011
 New Revision: 228050
 URL: http://svn.freebsd.org/changeset/base/228050
 
 Log:
   Fix build, fininshing r228018.
 
 Modified:
   head/sys/mips/atheros/if_arge.c
 
 Modified: head/sys/mips/atheros/if_arge.c
 ==
 --- head/sys/mips/atheros/if_arge.c  Mon Nov 28 07:09:29
 2011 (r228049) +++ head/sys/mips/atheros/if_arge.c   Mon
 Nov 28 08:10:12 2011 (r228050) @@ -192,9 +192,9 @@ static void
  arge_flush_ddr(struct arge_softc *sc)
  {
  if (sc-arge_mac_unit == 0)
 -ar71xx_device_flush_ddr_ge0();
 +ar71xx_device_flush_ddr_ge(0);
  else
 -ar71xx_device_flush_ddr_ge1();
 +ar71xx_device_flush_ddr_ge(1);
  }
  
  static int 

Hi,

Pointy hat to: me

Sorry for that.

Thank you very much Gleb!

WBW
-- 
Alexandr Rybalko r...@dlink.ua 
aka Alex RAY r...@ddteam.net
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228060 - in head: contrib/gperf contrib/gperf/doc contrib/gperf/lib contrib/gperf/src contrib/gperf/tests gnu/usr.bin/gperf

2011-11-28 Thread Baptiste Daroussin
Author: bapt (ports committer)
Date: Mon Nov 28 12:29:16 2011
New Revision: 228060
URL: http://svn.freebsd.org/changeset/base/228060

Log:
  upgrade gperf to the last GPLv2 version (3.0.3)
  
  Reviewed by:  cognet
  Approved by:  cognet

Added:
  head/contrib/gperf/configure.ac
  head/contrib/gperf/doc/configure.ac
  head/contrib/gperf/lib/configure.ac
  head/contrib/gperf/lib/getline.cc
  head/contrib/gperf/lib/getline.h
  head/contrib/gperf/src/config.h_vms
  head/contrib/gperf/src/configure.ac
  head/contrib/gperf/src/input.cc
  head/contrib/gperf/src/input.h
  head/contrib/gperf/src/keyword-list.cc
  head/contrib/gperf/src/keyword-list.h
  head/contrib/gperf/src/keyword-list.icc
  head/contrib/gperf/src/keyword.cc
  head/contrib/gperf/src/keyword.h
  head/contrib/gperf/src/keyword.icc
  head/contrib/gperf/src/output.cc
  head/contrib/gperf/src/output.h
  head/contrib/gperf/src/positions.cc
  head/contrib/gperf/src/positions.h
  head/contrib/gperf/src/positions.icc
  head/contrib/gperf/src/search.cc
  head/contrib/gperf/src/search.h
Deleted:
  head/contrib/gperf/acconfig.h
  head/contrib/gperf/configure.in
  head/contrib/gperf/doc/configure.in
  head/contrib/gperf/doc/gperf.texi
  head/contrib/gperf/doc/gpl.texinfo
  head/contrib/gperf/doc/texinfo.tex
  head/contrib/gperf/lib/configure.in
  head/contrib/gperf/src/configure.in
  head/contrib/gperf/src/gen-perf.cc
  head/contrib/gperf/src/gen-perf.h
  head/contrib/gperf/src/iterator.cc
  head/contrib/gperf/src/iterator.h
  head/contrib/gperf/src/key-list.cc
  head/contrib/gperf/src/key-list.h
  head/contrib/gperf/src/list-node.cc
  head/contrib/gperf/src/list-node.h
  head/contrib/gperf/src/new.cc
  head/contrib/gperf/src/read-line.cc
  head/contrib/gperf/src/read-line.h
  head/contrib/gperf/src/read-line.icc
  head/contrib/gperf/src/trace.cc
  head/contrib/gperf/src/trace.h
  head/contrib/gperf/src/vectors.cc
  head/contrib/gperf/src/vectors.h
  head/contrib/gperf/tests/
Modified:
  head/contrib/gperf/AUTHORS
  head/contrib/gperf/COPYING
  head/contrib/gperf/ChangeLog
  head/contrib/gperf/FREEBSD-Xlist
  head/contrib/gperf/INSTALL
  head/contrib/gperf/Makefile.devel
  head/contrib/gperf/Makefile.in
  head/contrib/gperf/NEWS
  head/contrib/gperf/README
  head/contrib/gperf/aclocal.m4
  head/contrib/gperf/configure
  head/contrib/gperf/doc/Makefile.in
  head/contrib/gperf/doc/configure
  head/contrib/gperf/doc/gperf.1
  head/contrib/gperf/doc/help2man
  head/contrib/gperf/lib/Makefile.in
  head/contrib/gperf/lib/configure
  head/contrib/gperf/lib/hash.cc
  head/contrib/gperf/lib/hash.h
  head/contrib/gperf/src/Makefile.in
  head/contrib/gperf/src/bool-array.cc
  head/contrib/gperf/src/bool-array.h
  head/contrib/gperf/src/bool-array.icc
  head/contrib/gperf/src/config.h.in
  head/contrib/gperf/src/configure
  head/contrib/gperf/src/hash-table.cc
  head/contrib/gperf/src/hash-table.h
  head/contrib/gperf/src/main.cc
  head/contrib/gperf/src/options.cc
  head/contrib/gperf/src/options.h
  head/contrib/gperf/src/options.icc
  head/contrib/gperf/src/version.cc
  head/contrib/gperf/src/version.h
  head/gnu/usr.bin/gperf/Makefile
  head/gnu/usr.bin/gperf/config.h

Modified: head/contrib/gperf/AUTHORS
==
--- head/contrib/gperf/AUTHORS  Mon Nov 28 11:14:32 2011(r228059)
+++ head/contrib/gperf/AUTHORS  Mon Nov 28 12:29:16 2011(r228060)
@@ -1,2 +1,2 @@
 Douglas C. Schmidt  schm...@ics.uci.edu
-Bruno Haiblehai...@clisp.cons.org
+Bruno Haiblebr...@clisp.org

Modified: head/contrib/gperf/COPYING
==
--- head/contrib/gperf/COPYING  Mon Nov 28 11:14:32 2011(r228059)
+++ head/contrib/gperf/COPYING  Mon Nov 28 12:29:16 2011(r228060)
@@ -2,7 +2,7 @@
Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-  59 Temple Place, Suite 330, Boston, MA 02111-1307,
+  51 Franklin Street, Fifth Floor, Boston, MA 
02110-1301,
   USA.
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.

Modified: head/contrib/gperf/ChangeLog
==
--- head/contrib/gperf/ChangeLogMon Nov 28 11:14:32 2011
(r228059)
+++ head/contrib/gperf/ChangeLogMon Nov 28 12:29:16 2011
(r228060)
@@ -1,3 +1,1646 @@
+2007-04-30  Brendan Kehoe  bren...@zen.org
+
+   * gperf-3.0.3 released.
+   * src/version.cc: Bump to 3.0.3.
+   * tests/*.exp: Bump to 3.0.3 in header.
+   * doc/gperf.1: Regenerate with gperf 3.0.3.
+
+2007-04-06  Bruno Haible  br...@clisp.org
+
+   Improve support for mingw.
+   * tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal,
+   check-lang-utf8, check-lang-ucs2): 

svn commit: r228061 - head/sys/geom/part

2011-11-28 Thread Andrey V. Elsukov
Author: ae
Date: Mon Nov 28 12:38:24 2011
New Revision: 228061
URL: http://svn.freebsd.org/changeset/base/228061

Log:
  The size of APM could be bigger than number of already allocated entries.
  And the first usable sector should not start from the inside of APM area.
  
  MFC after:1 month

Modified:
  head/sys/geom/part/g_part_apm.c

Modified: head/sys/geom/part/g_part_apm.c
==
--- head/sys/geom/part/g_part_apm.c Mon Nov 28 12:29:16 2011
(r228060)
+++ head/sys/geom/part/g_part_apm.c Mon Nov 28 12:38:24 2011
(r228061)
@@ -443,7 +443,7 @@ g_part_apm_read(struct g_part_table *bas
 
table = (struct g_part_apm_table *)basetable;
 
-   basetable-gpt_first = table-self.ent_pmblkcnt + 1;
+   basetable-gpt_first = table-self.ent_size + 1;
basetable-gpt_last = table-ddr.ddr_blkcount - 1;
basetable-gpt_entries = table-self.ent_pmblkcnt - 1;
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228062 - head/sys/netinet

2011-11-28 Thread Gleb Smirnoff
Author: glebius
Date: Mon Nov 28 13:30:14 2011
New Revision: 228062
URL: http://svn.freebsd.org/changeset/base/228062

Log:
  Fix one more fallout from r227791: do not overwrite trimmed sa_len
  on the ia_sockmask when doing SIOCSIFNETMASK.
  
  Reported by:  Stefan Bethke stb lassitu.de, gonzo
  Pointy hat to:glebius

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Mon Nov 28 12:38:24 2011(r228061)
+++ head/sys/netinet/in.c   Mon Nov 28 13:30:14 2011(r228062)
@@ -533,7 +533,8 @@ in_control(struct socket *so, u_long cmd
goto out;
 
case SIOCSIFNETMASK:
-   ia-ia_sockmask = *(struct sockaddr_in *)ifr-ifr_addr;
+   ia-ia_sockmask.sin_addr = ((struct sockaddr_in *)
+   ifr-ifr_addr)-sin_addr;
ia-ia_subnetmask = ntohl(ia-ia_sockmask.sin_addr.s_addr);
goto out;
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228063 - in head/usr.bin/m4: . lib

2011-11-28 Thread Baptiste Daroussin
Author: bapt (ports committer)
Date: Mon Nov 28 13:32:39 2011
New Revision: 228063
URL: http://svn.freebsd.org/changeset/base/228063

Log:
  Synchronize with laster version of m4 from OpenBSD and NetBSD
  This bring better compatibility with gnum4
  
  Reviewed by:  cognet
  Approved by:  cognet
  Obtained from:OpenBSD, NetBSD

Added:
  head/usr.bin/m4/lib/
  head/usr.bin/m4/lib/ohash.h   (contents, props changed)
  head/usr.bin/m4/lib/ohash_create_entry.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_delete.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_do.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_entries.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_enum.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_init.3   (contents, props changed)
  head/usr.bin/m4/lib/ohash_init.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_int.h   (contents, props changed)
  head/usr.bin/m4/lib/ohash_interval.3   (contents, props changed)
  head/usr.bin/m4/lib/ohash_interval.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_lookup_interval.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_lookup_memory.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_qlookup.c   (contents, props changed)
  head/usr.bin/m4/lib/ohash_qlookupi.c   (contents, props changed)
  head/usr.bin/m4/parser.y   (contents, props changed)
  head/usr.bin/m4/tokenizer.l   (contents, props changed)
Modified:
  head/usr.bin/m4/Makefile
  head/usr.bin/m4/eval.c
  head/usr.bin/m4/expr.c
  head/usr.bin/m4/extern.h
  head/usr.bin/m4/gnum4.c
  head/usr.bin/m4/look.c
  head/usr.bin/m4/m4.1
  head/usr.bin/m4/main.c
  head/usr.bin/m4/mdef.h
  head/usr.bin/m4/misc.c
  head/usr.bin/m4/pathnames.h
  head/usr.bin/m4/stdd.h
  head/usr.bin/m4/trace.c

Modified: head/usr.bin/m4/Makefile
==
--- head/usr.bin/m4/MakefileMon Nov 28 13:30:14 2011(r228062)
+++ head/usr.bin/m4/MakefileMon Nov 28 13:32:39 2011(r228063)
@@ -5,8 +5,20 @@
 #  if you want the paste  spaste macros.
 
 PROG=  m4
-CFLAGS+=-DEXTENDED
+CFLAGS+=-DEXTENDED -I${.CURDIR}/lib
+LDADD= -ly -ll
+# clang needs 1 while with gcc we can use 2
+#WARNS=1
 
-SRCS=  eval.c expr.c look.c main.c misc.c gnum4.c trace.c
+SRCS=  eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l
+.PATH: ${.CURDIR}/lib
+SRCS+= ohash_create_entry.c ohash_delete.c ohash_do.c ohash_entries.c \
+   ohash_enum.c ohash_init.c ohash_int.h ohash_interval.c \
+   ohash_lookup_interval.c ohash_lookup_memory.c ohash_qlookup.c \
+   ohash_qlookupi.c
+
+tokenizer.o: parser.h
+
+CLEANFILES+=   parser.c parser.h tokenizer.o
 
 .include bsd.prog.mk

Modified: head/usr.bin/m4/eval.c
==
--- head/usr.bin/m4/eval.c  Mon Nov 28 13:30:14 2011(r228062)
+++ head/usr.bin/m4/eval.c  Mon Nov 28 13:32:39 2011(r228063)
@@ -1,4 +1,4 @@
-/* $OpenBSD: eval.c,v 1.44 2002/04/26 16:15:16 espie Exp $ */
+/* $OpenBSD: eval.c,v 1.69 2011/03/24 11:23:08 espie Exp $ */
 /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $  */
 
 /*
@@ -16,7 +16,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
@@ -33,19 +33,10 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#if 0
-static char sccsid[] = @(#)eval.c 8.2 (Berkeley) 4/27/95;
-#else
-#if 0
-static char rcsid[] = $OpenBSD: eval.c,v 1.44 2002/04/26 16:15:16 espie Exp 
$;
-#endif
-#endif
-#endif /* not lint */
-
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
+
 /*
  * eval.c
  * Facility: m4 macro processor
@@ -53,21 +44,21 @@ __FBSDID($FreeBSD$);
  */
 
 #include sys/types.h
+#include err.h
 #include errno.h
+#include limits.h
 #include unistd.h
+#include stdint.h
 #include stdio.h
 #include stdlib.h
 #include stddef.h
 #include string.h
 #include fcntl.h
-#include err.h
 #include mdef.h
 #include stdd.h
 #include extern.h
 #include pathnames.h
 
-#define BUILTIN_MARKER __builtin_
-
 static voiddodefn(const char *);
 static voiddopushdef(const char *, const char *);
 static voiddodump(const char *[], int);
@@ -75,10 +66,9 @@ static void  dotrace(const char *[], int,
 static voiddoifelse(const char *[], int);
 static int doincl(const char *);
 static int dopaste(const char *);
-static voidgnu_dochq(const char *[], int);
 static voiddochq(const char *[], int);
-static voidgnu_dochc(const char *[], int);
 

svn commit: r228064 - head/sys/mips/atheros

2011-11-28 Thread Aleksandr Rybalko
Author: ray
Date: Mon Nov 28 13:42:59 2011
New Revision: 228064
URL: http://svn.freebsd.org/changeset/base/228064

Log:
  Simplify arge_flush_ddr to use updated ar71xx_device_flush_ddr_ge(unit).
  
  Approved by: adrian (mentor)

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Mon Nov 28 13:32:39 2011
(r228063)
+++ head/sys/mips/atheros/if_arge.c Mon Nov 28 13:42:59 2011
(r228064)
@@ -191,10 +191,8 @@ MTX_SYSINIT(miibus_mtx, miibus_mtx, ar
 static void
 arge_flush_ddr(struct arge_softc *sc)
 {
-   if (sc-arge_mac_unit == 0)
-   ar71xx_device_flush_ddr_ge(0);
-   else
-   ar71xx_device_flush_ddr_ge(1);
+
+   ar71xx_device_flush_ddr_ge(sc-arge_mac_unit);
 }
 
 static int 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228065 - head/lib/libpam/modules/pam_unix

2011-11-28 Thread Max Khon
Author: fjoe
Date: Mon Nov 28 14:01:17 2011
New Revision: 228065
URL: http://svn.freebsd.org/changeset/base/228065

Log:
  .include bsd.init.mk instead of bsd.own.mk
  
  The former allows common settings from ../Makefile.inc to be used.

Modified:
  head/lib/libpam/modules/pam_unix/Makefile

Modified: head/lib/libpam/modules/pam_unix/Makefile
==
--- head/lib/libpam/modules/pam_unix/Makefile   Mon Nov 28 13:42:59 2011
(r228064)
+++ head/lib/libpam/modules/pam_unix/Makefile   Mon Nov 28 14:01:17 2011
(r228065)
@@ -34,9 +34,7 @@
 #
 # $FreeBSD$
 
-NO_PROFILE=
-NO_INSTALLLIB=
-.include bsd.own.mk
+.include bsd.init.mk
 
 LIB=   pam_unix
 SRCS=  pam_unix.c
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228066 - head/tools

2011-11-28 Thread Max Khon
Author: fjoe
Date: Mon Nov 28 14:03:36 2011
New Revision: 228066
URL: http://svn.freebsd.org/changeset/base/228066

Log:
  Add a comment that shows how to limit the build to the specific list of 
arches.

Modified:
  head/tools/tinder.sh

Modified: head/tools/tinder.sh
==
--- head/tools/tinder.shMon Nov 28 14:01:17 2011(r228065)
+++ head/tools/tinder.shMon Nov 28 14:03:36 2011(r228066)
@@ -37,6 +37,8 @@
 # sh tools/tinder.sh gnu/lib/libdialog usr.sbin/sade NO_CLEAN=yes
 #  # build libdialog and sade for all architectures
 #  # without making clean
+# sh tools/tinder.sh gnu/lib/libdialog usr.sbin/sade TARGETS=amd64 i386
+#  # build libdialog and sade only for amd64 and 
i386
 #
 
 if [ $# -eq 0 ]; then
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228068 - in head/contrib/gperf: . doc

2011-11-28 Thread Baptiste Daroussin
Author: bapt (ports committer)
Date: Mon Nov 28 14:23:09 2011
New Revision: 228068
URL: http://svn.freebsd.org/changeset/base/228068

Log:
  Reimport .texi and .texinfo necessary to build the info documentation.
  
  Reported by:  flo
  Approved by:  cognet

Added:
  head/contrib/gperf/doc/gperf.texi
  head/contrib/gperf/doc/gpl.texinfo
Modified:
  head/contrib/gperf/FREEBSD-Xlist

Modified: head/contrib/gperf/FREEBSD-Xlist
==
--- head/contrib/gperf/FREEBSD-XlistMon Nov 28 14:20:12 2011
(r228067)
+++ head/contrib/gperf/FREEBSD-XlistMon Nov 28 14:23:09 2011
(r228068)
@@ -8,7 +8,5 @@ $FreeBSD$
 */getopt*
 */*.pdf
 */*.vms
-*/*.texi
-*/*.texinfo
 */*.msvc
 */*.woe32

Added: head/contrib/gperf/doc/gperf.texi
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/gperf/doc/gperf.texi   Mon Nov 28 14:23:09 2011
(r228068)
@@ -0,0 +1,1370 @@
+\input texinfo @c -*- texinfo -*-
+@c %**start of header
+@setfilename gperf.info
+@settitle Perfect Hash Function Generator
+@c @setchapternewpage odd
+@c %**end of header
+
+@c some day we should @include version.texi instead of defining
+@c these values at hand.
+@set UPDATED 31 March 2007
+@set EDITION 3.0.3
+@set VERSION 3.0.3
+@c -
+
+@c remove the black boxes generated in the GPL appendix.
+@finalout
+
+@c Merge functions into the concept index
+@syncodeindex fn cp
+@c @synindex pg cp
+
+@dircategory Programming Tools
+@direntry
+* Gperf: (gperf).Perfect Hash Function Generator.
+@end direntry
+
+@ifinfo
+This file documents the features of the GNU Perfect Hash Function
+Generator @value{VERSION}.
+
+Copyright @copyright{} 1989-2006 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries a copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
+@end ignore
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided also that the
+section entitled ``GNU General Public License'' is included exactly as
+in the original, and provided that the entire resulting derived work is
+distributed under the terms of a permission notice identical to this
+one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that the section entitled ``GNU General Public License'' and this
+permission notice may be included in translations approved by the Free
+Software Foundation instead of in the original English.
+
+@end ifinfo
+
+@titlepage
+@title User's Guide to @code{gperf} @value{VERSION}
+@subtitle The GNU Perfect Hash Function Generator
+@subtitle Edition @value{EDITION}, @value{UPDATED}
+@author Douglas C. Schmidt
+@author Bruno Haible
+
+@page
+@vskip 0pt plus 1filll
+Copyright @copyright{} 1989-2007 Free Software Foundation, Inc.
+
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided also that the
+section entitled ``GNU General Public License'' is included
+exactly as in the original, and provided that the entire resulting
+derived work is distributed under the terms of a permission notice
+identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that the section entitled ``GNU General Public License'' may be
+included in a translation approved by the author instead of in the
+original English.
+@end titlepage
+
+@ifinfo
+@node Top, Copying, (dir), (dir)
+@top Introduction
+
+This manual documents the GNU @code{gperf} perfect hash function generator
+utility, focusing on its features and how to use them, and how to report
+bugs.
+
+@menu
+* Copying:: GNU @code{gperf} General Public License says
+how you can copy and share @code{gperf}.
+* Contributors::People who have contributed to @code{gperf}.
+* Motivation::  The purpose of @code{gperf}.
+* Search Structures::   Static search structures and GNU @code{gperf}
+* Description:: High-level discussion of how GPERF functions.
+* Options:: A description of 

svn commit: r228071 - head/sys/net

2011-11-28 Thread Gleb Smirnoff
Author: glebius
Date: Mon Nov 28 14:44:59 2011
New Revision: 228071
URL: http://svn.freebsd.org/changeset/base/228071

Log:
  - Use generic alloc_unr(9) allocator for if_clone, instead
of hand-made.
  - When registering new cloner, check whether a cloner with
same name already exist.
  - When allocating unit, also check with help of ifunit()
whether such interface already exist or not. [1]
  
  PR:   kern/162789 [1]

Modified:
  head/sys/net/if_clone.c
  head/sys/net/if_clone.h

Modified: head/sys/net/if_clone.c
==
--- head/sys/net/if_clone.c Mon Nov 28 14:39:56 2011(r228070)
+++ head/sys/net/if_clone.c Mon Nov 28 14:44:59 2011(r228071)
@@ -282,33 +282,34 @@ if_clone_destroyif(struct if_clone *ifc,
 /*
  * Register a network interface cloner.
  */
-void
+int
 if_clone_attach(struct if_clone *ifc)
 {
-   int len, maxclone;
+   struct if_clone *ifc1;
+
+   KASSERT(ifc-ifc_name != NULL, (%s: no name\n, __func__));
 
-   /*
-* Compute bitmap size and allocate it.
-*/
-   maxclone = ifc-ifc_maxunit + 1;
-   len = maxclone  3;
-   if ((len  3)  maxclone)
-   len++;
-   ifc-ifc_units = malloc(len, M_CLONE, M_WAITOK | M_ZERO);
-   ifc-ifc_bmlen = len;
IF_CLONE_LOCK_INIT(ifc);
IF_CLONE_ADDREF(ifc);
+   ifc-ifc_unrhdr = new_unrhdr(0, ifc-ifc_maxunit, ifc-ifc_mtx);
+   LIST_INIT(ifc-ifc_iflist);
 
IF_CLONERS_LOCK();
+   LIST_FOREACH(ifc1, V_if_cloners, ifc_list)
+   if (strcmp(ifc-ifc_name, ifc1-ifc_name) == 0) {
+   IF_CLONERS_UNLOCK();
+   IF_CLONE_REMREF(ifc);
+   return (EEXIST);
+   }
LIST_INSERT_HEAD(V_if_cloners, ifc, ifc_list);
V_if_cloners_count++;
IF_CLONERS_UNLOCK();
 
-   LIST_INIT(ifc-ifc_iflist);
-
if (ifc-ifc_attach != NULL)
(*ifc-ifc_attach)(ifc);
EVENTHANDLER_INVOKE(if_clone_event, ifc);
+
+   return (0);
 }
 
 /*
@@ -338,16 +339,12 @@ if_clone_detach(struct if_clone *ifc)
 static void
 if_clone_free(struct if_clone *ifc)
 {
-   for (int bytoff = 0; bytoff  ifc-ifc_bmlen; bytoff++) {
-   KASSERT(ifc-ifc_units[bytoff] == 0x00,
-   (ifc_units[%d] is not empty, bytoff));
-   }
 
KASSERT(LIST_EMPTY(ifc-ifc_iflist),
(%s: ifc_iflist not empty, __func__));
 
IF_CLONE_LOCK_DESTROY(ifc);
-   free(ifc-ifc_units, M_CLONE);
+   delete_unrhdr(ifc-ifc_unrhdr);
 }
 
 /*
@@ -441,73 +438,40 @@ ifc_name2unit(const char *name, int *uni
 int
 ifc_alloc_unit(struct if_clone *ifc, int *unit)
 {
-   int wildcard, bytoff, bitoff;
-   int err = 0;
-
-   IF_CLONE_LOCK(ifc);
+   char name[IFNAMSIZ];
+   int wildcard;
 
-   bytoff = bitoff = 0;
wildcard = (*unit  0);
-   /*
-* Find a free unit if none was given.
-*/
+retry:
if (wildcard) {
-   while ((bytoff  ifc-ifc_bmlen)
-(ifc-ifc_units[bytoff] == 0xff))
-   bytoff++;
-   if (bytoff = ifc-ifc_bmlen) {
-   err = ENOSPC;
-   goto done;
-   }
-   while ((ifc-ifc_units[bytoff]  (1  bitoff)) != 0)
-   bitoff++;
-   *unit = (bytoff  3) + bitoff;
-   }
-
-   if (*unit  ifc-ifc_maxunit) {
-   err = ENOSPC;
-   goto done;
+   *unit = alloc_unr(ifc-ifc_unrhdr);
+   if (*unit == -1)
+   return (ENOSPC);
+   } else {
+   *unit = alloc_unr_specific(ifc-ifc_unrhdr, *unit);
+   if (*unit == -1)
+   return (EEXIST);
}
 
-   if (!wildcard) {
-   bytoff = *unit  3;
-   bitoff = *unit - (bytoff  3);
+   snprintf(name, IFNAMSIZ, %s%d, ifc-ifc_name, *unit);
+   if (ifunit(name) != NULL) {
+   if (wildcard)
+   goto retry; /* XXXGL: yep, it's a unit leak */
+   else
+   return (EEXIST);
}
 
-   if((ifc-ifc_units[bytoff]  (1  bitoff)) != 0) {
-   err = EEXIST;
-   goto done;
-   }
-   /*
-* Allocate the unit in the bitmap.
-*/
-   KASSERT((ifc-ifc_units[bytoff]  (1  bitoff)) == 0,
-   (%s: bit is already set, __func__));
-   ifc-ifc_units[bytoff] |= (1  bitoff);
-   IF_CLONE_ADDREF_LOCKED(ifc);
+   IF_CLONE_ADDREF(ifc);
 
-done:
-   IF_CLONE_UNLOCK(ifc);
-   return (err);
+   return (0);
 }
 
 void
 ifc_free_unit(struct if_clone *ifc, int unit)
 {
-   int bytoff, bitoff;
-
 
-   /*
-* Compute offset in the bitmap and deallocate the unit.
-*/
-   bytoff = unit  3;
-   bitoff = unit - (bytoff  

svn commit: r228074 - head/rescue/rescue

2011-11-28 Thread Max Khon
Author: fjoe
Date: Mon Nov 28 15:44:04 2011
New Revision: 228074
URL: http://svn.freebsd.org/changeset/base/228074

Log:
  -lpthread is required by -lzfs so should be later in LIBS list.
  
  There were no undefined symbol pthread_xxx errors during the link before
  this fix only because of STATIC_LIB_REQUIRE() declarations in
  lib/libthr/thread/thr_init.c.

Modified:
  head/rescue/rescue/Makefile

Modified: head/rescue/rescue/Makefile
==
--- head/rescue/rescue/Makefile Mon Nov 28 15:09:31 2011(r228073)
+++ head/rescue/rescue/Makefile Mon Nov 28 15:44:04 2011(r228074)
@@ -123,7 +123,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld
 CRUNCH_LIBS+= -lipx
 .endif
 .if ${MK_ZFS} != no
-CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem
+CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem
 .endif
 CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228076 - head/sys/geom/part

2011-11-28 Thread Andrey V. Elsukov
Author: ae
Date: Mon Nov 28 16:07:26 2011
New Revision: 228076
URL: http://svn.freebsd.org/changeset/base/228076

Log:
  Add an ability to increase number of allocated APM entries when we
  have reserved free space in the APM area.
  Also instead of one write request per each APM entry, use MAXPHY
  sized writes when we are updating APM.
  
  MFC after:1 month

Modified:
  head/sys/geom/part/g_part_apm.c

Modified: head/sys/geom/part/g_part_apm.c
==
--- head/sys/geom/part/g_part_apm.c Mon Nov 28 15:56:55 2011
(r228075)
+++ head/sys/geom/part/g_part_apm.c Mon Nov 28 16:07:26 2011
(r228076)
@@ -234,6 +234,12 @@ g_part_apm_add(struct g_part_table *base
strncpy(entry-ent.ent_name, gpp-gpp_label,
sizeof(entry-ent.ent_name));
}
+   if (baseentry-gpe_index = table-self.ent_pmblkcnt)
+   table-self.ent_pmblkcnt = baseentry-gpe_index + 1;
+   KASSERT(table-self.ent_size = table-self.ent_pmblkcnt,
+   (%s, __func__));
+   KASSERT(table-self.ent_size  baseentry-gpe_index,
+   (%s, __func__));
return (0);
 }
 
@@ -445,7 +451,7 @@ g_part_apm_read(struct g_part_table *bas
 
basetable-gpt_first = table-self.ent_size + 1;
basetable-gpt_last = table-ddr.ddr_blkcount - 1;
-   basetable-gpt_entries = table-self.ent_pmblkcnt - 1;
+   basetable-gpt_entries = table-self.ent_size - 1;
 
for (index = table-self.ent_pmblkcnt - 1; index  0; index--) {
error = apm_read_ent(cp, index + 1, ent, table-tivo_series1);
@@ -497,67 +503,78 @@ g_part_apm_type(struct g_part_table *bas
 static int
 g_part_apm_write(struct g_part_table *basetable, struct g_consumer *cp)
 {
-   char buf[512];
+   struct g_provider *pp;
struct g_part_entry *baseentry;
struct g_part_apm_entry *entry;
struct g_part_apm_table *table;
-   int error, index;
+   char *buf, *ptr;
+   uint32_t index;
+   int error;
+   size_t tblsz;
 
+   pp = cp-provider;
table = (struct g_part_apm_table *)basetable;
/*
 * Tivo Series 1 disk partitions are currently read-only.
 */
if (table-tivo_series1)
return (EOPNOTSUPP);
-   bzero(buf, sizeof(buf));
 
-   /* Write the DDR and 'self' entry only when we're newly created. */
+   /* Write the DDR only when we're newly created. */
if (basetable-gpt_created) {
+   buf = g_malloc(pp-sectorsize, M_WAITOK | M_ZERO);
be16enc(buf, table-ddr.ddr_sig);
be16enc(buf + 2, table-ddr.ddr_blksize);
be32enc(buf + 4, table-ddr.ddr_blkcount);
-   error = g_write_data(cp, 0, buf, sizeof(buf));
+   error = g_write_data(cp, 0, buf, pp-sectorsize);
+   g_free(buf);
if (error)
return (error);
}
 
-   be16enc(buf, table-self.ent_sig);
-   be16enc(buf + 2, 0);
-   be32enc(buf + 4, table-self.ent_pmblkcnt);
+   /* Allocate the buffer for all entries */
+   tblsz = table-self.ent_pmblkcnt;
+   buf = g_malloc(tblsz * pp-sectorsize, M_WAITOK | M_ZERO);
 
-   if (basetable-gpt_created) {
-   be32enc(buf + 8, table-self.ent_start);
-   be32enc(buf + 12, table-self.ent_size);
-   bcopy(table-self.ent_name, buf + 16,
-   sizeof(table-self.ent_name));
-   bcopy(table-self.ent_type, buf + 48,
-   sizeof(table-self.ent_type));
-   error = g_write_data(cp, 512, buf, sizeof(buf));
-   if (error)
-   return (error);
-   }
+   /* Fill the self entry */
+   be16enc(buf, APM_ENT_SIG);
+   be32enc(buf + 4, table-self.ent_pmblkcnt);
+   be32enc(buf + 8, table-self.ent_start);
+   be32enc(buf + 12, table-self.ent_size);
+   bcopy(table-self.ent_name, buf + 16, sizeof(table-self.ent_name));
+   bcopy(table-self.ent_type, buf + 48, sizeof(table-self.ent_type));
 
baseentry = LIST_FIRST(basetable-gpt_entry);
-   for (index = 1; index = basetable-gpt_entries; index++) {
+   for (index = 1; index  tblsz; index++) {
entry = (baseentry != NULL  index == baseentry-gpe_index)
? (struct g_part_apm_entry *)baseentry : NULL;
+   ptr = buf + index * pp-sectorsize;
+   be16enc(ptr, APM_ENT_SIG);
+   be32enc(ptr + 4, table-self.ent_pmblkcnt);
if (entry != NULL  !baseentry-gpe_deleted) {
-   be32enc(buf + 8, entry-ent.ent_start);
-   be32enc(buf + 12, entry-ent.ent_size);
-   bcopy(entry-ent.ent_name, buf + 16,
+   be32enc(ptr + 8, entry-ent.ent_start);
+   be32enc(ptr + 12, entry-ent.ent_size);
+ 

svn commit: r228077 - head/share/man/man4

2011-11-28 Thread Philip Paeps
Author: philip
Date: Mon Nov 28 16:25:27 2011
New Revision: 228077
URL: http://svn.freebsd.org/changeset/base/228077

Log:
  Only install the sfxge(4) manpage on amd64, while the driver is amd64-only.
  
  Pointed out by:   bz

Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileMon Nov 28 16:07:26 2011
(r228076)
+++ head/share/man/man4/MakefileMon Nov 28 16:25:27 2011
(r228077)
@@ -378,7 +378,7 @@ MAN=aac.4 \
send.4 \
ses.4 \
sf.4 \
-   sfxge.4 \
+   ${_sfxge.4} \
sge.4 \
si.4 \
siba.4 \
@@ -718,6 +718,7 @@ MLINKS+=lindev.4 full.4
 
 .if ${MACHINE_CPUARCH} == amd64
 _qlxgb.4=  qlxgb.4
+_sfxge.4=  sfxge.4
 .endif
 
 .if ${MACHINE_CPUARCH} == powerpc
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r227999 - head/lib/libc/gen

2011-11-28 Thread John Baldwin
On Saturday, November 26, 2011 10:57:09 am David Chisnall wrote:
 Author: theraven
 Date: Sat Nov 26 15:57:09 2011
 New Revision: 227999
 URL: http://svn.freebsd.org/changeset/base/227999
 
 Log:
   Return not-implemented from pthread_once and pthread_key_create, rather
   than silently failing and returning success.
   
   Without this, code calls pthread_once(), receives a return value of
   success, and thinks that the passed function has been called.
   
   Approved by:dim (mentor)

Hmmm, is this really the best fix?

I really want pthread_once() to always work (see the hack I have to do with 
_once() in libc to workaround the fact that it doesn't now).  The current 
behavior exists to appease libstdc++ which uses a silently failing 
pthread_once() to figure out if it is linked against working threads.

If this is for libc++, can you provide some other way than abusing 
pthread_once() to determine this?  Ideally it would be as smart as libc and 
use __isthreaded in some fastion.

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


svn commit: r228078 - head/sys/dev/sfxge/common

2011-11-28 Thread Philip Paeps
Author: philip
Date: Mon Nov 28 17:19:05 2011
New Revision: 228078
URL: http://svn.freebsd.org/changeset/base/228078

Log:
  sfxge: Add $FreeBSD$ tags to common code files.
  
  Requested by: bz

Modified:
  head/sys/dev/sfxge/common/efsys.h
  head/sys/dev/sfxge/common/efx.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_bootcfg.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_ev.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_filter.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_intr.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mac.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mcdi.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mcdi.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mon.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_nic.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_nvram.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_phy.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_port.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs_ef10.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs_mcdi.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs_pci.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_rx.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_sram.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_tx.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_types.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_vpd.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_wol.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_flash.h   (contents, props changed)
  head/sys/dev/sfxge/common/siena_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/siena_mac.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_mon.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_nic.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_nvram.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_phy.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_sram.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_vpd.c   (contents, props changed)

Modified: head/sys/dev/sfxge/common/efsys.h
==
--- head/sys/dev/sfxge/common/efsys.h   Mon Nov 28 16:25:27 2011
(r228077)
+++ head/sys/dev/sfxge/common/efsys.h   Mon Nov 28 17:19:05 2011
(r228078)
@@ -25,14 +25,13 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 
 #ifndef_SYS_EFSYS_H
 #define_SYS_EFSYS_H
 
-#include sys/cdefs.h
-__FBSDID($FreeBSD$);
-
 #ifdef __cplusplus
 extern C {
 #endif

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Mon Nov 28 16:25:27 2011
(r228077)
+++ head/sys/dev/sfxge/common/efx.h Mon Nov 28 17:19:05 2011
(r228078)
@@ -21,6 +21,8 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 
 #ifndef_SYS_EFX_H

Modified: head/sys/dev/sfxge/common/efx_bootcfg.c
==
--- head/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 16:25:27 2011
(r228077)
+++ head/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 17:19:05 2011
(r228078)
@@ -23,6 +23,9 @@
  * SUCH DAMAGE.
  */
 
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
 #include efsys.h
 #include efx.h
 #include efx_types.h

Modified: head/sys/dev/sfxge/common/efx_ev.c
==
--- head/sys/dev/sfxge/common/efx_ev.c  Mon Nov 28 16:25:27 2011
(r228077)
+++ head/sys/dev/sfxge/common/efx_ev.c  Mon Nov 28 17:19:05 2011
(r228078)
@@ -23,6 +23,9 @@
  * SUCH DAMAGE.
  */
 
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
 #include efsys.h
 #include efx.h
 #include efx_types.h

Modified: head/sys/dev/sfxge/common/efx_filter.c
==
--- head/sys/dev/sfxge/common/efx_filter.c  Mon Nov 28 16:25:27 2011
(r228077)
+++ head/sys/dev/sfxge/common/efx_filter.c  Mon Nov 28 17:19:05 2011
(r228078)
@@ -23,6 +23,9 @@
  * SUCH DAMAGE.
  */
 
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
 #include efsys.h
 #include efx.h
 #include efx_types.h


Re: svn commit: r228071 - head/sys/net

2011-11-28 Thread Brooks Davis
On Mon, Nov 28, 2011 at 02:44:59PM +, Gleb Smirnoff wrote:
 Author: glebius
 Date: Mon Nov 28 14:44:59 2011
 New Revision: 228071
 URL: http://svn.freebsd.org/changeset/base/228071
 
 Log:
   - Use generic alloc_unr(9) allocator for if_clone, instead
 of hand-made.
   - When registering new cloner, check whether a cloner with
 same name already exist.
   - When allocating unit, also check with help of ifunit()
 whether such interface already exist or not. [1]

Thanks!  This was long over due.

-- Brooks


pgprFs7C40vdg.pgp
Description: PGP signature


svn commit: r228081 - head/tools/build/options

2011-11-28 Thread Dimitry Andric
Author: dim
Date: Mon Nov 28 17:54:34 2011
New Revision: 228081
URL: http://svn.freebsd.org/changeset/base/228081

Log:
  Under tools/build/options, add missing svn:keywords properties to
  WITH_OFED and WITHOUT_GPIO.

Modified:
Directory Properties:
  head/tools/build/options/WITHOUT_GPIO   (props changed)
  head/tools/build/options/WITH_OFED   (props changed)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228082 - head/tools/build/options

2011-11-28 Thread Dimitry Andric
Author: dim
Date: Mon Nov 28 17:56:46 2011
New Revision: 228082
URL: http://svn.freebsd.org/changeset/base/228082

Log:
  Add WITH_LIBCPLUSPLUS under tools/build/options; the knob itself was
  already added in a previous revision.

Added:
  head/tools/build/options/WITH_LIBCPLUSPLUS   (contents, props changed)

Added: head/tools/build/options/WITH_LIBCPLUSPLUS
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_LIBCPLUSPLUS  Mon Nov 28 17:56:46 2011
(r228082)
@@ -0,0 +1,2 @@
+.\ $FreeBSD$
+Set to build libcxxrt and libc++.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228083 - head/share/man/man5

2011-11-28 Thread Dimitry Andric
Author: dim
Date: Mon Nov 28 17:58:57 2011
New Revision: 228083
URL: http://svn.freebsd.org/changeset/base/228083

Log:
  Regenerate src.conf.5.

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Mon Nov 28 17:56:46 2011
(r228082)
+++ head/share/man/man5/src.conf.5  Mon Nov 28 17:58:57 2011
(r228083)
@@ -1,7 +1,7 @@
 .\ DO NOT EDIT-- this file is automatically generated.
 .\ from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z 
ru
 .\ $FreeBSD$
-.Dd June 17, 2011
+.Dd November 28, 2011
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -265,13 +265,13 @@ When set, it also enforces the following
 Set to not build the Clang C/C++ compiler.
 .Pp
 It is a default setting on
-arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, 
mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64 and sparc64/sparc64.
+arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, 
mips/mips64eb, mips/mipsn32eb and sparc64/sparc64.
 .It Va WITH_CLANG
 .\ from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 
11:14:40Z ru
 Set to build the Clang C/C++ compiler.
 .Pp
 It is a default setting on
-amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc.
+amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64.
 .It Va WITHOUT_CPP
 .\ from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 
07:50:50Z ru
 Set to not build
@@ -345,14 +345,14 @@ Set to not build Flattened Device Tree s
 This includes the device tree compiler (dtc) and libfdt support library.
 .Pp
 It is a default setting on
-amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, 
mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64 and sparc64/sparc64.
+amd64/amd64, i386/i386, ia64/ia64, pc98/i386 and sparc64/sparc64.
 .It Va WITH_FDT
 .\ from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 
11:14:40Z ru
 Set to build Flattened Device Tree support as part of the base system.
 This includes the device tree compiler (dtc) and libfdt support library.
 .Pp
 It is a default setting on
-arm/arm, arm/armeb and powerpc/powerpc.
+arm/arm, arm/armeb, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, 
mips/mipsn32eb, powerpc/powerpc and powerpc/powerpc64.
 .It Va WITHOUT_FLOPPY
 .\ from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 
19:13:03Z ru
 Set to not build or install programs
@@ -409,7 +409,7 @@ Set to build some programs without optio
 .\ from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 
07:50:50Z ru
 Set to not build GPIB bus support.
 .It Va WITHOUT_GPIO
-.\ from FreeBSD: head/tools/build/options/WITHOUT_GPIO 221541 2011-05-06 
19:14:06Z ru
+.\ from FreeBSD: head/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 
17:54:34Z dim
 Set to not build
 .Xr gpioctl 8
 as part of the base system.
@@ -563,6 +563,9 @@ and
 On amd64, set to not build 32-bit library set and a
 .Nm ld-elf32.so.1
 runtime linker.
+.It Va WITH_LIBCPLUSPLUS
+.\ from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 
17:56:46Z dim
+Set to build libcxxrt and libc++.
 .It Va WITHOUT_LIBPTHREAD
 .\ from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 
2009-02-20 11:09:55Z mtm
 Set to not build the
@@ -734,7 +737,7 @@ Set to not build
 .Xr ntpd 8
 and related programs.
 .It Va WITH_OFED
-.\ from FreeBSD: head/tools/build/options/WITH_OFED 222016 2011-05-17 
11:06:41Z ru
+.\ from FreeBSD: head/tools/build/options/WITH_OFED 228081 2011-11-28 
17:54:34Z dim
 Set to build the
 .Dq OpenFabrics Enterprise Distribution
 Infiniband software stack.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r227956 - head/usr.bin/procstat

2011-11-28 Thread John Baldwin
On Thursday, November 24, 2011 3:54:06 pm Mikolaj Golub wrote:
 Author: trociny
 Date: Thu Nov 24 20:54:06 2011
 New Revision: 227956
 URL: http://svn.freebsd.org/changeset/base/227956
 
 Log:
   usr.bin/procstat
   
   Add -l flag to display resource limits.
   
   PR: bin/161257
   Reviewed by:kib
   MFC after:  2 weeks

Thanks for doing this!  Did you consider making the procstat -l output use
pretty output similar to the output of /usr/bin/limits?  For example,
using infinity instead of -1 and using humanize_number() for finite limits
that are in units of bytes?

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


svn commit: r228084 - head/sys/dev/vr

2011-11-28 Thread Pyun YongHyeon
Author: yongari
Date: Mon Nov 28 18:32:35 2011
New Revision: 228084
URL: http://svn.freebsd.org/changeset/base/228084

Log:
  Reuse flag variable to represent driver internal states rather than
  using member variables in softc.
  While I'm here change media after setting IFF_DRV_RUNNING. This
  will remove unnecessary link state handling in vr_tick() if
  controller established a link immediately.

Modified:
  head/sys/dev/vr/if_vr.c
  head/sys/dev/vr/if_vrreg.h

Modified: head/sys/dev/vr/if_vr.c
==
--- head/sys/dev/vr/if_vr.c Mon Nov 28 17:58:57 2011(r228083)
+++ head/sys/dev/vr/if_vr.c Mon Nov 28 18:32:35 2011(r228084)
@@ -305,20 +305,20 @@ vr_miibus_statchg(device_t dev)
(ifp-if_drv_flags  IFF_DRV_RUNNING) == 0)
return;
 
-   sc-vr_link = 0;
+   sc-vr_flags = ~VR_F_LINK;
if ((mii-mii_media_status  (IFM_ACTIVE | IFM_AVALID)) ==
(IFM_ACTIVE | IFM_AVALID)) {
switch (IFM_SUBTYPE(mii-mii_media_active)) {
case IFM_10_T:
case IFM_100_TX:
-   sc-vr_link = 1;
+   sc-vr_flags |= VR_F_LINK;
break;
default:
break;
}
}
 
-   if (sc-vr_link != 0) {
+   if ((sc-vr_flags  VR_F_LINK) != 0) {
cr0 = CSR_READ_1(sc, VR_CR0);
cr1 = CSR_READ_1(sc, VR_CR1);
mfdx = (cr1  VR_CR1_FULLDUPLEX) != 0;
@@ -821,7 +821,7 @@ vr_detach(device_t dev)
/* These should only be active if attach succeeded. */
if (device_is_attached(dev)) {
VR_LOCK(sc);
-   sc-vr_detach = 1;
+   sc-vr_flags |= VR_F_DETACHED;
vr_stop(sc);
VR_UNLOCK(sc);
callout_drain(sc-vr_stat_callout);
@@ -1542,7 +1542,7 @@ vr_tick(void *xsc)
 
mii = device_get_softc(sc-vr_miibus);
mii_tick(mii);
-   if (sc-vr_link == 0)
+   if ((sc-vr_flags  VR_F_LINK) == 0)
vr_miibus_statchg(sc-vr_dev);
vr_watchdog(sc);
callout_reset(sc-vr_stat_callout, hz, vr_tick, sc);
@@ -1652,7 +1652,7 @@ vr_intr(void *arg)
 
VR_LOCK(sc);
 
-   if (sc-vr_suspended != 0)
+   if ((sc-vr_flags  VR_F_SUSPENDED) != 0)
goto done_locked;
 
status = CSR_READ_2(sc, VR_ISR);
@@ -1933,7 +1933,7 @@ vr_start_locked(struct ifnet *ifp)
VR_LOCK_ASSERT(sc);
 
if ((ifp-if_drv_flags  (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
-   IFF_DRV_RUNNING || sc-vr_link == 0)
+   IFF_DRV_RUNNING || (sc-vr_flags  VR_F_LINK) == 0)
return;
 
for (enq = 0; !IFQ_DRV_IS_EMPTY(ifp-if_snd) 
@@ -2103,12 +2103,12 @@ vr_init_locked(struct vr_softc *sc)
if (sc-vr_revid  REV_ID_VT6102_A)
CSR_WRITE_2(sc, VR_MII_IMR, 0);
 
-   sc-vr_link = 0;
-   mii_mediachg(mii);
-
ifp-if_drv_flags |= IFF_DRV_RUNNING;
ifp-if_drv_flags = ~IFF_DRV_OACTIVE;
 
+   sc-vr_flags = ~VR_F_LINK;
+   mii_mediachg(mii);
+
callout_reset(sc-vr_stat_callout, hz, vr_tick, sc);
 }
 
@@ -2177,7 +2177,7 @@ vr_ioctl(struct ifnet *ifp, u_long comma
(IFF_PROMISC | IFF_ALLMULTI))
vr_set_filter(sc);
} else {
-   if (sc-vr_detach == 0)
+   if ((sc-vr_flags  VR_F_DETACHED) == 0)
vr_init_locked(sc);
}
} else {
@@ -2265,7 +2265,7 @@ vr_watchdog(struct vr_softc *sc)
if (sc-vr_cdata.vr_tx_cnt == 0)
return;
 
-   if (sc-vr_link == 0) {
+   if ((sc-vr_flags  VR_F_LINK) == 0) {
if (bootverbose)
if_printf(sc-vr_ifp, watchdog timeout 
   (missed link)\n);
@@ -2443,7 +2443,7 @@ vr_suspend(device_t dev)
VR_LOCK(sc);
vr_stop(sc);
vr_setwol(sc);
-   sc-vr_suspended = 1;
+   sc-vr_flags |= VR_F_SUSPENDED;
VR_UNLOCK(sc);
 
return (0);
@@ -2464,7 +2464,7 @@ vr_resume(device_t dev)
if (ifp-if_flags  IFF_UP)
vr_init_locked(sc);
 
-   sc-vr_suspended = 0;
+   sc-vr_flags = ~VR_F_SUSPENDED;
VR_UNLOCK(sc);
 
return (0);

Modified: head/sys/dev/vr/if_vrreg.h
==
--- head/sys/dev/vr/if_vrreg.h  Mon Nov 28 17:58:57 2011(r228083)
+++ head/sys/dev/vr/if_vrreg.h  Mon Nov 28 18:32:35 2011(r228084)
@@ -720,20 +720,20 @@ struct vr_softc {
void*vr_intrhand;
device_tvr_miibus;
uint8_t vr_revid;   /* Rhine chip revision */
-   uint8_t

svn commit: r228085 - in head/sys: amd64/conf conf

2011-11-28 Thread Philip Paeps
Author: philip
Date: Mon Nov 28 18:51:40 2011
New Revision: 228085
URL: http://svn.freebsd.org/changeset/base/228085

Log:
  Limit building sfxge(4) in-kernel to amd64 for the time being.  We can put it
  back after I fix the breakages on some of our more exotic platforms.
  
  While here, add the driver to the amd64 NOTES, so it can be picked up in LINT
  builds.

Modified:
  head/sys/amd64/conf/NOTES
  head/sys/conf/files
  head/sys/conf/files.amd64

Modified: head/sys/amd64/conf/NOTES
==
--- head/sys/amd64/conf/NOTES   Mon Nov 28 18:32:35 2011(r228084)
+++ head/sys/amd64/conf/NOTES   Mon Nov 28 18:51:40 2011(r228085)
@@ -294,6 +294,7 @@ options DRM_DEBUG   # Include debug print
 #  Requires the mwl firmware module
 # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
 # nve: nVidia nForce MCP on-board Ethernet Networking
+# sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters
 # wpi: Intel 3945ABG Wireless LAN controller
 #  Requires the wpi firmware module
 
@@ -307,6 +308,7 @@ device  iwn
 device mwl
 device nfe
 device nve
+device sfxge
 device wpi
 
 # IEEE 802.11 adapter firmware modules

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Nov 28 18:32:35 2011(r228084)
+++ head/sys/conf/files Mon Nov 28 18:51:40 2011(r228085)
@@ -1674,37 +1674,6 @@ dev/scd/scd.coptional scd isa
 dev/scd/scd_isa.c  optional scd isa
 dev/sdhci/sdhci.c  optional sdhci pci
 dev/sf/if_sf.c optional sf pci
-dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci
-dev/sfxge/common/efx_ev.c  optional sfxge inet pci
-dev/sfxge/common/efx_filter.c  optional sfxge inet pci
-dev/sfxge/common/efx_intr.coptional sfxge inet pci
-dev/sfxge/common/efx_mac.c optional sfxge inet pci
-dev/sfxge/common/efx_mcdi.coptional sfxge inet pci
-dev/sfxge/common/efx_mon.c optional sfxge inet pci
-dev/sfxge/common/efx_nic.c optional sfxge inet pci
-dev/sfxge/common/efx_nvram.c   optional sfxge inet pci
-dev/sfxge/common/efx_phy.c optional sfxge inet pci
-dev/sfxge/common/efx_port.coptional sfxge inet pci
-dev/sfxge/common/efx_rx.c  optional sfxge inet pci
-dev/sfxge/common/efx_sram.coptional sfxge inet pci
-dev/sfxge/common/efx_tx.c  optional sfxge inet pci
-dev/sfxge/common/efx_vpd.c optional sfxge inet pci
-dev/sfxge/common/efx_wol.c optional sfxge inet pci
-dev/sfxge/common/siena_mac.c   optional sfxge inet pci
-dev/sfxge/common/siena_mon.c   optional sfxge inet pci
-dev/sfxge/common/siena_nic.c   optional sfxge inet pci
-dev/sfxge/common/siena_nvram.c optional sfxge inet pci
-dev/sfxge/common/siena_phy.c   optional sfxge inet pci
-dev/sfxge/common/siena_sram.c  optional sfxge inet pci
-dev/sfxge/common/siena_vpd.c   optional sfxge inet pci
-dev/sfxge/sfxge.c  optional sfxge inet pci
-dev/sfxge/sfxge_dma.c  optional sfxge inet pci
-dev/sfxge/sfxge_ev.c   optional sfxge inet pci
-dev/sfxge/sfxge_intr.c optional sfxge inet pci
-dev/sfxge/sfxge_mcdi.c optional sfxge inet pci
-dev/sfxge/sfxge_port.c optional sfxge inet pci
-dev/sfxge/sfxge_rx.c   optional sfxge inet pci
-dev/sfxge/sfxge_tx.c   optional sfxge inet pci
 dev/sge/if_sge.c   optional sge pci
 dev/si/si.coptional si
 dev/si/si2_z280.c  optional si

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Mon Nov 28 18:32:35 2011(r228084)
+++ head/sys/conf/files.amd64   Mon Nov 28 18:51:40 2011(r228085)
@@ -214,6 +214,37 @@ dev/qlxgb/qla_ioctl.c  optionalqlxgb pc
 dev/qlxgb/qla_isr.coptionalqlxgb pci
 dev/qlxgb/qla_misc.c   optionalqlxgb pci
 dev/qlxgb/qla_os.c optionalqlxgb pci
+dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci
+dev/sfxge/common/efx_ev.c  optional sfxge inet pci
+dev/sfxge/common/efx_filter.c  optional sfxge inet pci
+dev/sfxge/common/efx_intr.coptional sfxge inet pci
+dev/sfxge/common/efx_mac.c optional sfxge inet pci
+dev/sfxge/common/efx_mcdi.coptional sfxge inet pci
+dev/sfxge/common/efx_mon.c optional sfxge inet pci
+dev/sfxge/common/efx_nic.c optional sfxge inet pci
+dev/sfxge/common/efx_nvram.c   optional sfxge inet pci
+dev/sfxge/common/efx_phy.c optional sfxge inet pci
+dev/sfxge/common/efx_port.coptional sfxge inet pci
+dev/sfxge/common/efx_rx.c  optional sfxge inet pci
+dev/sfxge/common/efx_sram.coptional sfxge inet pci
+dev/sfxge/common/efx_tx.c  optional sfxge inet pci
+dev/sfxge/common/efx_vpd.c optional sfxge inet pci

svn commit: r228086 - head/sys/dev/vr

2011-11-28 Thread Pyun YongHyeon
Author: yongari
Date: Mon Nov 28 19:03:59 2011
New Revision: 228086
URL: http://svn.freebsd.org/changeset/base/228086

Log:
  Announce flow control capability to PHY drivers and enable flow
  control for all vr(4) controllers that support it.  It's known that
  old vr(4) controllers(Rhine II) does not support TX pause but Rhine
  III supports both TX and RX pause.
  Make TX pause really work on Rhine III by letting controller know
  available RX buffers.
  While here, adjust XON/XOFF parameters to get better performance
  with flow control.

Modified:
  head/sys/dev/vr/if_vr.c
  head/sys/dev/vr/if_vrreg.h

Modified: head/sys/dev/vr/if_vr.c
==
--- head/sys/dev/vr/if_vr.c Mon Nov 28 18:51:40 2011(r228085)
+++ head/sys/dev/vr/if_vr.c Mon Nov 28 19:03:59 2011(r228086)
@@ -305,7 +305,7 @@ vr_miibus_statchg(device_t dev)
(ifp-if_drv_flags  IFF_DRV_RUNNING) == 0)
return;
 
-   sc-vr_flags = ~VR_F_LINK;
+   sc-vr_flags = ~(VR_F_LINK | VR_F_TXPAUSE);
if ((mii-mii_media_status  (IFM_ACTIVE | IFM_AVALID)) ==
(IFM_ACTIVE | IFM_AVALID)) {
switch (IFM_SUBTYPE(mii-mii_media_active)) {
@@ -342,7 +342,6 @@ vr_miibus_statchg(device_t dev)
CSR_WRITE_1(sc, VR_CR1, cr1);
}
fc = 0;
-#ifdef notyet
/* Configure flow-control. */
if (sc-vr_revid = REV_ID_VT6105_A0) {
fc = CSR_READ_1(sc, VR_FLOWCR1);
@@ -351,8 +350,10 @@ vr_miibus_statchg(device_t dev)
IFM_ETH_RXPAUSE) != 0)
fc |= VR_FLOWCR1_RXPAUSE;
if ((IFM_OPTIONS(mii-mii_media_active) 
-   IFM_ETH_TXPAUSE) != 0)
+   IFM_ETH_TXPAUSE) != 0) {
fc |= VR_FLOWCR1_TXPAUSE;
+   sc-vr_flags |= VR_F_TXPAUSE;
+   }
CSR_WRITE_1(sc, VR_FLOWCR1, fc);
} else if (sc-vr_revid = REV_ID_VT6102_A) {
/* No Tx puase capability available for Rhine II. */
@@ -363,7 +364,6 @@ vr_miibus_statchg(device_t dev)
fc |= VR_MISCCR0_RXPAUSE;
CSR_WRITE_1(sc, VR_MISC_CR0, fc);
}
-#endif
vr_rx_start(sc);
vr_tx_start(sc);
} else {
@@ -766,7 +766,8 @@ vr_attach(device_t dev)
else
phy = CSR_READ_1(sc, VR_PHYADDR)  VR_PHYADDR_MASK;
error = mii_attach(dev, sc-vr_miibus, ifp, vr_ifmedia_upd,
-   vr_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0);
+   vr_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY,
+   sc-vr_revid = REV_ID_VT6102_A ? MIIF_DOPAUSE : 0);
if (error != 0) {
device_printf(dev, attaching PHYs failed\n);
goto fail;
@@ -1396,6 +1397,17 @@ vr_rxeof(struct vr_softc *sc)
}
 
if (prog  0) {
+   /*
+* Let controller know how many number of RX buffers
+* are posted but avoid expensive register access if
+* TX pause capability was not negotiated with link
+* partner.
+*/
+   if ((sc-vr_flags  VR_F_TXPAUSE) != 0) {
+   if (prog = VR_RX_RING_CNT)
+   prog = VR_RX_RING_CNT - 1;
+   CSR_WRITE_1(sc, VR_FLOWCR0, prog);
+   }
sc-vr_cdata.vr_rx_cons = cons;
bus_dmamap_sync(sc-vr_cdata.vr_rx_ring_tag,
sc-vr_cdata.vr_rx_ring_map,
@@ -2071,14 +2083,32 @@ vr_init_locked(struct vr_softc *sc)
 
/* Set flow-control parameters for Rhine III. */
if (sc-vr_revid = REV_ID_VT6105_A0) {
-   /* Rx buffer count available for incoming packet. */
-   CSR_WRITE_1(sc, VR_FLOWCR0, VR_RX_RING_CNT);
/*
-* Tx pause low threshold : 16 free receive buffers
-* Tx pause XON high threshold : 48 free receive buffers
+* Configure Rx buffer count available for incoming
+* packet.
+* Even though data sheet says almost nothing about
+* this register, this register should be updated
+* whenever driver adds new RX buffers to controller.
+* Otherwise, XON frame is not sent to link partner
+* even if controller has enough RX buffers and you
+* would be isolated from network.
+* The controller is not smart enough to know number
+* of available RX buffers so driver have to let
+* controller know how many RX buffers are posted.
+* In other words, this register works like a 

svn commit: r228088 - head/sys/mips/cavium

2011-11-28 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Nov 28 19:28:29 2011
New Revision: 228088
URL: http://svn.freebsd.org/changeset/base/228088

Log:
  - Copy base MAC address from bootinfo descriptor to sysinfo struct
  
  Reviewed by:  Andrew Duane

Modified:
  head/sys/mips/cavium/octeon_machdep.c

Modified: head/sys/mips/cavium/octeon_machdep.c
==
--- head/sys/mips/cavium/octeon_machdep.c   Mon Nov 28 19:14:38 2011
(r228087)
+++ head/sys/mips/cavium/octeon_machdep.c   Mon Nov 28 19:28:29 2011
(r228088)
@@ -569,6 +569,8 @@ octeon_process_app_desc_ver_6(void)
octeon_bootinfo-board_rev_major,
octeon_bootinfo-board_rev_minor,
octeon_bootinfo-eclock_hz);
+   memcpy(cvmx_sysinfo_get()-mac_addr_base, 
octeon_bootinfo-mac_addr_base, 6);
+   cvmx_sysinfo_get()-mac_addr_count = octeon_bootinfo-mac_addr_count;
 }
 
 static void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228089 - head/sys/net

2011-11-28 Thread John Baldwin
Author: jhb
Date: Mon Nov 28 19:35:08 2011
New Revision: 228089
URL: http://svn.freebsd.org/changeset/base/228089

Log:
  Change the if_vlan driver to use if_transmit for forwarding packets to the
  parent interface.  This avoids the overhead of queueing a packet to an IFQ
  only to immediately dequeue it again.
  
  Suggested by: np
  Reviewed by:  brooks
  MFC after:1 month

Modified:
  head/sys/net/if_vlan.c

Modified: head/sys/net/if_vlan.c
==
--- head/sys/net/if_vlan.c  Mon Nov 28 19:28:29 2011(r228088)
+++ head/sys/net/if_vlan.c  Mon Nov 28 19:35:08 2011(r228089)
@@ -34,9 +34,8 @@
  * we need to pretend to be enough of an Ethernet implementation
  * to make arp work.  The way we do this is by telling everyone
  * that we are an Ethernet, and then catch the packets that
- * ether_output() left on our output queue when it calls
- * if_start(), rewrite them for use by the real outgoing interface,
- * and ask it to send them.
+ * ether_output() sends to us via if_transmit(), rewrite them for
+ * use by the real outgoing interface, and ask it to send them.
  */
 
 #include sys/cdefs.h
@@ -183,14 +182,15 @@ static __inline struct ifvlan * vlan_get
 #endif
 static void trunk_destroy(struct ifvlantrunk *trunk);
 
-static void vlan_start(struct ifnet *ifp);
 static void vlan_init(void *foo);
 static void vlan_input(struct ifnet *ifp, struct mbuf *m);
 static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
+static void vlan_qflush(struct ifnet *ifp);
 static int vlan_setflag(struct ifnet *ifp, int flag, int status,
 int (*func)(struct ifnet *, int));
 static int vlan_setflags(struct ifnet *ifp, int status);
 static int vlan_setmulti(struct ifnet *ifp);
+static int vlan_transmit(struct ifnet *ifp, struct mbuf *m);
 static void vlan_unconfig(struct ifnet *ifp);
 static void vlan_unconfig_locked(struct ifnet *ifp);
 static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag);
@@ -944,9 +944,9 @@ vlan_clone_create(struct if_clone *ifc, 
/* NB: mtu is not set here */
 
ifp-if_init = vlan_init;
-   ifp-if_start = vlan_start;
+   ifp-if_transmit = vlan_transmit;
+   ifp-if_qflush = vlan_qflush;
ifp-if_ioctl = vlan_ioctl;
-   ifp-if_snd.ifq_maxlen = ifqmaxlen;
ifp-if_flags = VLAN_IFFLAGS;
ether_ifattach(ifp, eaddr);
/* Now undo some of the damage... */
@@ -1005,99 +1005,95 @@ vlan_init(void *foo __unused)
 }
 
 /*
- * The if_start method for vlan(4) interface. It doesn't
- * raises the IFF_DRV_OACTIVE flag, since it is called
- * only from IFQ_HANDOFF() macro in ether_output_frame().
- * If the interface queue is full, and vlan_start() is
- * not called, the queue would never get emptied and
- * interface would stall forever.
+ * The if_transmit method for vlan(4) interface.
  */
-static void
-vlan_start(struct ifnet *ifp)
+static int
+vlan_transmit(struct ifnet *ifp, struct mbuf *m)
 {
struct ifvlan *ifv;
struct ifnet *p;
-   struct mbuf *m;
int error;
 
ifv = ifp-if_softc;
p = PARENT(ifv);
 
-   for (;;) {
-   IF_DEQUEUE(ifp-if_snd, m);
-   if (m == NULL)
-   break;
-   BPF_MTAP(ifp, m);
+   BPF_MTAP(ifp, m);
 
-   /*
-* Do not run parent's if_start() if the parent is not up,
-* or parent's driver will cause a system crash.
-*/
-   if (!UP_AND_RUNNING(p)) {
-   m_freem(m);
-   ifp-if_collisions++;
-   continue;
-   }
+   /*
+* Do not run parent's if_transmit() if the parent is not up,
+* or parent's driver will cause a system crash.
+*/
+   if (!UP_AND_RUNNING(p)) {
+   m_freem(m);
+   ifp-if_collisions++;
+   return (0);
+   }
 
-   /*
-* Pad the frame to the minimum size allowed if told to.
-* This option is in accord with IEEE Std 802.1Q, 2003 Ed.,
-* paragraph C.4.4.3.b.  It can help to work around buggy
-* bridges that violate paragraph C.4.4.3.a from the same
-* document, i.e., fail to pad short frames after untagging.
-* E.g., a tagged frame 66 bytes long (incl. FCS) is OK, but
-* untagging it will produce a 62-byte frame, which is a runt
-* and requires padding.  There are VLAN-enabled network
-* devices that just discard such runts instead or mishandle
-* them somehow.
-*/
-   if (soft_pad  p-if_type == IFT_ETHER) {
-   static char pad[8]; /* just zeros */
-   int n;
-
-   for (n = ETHERMIN + ETHER_HDR_LEN - m-m_pkthdr.len;
-  

svn commit: r228090 - head/usr.bin/procstat

2011-11-28 Thread Mikolaj Golub
Author: trociny
Date: Mon Nov 28 19:45:47 2011
New Revision: 228090
URL: http://svn.freebsd.org/changeset/base/228090

Log:
  Update SYNOPSIS to include the flags added recently.
  
  Spotted by:   jhb

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

Modified: head/usr.bin/procstat/procstat.1
==
--- head/usr.bin/procstat/procstat.1Mon Nov 28 19:35:08 2011
(r228089)
+++ head/usr.bin/procstat/procstat.1Mon Nov 28 19:45:47 2011
(r228090)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd November 24, 2011
+.Dd November 28, 2011
 .Dt PROCSTAT 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Op Fl n
 .Op Fl C
 .Op Fl w Ar interval
-.Op Fl b | c | f | i | j | k | s | t | v
+.Op Fl b | c | e | f | i | j | k | l | s | t | v | x
 .Op Fl a | Ar pid ...
 .Sh DESCRIPTION
 The
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228091 - head/sys/mips/mips

2011-11-28 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Nov 28 19:48:04 2011
New Revision: 228091
URL: http://svn.freebsd.org/changeset/base/228091

Log:
  - Fix backtrace for MIPS64 platform

Modified:
  head/sys/mips/mips/db_trace.c

Modified: head/sys/mips/mips/db_trace.c
==
--- head/sys/mips/mips/db_trace.c   Mon Nov 28 19:45:47 2011
(r228090)
+++ head/sys/mips/mips/db_trace.c   Mon Nov 28 19:48:04 2011
(r228091)
@@ -30,7 +30,7 @@ extern char edata[];
 
 /*
  * A function using a stack frame has the following instruction as the first
- * one: addiu sp,sp,-frame_size
+ * one: [d]addiu sp,sp,-frame_size
  *
  * We make use of this to detect starting address of a function. This works
  * better than using 'j ra' instruction to signify end of the previous
@@ -39,7 +39,8 @@ extern char edata[];
  *
  * XXX the abi does not require that the addiu instruction be the first one.
  */
-#defineMIPS_START_OF_FUNCTION(ins) (((ins)  0x8000) == 
0x27bd8000)
+#defineMIPS_START_OF_FUNCTION(ins) ins)  0x8000) == 
0x27bd8000) \
+   || (((ins)  0x8000) == 0x67bd8000))
 
 /*
  * MIPS ABI 3.0 requires that all functions return using the 'j ra' instruction
@@ -329,6 +330,8 @@ loop:
 
case OP_ADDI:
case OP_ADDIU:
+   case OP_DADDI:
+   case OP_DADDIU:
/* look for stack pointer adjustment */
if (i.IType.rs != 29 || i.IType.rt != 29)
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r227956 - head/usr.bin/procstat

2011-11-28 Thread Mikolaj Golub

On Mon, 28 Nov 2011 13:30:11 -0500 John Baldwin wrote:

 JB On Thursday, November 24, 2011 3:54:06 pm Mikolaj Golub wrote:
  Author: trociny
  Date: Thu Nov 24 20:54:06 2011
  New Revision: 227956
  URL: http://svn.freebsd.org/changeset/base/227956
  
  Log:
usr.bin/procstat

Add -l flag to display resource limits.

PR:bin/161257
Reviewed by:kib
MFC after:2 weeks

 JB Thanks for doing this!  Did you consider making the procstat -l output use
 JB pretty output similar to the output of /usr/bin/limits?  For example,
 JB using infinity instead of -1 and using humanize_number() for finite 
limits
 JB that are in units of bytes?

Looks like a good idea. I used procfs output as a reference but limits(1)
looks prettier :-). Will do.

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


Re: svn commit: r228021 - head/sys/conf

2011-11-28 Thread Bjoern A. Zeeb
On 27. Nov 2011, at 13:53 , Jaakko Heinonen wrote:

 Author: jh
 Date: Sun Nov 27 13:53:36 2011
 New Revision: 228021
 URL: http://svn.freebsd.org/changeset/base/228021
 
 Log:
  Add LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target.
  This was missed in r221353.
 

Thanks!

 Modified:
  head/sys/conf/makeLINT.mk
 
 Modified: head/sys/conf/makeLINT.mk
 ==
 --- head/sys/conf/makeLINT.mk Sun Nov 27 11:46:09 2011(r228020)
 +++ head/sys/conf/makeLINT.mk Sun Nov 27 13:53:36 2011(r228021)
 @@ -6,7 +6,7 @@ all:
 clean:
   rm -f LINT
 .if ${TARGET} == amd64 || ${TARGET} == i386
 - rm -f LINT-VIMAGE
 + rm -f LINT-VIMAGE LINT-NOINET LINT-NOINET6 LINT-NOIP
 .endif
 
 NOTES=../../conf/NOTES NOTES

-- 
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.

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


svn commit: r228093 - head/usr.bin/grep

2011-11-28 Thread Gabor Kovesdan
Author: gabor
Date: Mon Nov 28 20:00:31 2011
New Revision: 228093
URL: http://svn.freebsd.org/changeset/base/228093

Log:
  - Fix behavior of --null to match GNU grep
  
  PR:   bin/162906
  Submitted by: Jan Beich jbe...@tormail.net
  MFC after:3 days

Modified:
  head/usr.bin/grep/util.c

Modified: head/usr.bin/grep/util.c
==
--- head/usr.bin/grep/util.cMon Nov 28 19:53:16 2011(r228092)
+++ head/usr.bin/grep/util.cMon Nov 28 20:00:31 2011(r228093)
@@ -246,9 +246,9 @@ procfile(const char *fn)
printf(%u\n, c);
}
if (lflag  !qflag  c != 0)
-   printf(%s\n, fn);
+   printf(%s%c, fn, nullflag ? 0 : '\n');
if (Lflag  !qflag  c == 0)
-   printf(%s\n, fn);
+   printf(%s%c, fn, nullflag ? 0 : '\n');
if (c  !cflag  !lflag  !Lflag 
binbehave == BINFILE_BIN  f-binary  !qflag)
printf(getstr(8), fn);
@@ -440,13 +440,13 @@ printline(struct str *line, int sep, reg
int i, n = 0;
 
if (!hflag) {
-   if (nullflag == 0)
+   if (!nullflag) {
fputs(line-file, stdout);
-   else {
+   ++n;
+   } else {
printf(%s, line-file);
putchar(0);
}
-   ++n;
}
if (nflag) {
if (n  0)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228097 - head/usr.bin/grep

2011-11-28 Thread Gabor Kovesdan
Author: gabor
Date: Mon Nov 28 20:04:26 2011
New Revision: 228097
URL: http://svn.freebsd.org/changeset/base/228097

Log:
  - Call warnx() instead of errx() if a directory is not readable when using
a recursive search.  This is the expected behavior instead of aborting.
  
  PR:   bin/162907
  Submitted by: Jan Beich jbe...@tormail.net
  MFC after:3 days

Modified:
  head/usr.bin/grep/util.c

Modified: head/usr.bin/grep/util.c
==
--- head/usr.bin/grep/util.cMon Nov 28 20:03:33 2011(r228096)
+++ head/usr.bin/grep/util.cMon Nov 28 20:04:26 2011(r228097)
@@ -130,7 +130,9 @@ grep_tree(char **argv)
case FTS_DNR:
/* FALLTHROUGH */
case FTS_ERR:
-   errx(2, %s: %s, p-fts_path, strerror(p-fts_errno));
+   notfound = true;
+   if(!sflag)
+   warnx(%s: %s, p-fts_path, 
strerror(p-fts_errno));
break;
case FTS_D:
/* FALLTHROUGH */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r227778 - head/sys/net

2011-11-28 Thread John Baldwin
On Wednesday, November 23, 2011 2:37:05 am Lawrence Stewart wrote:
 On 11/23/11 17:42, Julien Ridoux wrote:
 
  On 23/11/2011, at 1:00 AM, Lawrence Stewart wrote:
 
  On 11/23/11 00:30, John Baldwin wrote:
  Think of standalone modules that are not built as part of a
  kernel (e.g. 3rd party device drivers).  In general we should
  avoid having structures change size for kernel options,
  especially common structures.  It just adds lots of pain and
  suffering and complexity.  We are stuck with it for PAE on i386
  (which causes pain), and for LOCK_PROFILING (but that is
  sufficiently rare and expensive it seems to be ok).  I think 8
  bytes for bpf packet is not sufficiently expensive to justify the
  extra headache.  Just always leave the new field in.
 
  hmm... Julien almost has a patch finished which accomplishes what
  my most recent email in this thread describes. Julien, I suggest we
  get it finished and follow up to this thread with a pointer to the
  patch for people to look at. If there's still a strong feeling that
  what it does is going to bring pain we can do away with the new
  BPF_FFCOUNTER config option and have the bpf header struct just
  grow by 8 bytes.
 
  Stay tuned...
 
  Thanks all for the feedback. With some delay, I have a patch against
  r227871 that implements what Lawrence proposed. You can find it
  here:
  http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/ffclock-bpf-header-
r227871.patch
 
 There are a few nits, but the patch implements what I envisaged, thanks 
 Julien.
 
   I have tested this under a few typical scenario, it works as
  expected but already brings some headaches (hence the long delay
  mentioned above :-)).
 
  I thought a bit more of user cases. I believe many of them call for
  having both feed-forward counter and its conversion in second be
  present in the BPF header. For example, this allows to have absolute
  packet departure/arrival times (as per usual), but also provides the
  opportunity to compute inter-arrival times accurately using the
  difference clock. There are other examples I can think of, and if one
  believe the feed-forward clock approach becomes more popular, such
  usages will be more and more common.
 
  Assuming the BPF header grows by 8 bytes independent of any kernel
  option, I admit that the current implementation is a bit ugly. The
  BPF structure is not nicely packed and looks clunky. Ideally, the
  feed-forward counter should be placed just below the bh_tstamp
  member, but this would require libpcap and all ports depending on it
  to be recompiled after this change.
 
 Even though it looks a bit gross, we would still add it at the end to 
 avoid gratuitously breaking binaries. We would then also add some 
 explicit padding in the struct to soak up the redundant space left in 
 between it and the second last struct member.

If this is not something you expect to MFC, then I would just add it
where it makes the most sense.  One question I have is if this affects
the file format of what tcpdump -w writes out and tcpdump -r reads in?
If that is affected then changing this will need much more thought.  If
not, then I think it should be fixed right in 10.  If you need to MFC
it then you may need to do some gymnatics to preserve the ABI in stable
branches, but we prefer to keep HEAD clean so we don't build up layer
upon layer of compat hacks.

  What is your favourite option?
 
 FreeBSD parlance is to ask what colour you would like to paint the 
 bikeshed ;)
 
 As I've never experienced the pain John refers to, I'll defer to the 
 wisdom of others on whether the proposed patch will create pain down the 
 road. I think it's ok, but if consensus is 8bytes per packet isn't going 
 to break the bank, I guess we just go for it - but I guess I am cautious 
 about this route as we can push a lot of packets per second through the 
 stack.

In my limited experience the limit on pushing pps through bpf(4) isn't due
to the size of the bpf packet header itself but has more to do with disk
I/O transactions, etc.

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


svn commit: r228099 - head/usr.bin/grep

2011-11-28 Thread Gabor Kovesdan
Author: gabor
Date: Mon Nov 28 20:16:55 2011
New Revision: 228099
URL: http://svn.freebsd.org/changeset/base/228099

Log:
  - Create links to the xz and lzma versions even if BSD grep is not the
default. Nor GNU nor liblzma in base provides such functionality so
it may be useful.
  
  MFC after:3 days

Modified:
  head/usr.bin/grep/Makefile

Modified: head/usr.bin/grep/Makefile
==
--- head/usr.bin/grep/Makefile  Mon Nov 28 20:08:19 2011(r228098)
+++ head/usr.bin/grep/Makefile  Mon Nov 28 20:16:55 2011(r228099)
@@ -25,13 +25,7 @@ LINKS=   ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep \
${BINDIR}/grep ${BINDIR}/zgrep \
${BINDIR}/grep ${BINDIR}/zegrep \
-   ${BINDIR}/grep ${BINDIR}/zfgrep \
-   ${BINDIR}/grep ${BINDIR}/xzgrep \
-   ${BINDIR}/grep ${BINDIR}/xzegrep \
-   ${BINDIR}/grep ${BINDIR}/xzfgrep \
-   ${BINDIR}/grep ${BINDIR}/lzgrep \
-   ${BINDIR}/grep ${BINDIR}/lzegrep \
-   ${BINDIR}/grep ${BINDIR}/lzfgrep
+   ${BINDIR}/grep ${BINDIR}/zfgrep
 
 MLINKS= grep.1 egrep.1 \
grep.1 fgrep.1 \
@@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \
grep.1 lzfgrep.1
 .endif
 
+LINKS+=${BINDIR}/${PROG} ${BINDIR}/xzgrep \
+   ${BINDIR}/${PROG} ${BINDIR}/xzegrep \
+   ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \
+   ${BINDIR}/${PROG} ${BINDIR}/lzgrep \
+   ${BINDIR}/${PROG} ${BINDIR}/lzegrep \
+   ${BINDIR}/${PROG} ${BINDIR}/lzfgrep
+
 LDADD= -lz -llzma
 DPADD= ${LIBZ} ${LIBLZMA}
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228099 - head/usr.bin/grep

2011-11-28 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 11/28/11 12:16, Gabor Kovesdan wrote:
 Author: gabor Date: Mon Nov 28 20:16:55 2011 New Revision: 228099 
 URL: http://svn.freebsd.org/changeset/base/228099
 
 Log: - Create links to the xz and lzma versions even if BSD grep is
 not the default. Nor GNU nor liblzma in base provides such
 functionality so it may be useful.

This is useful but could be confusing since xzgrep's behavior could be
different from zgrep.

Another topic would be ObsoleteFiles.inc (or
OptionalObsoleteFiles.inc) needs to be updated for this as well.

Cheers,
- -- 
Xin LI delp...@delphij.nethttps://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBCAAGBQJO0+2DAAoJEATO+BI/yjfBdY8H/j06mWzfsQYqXLLTA8T2G7kj
fo9VqE3FrdZ43kuaSV+IsZOuXGJHA9ttSCuvbByq9VhD3n0Ybr3XyB032B5FuoIg
yLGSQe1olsStAvMaYCfMdxEyjptMsxFbOhtGN1p3Whb69HT6Hp58SlEiQ//LUgdW
oCAJagbDg3pUsYP/qCehharT2X4EaE2m0aqXc/FPOXUWLOZ/8+nnkbBz8BO0D6Gj
pMrVNFt+42py4K+g7pYhfbY6iv6KXhs00M5KCRDQs/aPZmDcqLGf01XAmaJUMgUY
qoCVCg9naP26oYNgQHLlUrE72EY9q4zK+s9B502f4PPoxrUxp28n1Hc8lce5Y3U=
=XzVB
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228071 - head/sys/net

2011-11-28 Thread Jaakko Heinonen
On 2011-11-28, Bjoern A. Zeeb wrote:
  static void
  if_clone_free(struct if_clone *ifc)
  {
  -   for (int bytoff = 0; bytoff  ifc-ifc_bmlen; bytoff++) {
  -   KASSERT(ifc-ifc_units[bytoff] == 0x00,
  -   (ifc_units[%d] is not empty, bytoff));
  -   }
  
  KASSERT(LIST_EMPTY(ifc-ifc_iflist),
  (%s: ifc_iflist not empty, __func__));
  
  IF_CLONE_LOCK_DESTROY(ifc);
  -   free(ifc-ifc_units, M_CLONE);
  +   delete_unrhdr(ifc-ifc_unrhdr);
  }

delete_unrhdr() KASSERTs that all allocations has been freed. Thus if
the leak below has occurred, the result will be a panic at this point
with INVARIANTS enabled kernel. If INVARIANTS is disabled, a memory leak
is possible.

  +   snprintf(name, IFNAMSIZ, %s%d, ifc-ifc_name, *unit);
  +   if (ifunit(name) != NULL) {
  +   if (wildcard)
  +   goto retry; /* XXXGL: yep, it's a unit leak */
  +   else
  +   return (EEXIST);

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


svn commit: r228102 - head/sys/netinet

2011-11-28 Thread Michael Tuexen
Author: tuexen
Date: Mon Nov 28 20:48:35 2011
New Revision: 228102
URL: http://svn.freebsd.org/changeset/base/228102

Log:
  Remove debug code.
  
  MFC after: 1 month.

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==
--- head/sys/netinet/sctp_pcb.c Mon Nov 28 20:43:50 2011(r228101)
+++ head/sys/netinet/sctp_pcb.c Mon Nov 28 20:48:35 2011(r228102)
@@ -6895,11 +6895,6 @@ skip_vtag_check:
return (1);
 }
 
-
-static sctp_assoc_t reneged_asoc_ids[256];
-static uint8_t reneged_at = 0;
-
-
 static void
 sctp_drain_mbufs(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
 {
@@ -7004,8 +6999,6 @@ sctp_drain_mbufs(struct sctp_inpcb *inp,
/* sa_ignore NO_NULL_CHK */
sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED);
sctp_chunk_output(stcb-sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, 
SCTP_SO_NOT_LOCKED);
-   reneged_asoc_ids[reneged_at] = sctp_get_associd(stcb);
-   reneged_at++;
}
/*
 * Another issue, in un-setting the TSN's in the mapping array we
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228103 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/lib/libzfs sys/...

2011-11-28 Thread Martin Matuska
Author: mm
Date: Mon Nov 28 21:40:00 2011
New Revision: 228103
URL: http://svn.freebsd.org/changeset/base/228103

Log:
  Merge new ZFS features from illumos:
  
  1644 add ZFS clones property
  https://www.illumos.org/issues/1644
  
  1645 add ZFS written and written@... properties
  https://www.illumos.org/issues/1645
  
  1646 zfs send should estimate size of stream
  https://www.illumos.org/issues/1646
  
  1647 zfs destroy should determine space reclaimed by destroying multiple
  snapshots
  https://www.illumos.org/issues/1647
  
  1693 persistent 'comment' field for a zpool
  https://www.illumos.org/issues/1693
  
  1708 adjust size of zpool history data
  https://www.illumos.org/issues/1708
  
  1748 desire support for reguid in zfs
  https://www.illumos.org/issues/1748
  
  Obtained from:illumos (changesets 13514, 13524, 13525)
  MFC after:1 month

Added:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
Deleted:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c
Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
  head/cddl/contrib/opensolaris/cmd/zpool/zpool.8
  head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  head/cddl/lib/libzfs/Makefile
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.h
  head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
  head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 20:48:35 2011
(r228102)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 21:40:00 2011
(r228103)
@@ -48,12 +48,16 @@
 .Ar size volume
 .Nm
 .Cm destroy
-.Op Fl rRf
+.Op Fl fnpRrv
 .Ar filesystem Ns | Ns Ar volume
 .Nm
 .Cm destroy
-.Op Fl rRd
+.Op Fl dnpRrv
+.Sm off
 .Ar snapshot
+.Ns Op % Ns Ar snapname
+.Ns Op , Ns Ar ...
+.Sm on
 .Nm
 .Cm snapshot
 .Op Fl r
@@ -160,7 +164,7 @@
 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
 .Nm
 .Cm send
-.Op Fl DvRp
+.Op Fl DnPpRrv
 .Op Fl i Ar snapshot | Fl I Ar snapshot
 .Ar snapshot
 .Nm
@@ -487,6 +491,17 @@ The default value is
 .Cm off .
 .It Sy creation
 The time this dataset was created.
+.It Sy clones
+For snapshots, this property is a comma-separated list of filesystems or
+volumes which are clones of this snapshot.  The clones'
+.Sy origin
+property is this snapshot.  If the
+.Sy clones
+property is not empty, then this snapshot can not be destroyed (even with the
+.Fl r
+or
+.Fl f
+options).
 .It Sy defer_destroy
 This property is
 .Cm on
@@ -644,6 +659,28 @@ power of 2 from 512 bytes to 128 Kbytes 
 .Pp
 This property can also be referred to by its shortened column name,
 .Sy volblock .
+.It Sy written
+The amount of
+.Sy referenced
+space written to this dataset since the previous snapshot.
+.It Sy written@ Ns Ar snapshot
+The amount of
+.Sy referenced
+space written to this dataset since the specified snapshot.  This is the space
+that is referenced by this dataset but was not 

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

2011-11-28 Thread Martin Matuska
Author: mm
Date: Mon Nov 28 21:42:31 2011
New Revision: 228104
URL: http://svn.freebsd.org/changeset/base/228104

Log:
  Fix typo in copyright notice.
  
  MFC after:1 month

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c   Mon Nov 
28 21:40:00 2011(r228103)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c   Mon Nov 
28 21:42:31 2011(r228104)
@@ -23,7 +23,7 @@
  * Copyright (c) 2011 by Delphix. All rights reserved.
  * Copyright (c) 2011 Pawel Jakub Dawidek pa...@dawidek.net.
  * All rights reserved.
- * Portions Copyright 2011 Martin Matuska m...@freebsd.org
+ * Portions Copyright (c) 2011 Martin Matuska m...@freebsd.org
  */
 
 #include sys/dmu_objset.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228109 - head/tools/regression/bin/test

2011-11-28 Thread Jilles Tjoelker
Author: jilles
Date: Mon Nov 28 23:10:53 2011
New Revision: 228109
URL: http://svn.freebsd.org/changeset/base/228109

Log:
  test: Add more testcases.
  
  The new testcases pass even on old stable/7, but some other implementations
  manage to get them wrong.
  
  Also remove a few duplicate testcases.

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

Modified: head/tools/regression/bin/test/regress.sh
==
--- head/tools/regression/bin/test/regress.sh   Mon Nov 28 22:37:00 2011
(r228108)
+++ head/tools/regression/bin/test/regress.sh   Mon Nov 28 23:10:53 2011
(r228109)
@@ -52,7 +52,7 @@ t ()
 }
 
 count=0
-echo 1..97
+echo 1..130
 
 t 0 'b = b' 
 t 0 'b == b' 
@@ -138,8 +138,6 @@ t 1 '! = a'
 t 0 '! != -n'
 t 0 '! -c /etc/passwd'
 
-t 0 '! \( = \)'
-t 1 '! \( != \)'
 t 1 '! = = ='
 t 0 '! = = \)'
 t 0 '!  -o '
@@ -147,7 +145,6 @@ t 1 '! x -o '
 t 1 '!  -o x'
 t 1 '! x -o x'
 t 0 '\( -f /etc/passwd \)'
-t 1 '\( ! = \)'
 t 0 '\( !  \)'
 t 1 '\( ! -e \)'
 
@@ -160,3 +157,40 @@ t 1 '-z y -o y = # -o y = x'
 t 0 '0 -ne 0 -o ! -f /'
 t 0 '1 -ne 0 -o ! -f /etc/passwd'
 t 1 '0 -ne 0 -o ! -f /etc/passwd'
+
+t 0 '-n ='
+t 1 '-z ='
+t 1 '! ='
+t 0 '-n -eq'
+t 1 '-z -eq'
+t 1 '! -eq'
+t 0 '-n -a'
+t 1 '-z -a'
+t 1 '! -a'
+t 0 '-n -o'
+t 1 '-z -o'
+t 1 '! -o'
+t 1 '! -n ='
+t 0 '! -z ='
+t 0 '! ! ='
+t 1 '! -n -eq'
+t 0 '! -z -eq'
+t 0 '! ! -eq'
+t 1 '! -n -a'
+t 0 '! -z -a'
+t 0 '! ! -a'
+t 1 '! -n -o'
+t 0 '! -z -o'
+t 0 '! ! -o'
+t 0 '\( -n = \)'
+t 1 '\( -z = \)'
+t 1 '\( ! = \)'
+t 0 '\( -n -eq \)'
+t 1 '\( -z -eq \)'
+t 1 '\( ! -eq \)'
+t 0 '\( -n -a \)'
+t 1 '\( -z -a \)'
+t 1 '\( ! -a \)'
+t 0 '\( -n -o \)'
+t 1 '\( -z -o \)'
+t 1 '\( ! -o \)'
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228110 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler sys/...

2011-11-28 Thread Jung-uk Kim
Author: jkim
Date: Mon Nov 28 23:36:48 2011
New Revision: 228110
URL: http://svn.freebsd.org/changeset/base/228110

Log:
  Merge ACPICA 2023.

Added:
  head/sys/contrib/dev/acpica/compiler/aslrestype2s.c
 - copied, changed from r227909, 
vendor-sys/acpica/dist/compiler/aslrestype2s.c
  head/sys/contrib/dev/acpica/disassembler/dmresrcl2.c
 - copied, changed from r227909, 
vendor-sys/acpica/dist/disassembler/dmresrcl2.c
  head/sys/contrib/dev/acpica/include/actbl3.h
 - copied unchanged from r227909, vendor-sys/acpica/dist/include/actbl3.h
  head/sys/contrib/dev/acpica/os_specific/
  head/sys/contrib/dev/acpica/os_specific/service_layers/
  head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
 - copied, changed from r227896, 
vendor-sys/acpica/dist/os_specific/service_layers/osunixxf.c
  head/sys/contrib/dev/acpica/resources/rsserial.c
 - copied, changed from r227909, vendor-sys/acpica/dist/resources/rsserial.c
  head/sys/contrib/dev/acpica/utilities/utxfmutex.c
 - copied, changed from r227896, 
vendor-sys/acpica/dist/utilities/utxfmutex.c
Deleted:
  head/sys/contrib/dev/acpica/osunixxf.c
  head/sys/contrib/dev/acpica/tools/
Modified:
  head/sys/conf/files
  head/sys/contrib/dev/acpica/acpica_prep.sh
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/adwalk.c
  head/sys/contrib/dev/acpica/common/dmrestag.c
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/compiler/aslanalyze.c
  head/sys/contrib/dev/acpica/compiler/aslcodegen.c
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslcompiler.l
  head/sys/contrib/dev/acpica/compiler/aslcompiler.y
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/aslfiles.c
  head/sys/contrib/dev/acpica/compiler/aslglobal.h
  head/sys/contrib/dev/acpica/compiler/asllisting.c
  head/sys/contrib/dev/acpica/compiler/aslload.c
  head/sys/contrib/dev/acpica/compiler/asllookup.c
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslmap.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.h
  head/sys/contrib/dev/acpica/compiler/aslopcodes.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/aslpredef.c
  head/sys/contrib/dev/acpica/compiler/aslresource.c
  head/sys/contrib/dev/acpica/compiler/aslrestype1.c
  head/sys/contrib/dev/acpica/compiler/aslrestype1i.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2d.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2e.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2q.c
  head/sys/contrib/dev/acpica/compiler/aslrestype2w.c
  head/sys/contrib/dev/acpica/compiler/aslstubs.c
  head/sys/contrib/dev/acpica/compiler/asltransform.c
  head/sys/contrib/dev/acpica/compiler/asltree.c
  head/sys/contrib/dev/acpica/compiler/asltypes.h
  head/sys/contrib/dev/acpica/compiler/aslutils.c
  head/sys/contrib/dev/acpica/compiler/aslwalks.c
  head/sys/contrib/dev/acpica/compiler/dtcompile.c
  head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  head/sys/contrib/dev/acpica/compiler/dtfield.c
  head/sys/contrib/dev/acpica/compiler/dtsubtable.c
  head/sys/contrib/dev/acpica/compiler/dttable.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/compiler/dtutils.c
  head/sys/contrib/dev/acpica/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/debugger/dbdisply.c
  head/sys/contrib/dev/acpica/debugger/dbfileio.c
  head/sys/contrib/dev/acpica/debugger/dbinput.c
  head/sys/contrib/dev/acpica/debugger/dbutils.c
  head/sys/contrib/dev/acpica/disassembler/dmbuffer.c
  head/sys/contrib/dev/acpica/disassembler/dmopcode.c
  head/sys/contrib/dev/acpica/disassembler/dmresrc.c
  head/sys/contrib/dev/acpica/disassembler/dmresrcl.c
  head/sys/contrib/dev/acpica/disassembler/dmresrcs.c
  head/sys/contrib/dev/acpica/disassembler/dmutils.c
  head/sys/contrib/dev/acpica/disassembler/dmwalk.c
  head/sys/contrib/dev/acpica/dispatcher/dsargs.c
  head/sys/contrib/dev/acpica/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/events/evevent.c
  head/sys/contrib/dev/acpica/events/evglock.c
  head/sys/contrib/dev/acpica/events/evregion.c
  head/sys/contrib/dev/acpica/executer/exconfig.c
  head/sys/contrib/dev/acpica/executer/excreate.c
  head/sys/contrib/dev/acpica/executer/exdump.c
  head/sys/contrib/dev/acpica/executer/exfield.c
  head/sys/contrib/dev/acpica/executer/exfldio.c
  head/sys/contrib/dev/acpica/executer/exprep.c
  head/sys/contrib/dev/acpica/executer/exutils.c
  head/sys/contrib/dev/acpica/hardware/hwvalid.c
  head/sys/contrib/dev/acpica/include/acapps.h
  head/sys/contrib/dev/acpica/include/acconfig.h
  

Re: svn commit: r228099 - head/usr.bin/grep

2011-11-28 Thread Gábor Kövesdán

On 2011.11.28. 21:22, Xin LI wrote:

This is useful but could be confusing since xzgrep's behavior could be
different from zgrep.
What do you refer to exactly? That zgrep is GNU grep and xzgrep is BSD 
grep? I acknowledge that this is not documented but xzgrep is a 
non-standard addition so personally think it is acceptable. Someone 
called my attention to the archivers/xz port that had a wrapper script 
for grep, callled xzgrep. This was installed with the port but is not 
installed in base any more so I got the suggestion to implement it in 
BSD grep and I think it is a better idea than a wrapper script and it 
was easy to support. So with this change, this functionality can be used 
again w/o installing the port although it is not documented.


Another topic would be ObsoleteFiles.inc (or
OptionalObsoleteFiles.inc) needs to be updated for this as well.
I don't think they should be updated. From now on, xzgrep and such are 
always created and they always point to BSD grep, which can be 
/usr/bin/grep or /usr/bin/bsdgrep depending on WITH_BSD_GREP. But they 
always exist and point to one or another. I cannot think of any case 
when they should be removed.


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


Re: svn commit: r227778 - head/sys/net

2011-11-28 Thread Lawrence Stewart

On 11/29/11 06:20, John Baldwin wrote:

On Wednesday, November 23, 2011 2:37:05 am Lawrence Stewart wrote:

On 11/23/11 17:42, Julien Ridoux wrote:


On 23/11/2011, at 1:00 AM, Lawrence Stewart wrote:


On 11/23/11 00:30, John Baldwin wrote:

Think of standalone modules that are not built as part of a
kernel (e.g. 3rd party device drivers).  In general we should
avoid having structures change size for kernel options,
especially common structures.  It just adds lots of pain and
suffering and complexity.  We are stuck with it for PAE on i386
(which causes pain), and for LOCK_PROFILING (but that is
sufficiently rare and expensive it seems to be ok).  I think 8
bytes for bpf packet is not sufficiently expensive to justify the
extra headache.  Just always leave the new field in.


hmm... Julien almost has a patch finished which accomplishes what
my most recent email in this thread describes. Julien, I suggest we
get it finished and follow up to this thread with a pointer to the
patch for people to look at. If there's still a strong feeling that
what it does is going to bring pain we can do away with the new
BPF_FFCOUNTER config option and have the bpf header struct just
grow by 8 bytes.

Stay tuned...


Thanks all for the feedback. With some delay, I have a patch against
r227871 that implements what Lawrence proposed. You can find it
here:
http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/ffclock-bpf-header-

r227871.patch


There are a few nits, but the patch implements what I envisaged, thanks
Julien.


  I have tested this under a few typical scenario, it works as
expected but already brings some headaches (hence the long delay
mentioned above :-)).

I thought a bit more of user cases. I believe many of them call for
having both feed-forward counter and its conversion in second be
present in the BPF header. For example, this allows to have absolute
packet departure/arrival times (as per usual), but also provides the
opportunity to compute inter-arrival times accurately using the
difference clock. There are other examples I can think of, and if one
believe the feed-forward clock approach becomes more popular, such
usages will be more and more common.

Assuming the BPF header grows by 8 bytes independent of any kernel
option, I admit that the current implementation is a bit ugly. The
BPF structure is not nicely packed and looks clunky. Ideally, the
feed-forward counter should be placed just below the bh_tstamp
member, but this would require libpcap and all ports depending on it
to be recompiled after this change.


Even though it looks a bit gross, we would still add it at the end to
avoid gratuitously breaking binaries. We would then also add some
explicit padding in the struct to soak up the redundant space left in
between it and the second last struct member.


If this is not something you expect to MFC, then I would just add it
where it makes the most sense.  One question I have is if this affects
the file format of what tcpdump -w writes out and tcpdump -r reads in?


My understanding from discussion with Julien and a brief code inspection 
is that libpcap asks for the fields from the BPF header by name, and 
therefore any new field is opaque until libpcap is patched to care about it.



If that is affected then changing this will need much more thought.  If
not, then I think it should be fixed right in 10.  If you need to MFC
it then you may need to do some gymnatics to preserve the ABI in stable
branches, but we prefer to keep HEAD clean so we don't build up layer
upon layer of compat hacks.


hmm, ok.


What is your favourite option?


FreeBSD parlance is to ask what colour you would like to paint the
bikeshed ;)

As I've never experienced the pain John refers to, I'll defer to the
wisdom of others on whether the proposed patch will create pain down the
road. I think it's ok, but if consensus is 8bytes per packet isn't going
to break the bank, I guess we just go for it - but I guess I am cautious
about this route as we can push a lot of packets per second through the
stack.


In my limited experience the limit on pushing pps through bpf(4) isn't due
to the size of the bpf packet header itself but has more to do with disk
I/O transactions, etc.


I was more concerned about the fact that when pushing lots of packets 
per second, an extra 8 bytes could add up to a noticeable increase in 
memory usage, though it wouldn't really be an issue until we're talking 
about Mpps - I guess at 10GigE rates we can assume memory is likely to 
be abundant and a worst case extra ~100Mbytes of kernel mem usage won't 
hurt?


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


svn commit: r228112 - head/rescue/rescue

2011-11-28 Thread Max Khon
Author: fjoe
Date: Tue Nov 29 03:27:09 2011
New Revision: 228112
URL: http://svn.freebsd.org/changeset/base/228112

Log:
  -lreadline is not required anymore.

Modified:
  head/rescue/rescue/Makefile

Modified: head/rescue/rescue/Makefile
==
--- head/rescue/rescue/Makefile Tue Nov 29 02:07:07 2011(r228111)
+++ head/rescue/rescue/Makefile Tue Nov 29 03:27:09 2011(r228112)
@@ -125,7 +125,7 @@ CRUNCH_LIBS+= -lipx
 .if ${MK_ZFS} != no
 CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem
 .endif
-CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz
+CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz
 
 .if ${MACHINE_CPUARCH} == i386
 CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org



svn commit: r228113 - in head/kerberos5: usr.bin/kadmin usr.sbin/ktutil

2011-11-28 Thread Max Khon
Author: fjoe
Date: Tue Nov 29 03:49:03 2011
New Revision: 228113
URL: http://svn.freebsd.org/changeset/base/228113

Log:
  Link with -ledit instead of -lreadline.

Modified:
  head/kerberos5/usr.bin/kadmin/Makefile
  head/kerberos5/usr.sbin/ktutil/Makefile

Modified: head/kerberos5/usr.bin/kadmin/Makefile
==
--- head/kerberos5/usr.bin/kadmin/Makefile  Tue Nov 29 03:27:09 2011
(r228112)
+++ head/kerberos5/usr.bin/kadmin/Makefile  Tue Nov 29 03:49:03 2011
(r228113)
@@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DI
 DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \
${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \
${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \
-   ${LIBREADLINE} ${LIBNCURSES} ${LDAPDPADD}
+   ${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD}
 LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \
${LIBSL} -lroken ${LIBVERS} -lasn1 \
-lcrypto -lcrypt -lcom_err \
-   -lreadline -lncurses ${LDAPLDADD}
+   -ledit -lncurses ${LDAPLDADD}
 LDFLAGS=${LDAPLDFLAGS}
 
 .include bsd.prog.mk

Modified: head/kerberos5/usr.sbin/ktutil/Makefile
==
--- head/kerberos5/usr.sbin/ktutil/Makefile Tue Nov 29 03:27:09 2011
(r228112)
+++ head/kerberos5/usr.sbin/ktutil/Makefile Tue Nov 29 03:49:03 2011
(r228113)
@@ -18,10 +18,10 @@ SRCS=   add.c \
 CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I.
 DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBHX509} ${LIBSL} ${LIBROKEN} ${LIBVERS} \
${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \
-   ${LIBREADLINE} ${LIBNCURSES}
+   ${LIBEDIT} ${LIBNCURSES}
 LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBSL} -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err \
-   -lreadline -lncurses
+   -ledit -lncurses
 
 .include bsd.prog.mk
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228114 - head/lib/libedit/edit/readline

2011-11-28 Thread Max Khon
Author: fjoe
Date: Tue Nov 29 04:50:57 2011
New Revision: 228114
URL: http://svn.freebsd.org/changeset/base/228114

Log:
  - Hide _rl_qsort_string_compare() that should be private to libreadline()
  implementation.
  - Add symlink /usr/include/edit/readline/tilde.h - readline.h
  
  All this makes it possible to build and link gdb with -ledit.

Modified:
  head/lib/libedit/edit/readline/Makefile
  head/lib/libedit/edit/readline/readline.h

Modified: head/lib/libedit/edit/readline/Makefile
==
--- head/lib/libedit/edit/readline/Makefile Tue Nov 29 03:49:03 2011
(r228113)
+++ head/lib/libedit/edit/readline/Makefile Tue Nov 29 04:50:57 2011
(r228114)
@@ -2,6 +2,7 @@
 # $FreeBSD$
 
 INCS=  readline.h history.h
+SYMLINKS=  readline.h ${INCLUDEDIR}/edit/readline/tilde.h
 
 INCSDIR= ${INCLUDEDIR}/edit/readline
 

Modified: head/lib/libedit/edit/readline/readline.h
==
--- head/lib/libedit/edit/readline/readline.h   Tue Nov 29 03:49:03 2011
(r228113)
+++ head/lib/libedit/edit/readline/readline.h   Tue Nov 29 04:50:57 2011
(r228114)
@@ -200,7 +200,6 @@ void rl_get_screen_size(int *, int *);
 voidrl_set_screen_size(int, int);
 char   *rl_filename_completion_function (const char *, int);
 int _rl_abort_internal(void);
-int _rl_qsort_string_compare(char **, char **);
 char  **rl_completion_matches(const char *, rl_compentry_func_t *);
 voidrl_forced_update_display(void);
 int rl_set_prompt(const char *);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228115 - head/sys/kern

2011-11-28 Thread Lawrence Stewart
Author: lstewart
Date: Tue Nov 29 06:12:19 2011
New Revision: 228115
URL: http://svn.freebsd.org/changeset/base/228115

Log:
  Fix an oversight in r227747 by calling fbclock_bin{up}time() directly from the
  fbclock_{nanouptime|microuptime|bintime|nanotime|microtime}() functions to 
avoid
  indirecting through a sysclock_ops wrapper function.
  
  Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
  Melbourne, Australia, as part of the FreeBSD Foundation funded Feed-Forward
  Clock Synchronization Algorithms project.
  
  For more information, see http://www.synclab.org/radclock/
  
  Submitted by: Julien Ridoux (jridoux at unimelb edu au)

Modified:
  head/sys/kern/kern_tc.c

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Tue Nov 29 04:50:57 2011(r228114)
+++ head/sys/kern/kern_tc.c Tue Nov 29 06:12:19 2011(r228115)
@@ -197,7 +197,7 @@ fbclock_nanouptime(struct timespec *tsp)
 {
struct bintime bt;
 
-   binuptime(bt);
+   fbclock_binuptime(bt);
bintime2timespec(bt, tsp);
 }
 
@@ -206,7 +206,7 @@ fbclock_microuptime(struct timeval *tvp)
 {
struct bintime bt;
 
-   binuptime(bt);
+   fbclock_binuptime(bt);
bintime2timeval(bt, tvp);
 }
 
@@ -214,7 +214,7 @@ static void
 fbclock_bintime(struct bintime *bt)
 {
 
-   binuptime(bt);
+   fbclock_binuptime(bt);
bintime_add(bt, boottimebin);
 }
 
@@ -223,7 +223,7 @@ fbclock_nanotime(struct timespec *tsp)
 {
struct bintime bt;
 
-   bintime(bt);
+   fbclock_bintime(bt);
bintime2timespec(bt, tsp);
 }
 
@@ -232,7 +232,7 @@ fbclock_microtime(struct timeval *tvp)
 {
struct bintime bt;
 
-   bintime(bt);
+   fbclock_bintime(bt);
bintime2timeval(bt, tvp);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228117 - in head/sys: kern sys

2011-11-28 Thread Lawrence Stewart
Author: lstewart
Date: Tue Nov 29 06:53:36 2011
New Revision: 228117
URL: http://svn.freebsd.org/changeset/base/228117

Log:
  Make the fbclock_[get]{bin,nano,micro}[up]time() function prototypes public so
  that new APIs with some performance sensitivity can be built on top of them.
  These functions should not be called directly except in special circumstances.
  
  Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
  Melbourne, Australia, as part of the FreeBSD Foundation funded Feed-Forward
  Clock Synchronization Algorithms project.
  
  For more information, see http://www.synclab.org/radclock/
  
  Discussed with:   Julien Ridoux (jridoux at unimelb edu au)
  Submitted by: Julien Ridoux (jridoux at unimelb edu au)

Modified:
  head/sys/kern/kern_tc.c
  head/sys/sys/timeffc.h

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Tue Nov 29 06:21:01 2011(r228116)
+++ head/sys/kern/kern_tc.c Tue Nov 29 06:53:36 2011(r228117)
@@ -178,7 +178,7 @@ tc_delta(struct timehands *th)
  */
 
 #ifdef FFCLOCK
-static void
+void
 fbclock_binuptime(struct bintime *bt)
 {
struct timehands *th;
@@ -192,7 +192,7 @@ fbclock_binuptime(struct bintime *bt)
} while (gen == 0 || gen != th-th_generation);
 }
 
-static void
+void
 fbclock_nanouptime(struct timespec *tsp)
 {
struct bintime bt;
@@ -201,7 +201,7 @@ fbclock_nanouptime(struct timespec *tsp)
bintime2timespec(bt, tsp);
 }
 
-static void
+void
 fbclock_microuptime(struct timeval *tvp)
 {
struct bintime bt;
@@ -210,7 +210,7 @@ fbclock_microuptime(struct timeval *tvp)
bintime2timeval(bt, tvp);
 }
 
-static void
+void
 fbclock_bintime(struct bintime *bt)
 {
 
@@ -218,7 +218,7 @@ fbclock_bintime(struct bintime *bt)
bintime_add(bt, boottimebin);
 }
 
-static void
+void
 fbclock_nanotime(struct timespec *tsp)
 {
struct bintime bt;
@@ -227,7 +227,7 @@ fbclock_nanotime(struct timespec *tsp)
bintime2timespec(bt, tsp);
 }
 
-static void
+void
 fbclock_microtime(struct timeval *tvp)
 {
struct bintime bt;
@@ -236,7 +236,7 @@ fbclock_microtime(struct timeval *tvp)
bintime2timeval(bt, tvp);
 }
 
-static void
+void
 fbclock_getbinuptime(struct bintime *bt)
 {
struct timehands *th;
@@ -249,7 +249,7 @@ fbclock_getbinuptime(struct bintime *bt)
} while (gen == 0 || gen != th-th_generation);
 }
 
-static void
+void
 fbclock_getnanouptime(struct timespec *tsp)
 {
struct timehands *th;
@@ -262,7 +262,7 @@ fbclock_getnanouptime(struct timespec *t
} while (gen == 0 || gen != th-th_generation);
 }
 
-static void
+void
 fbclock_getmicrouptime(struct timeval *tvp)
 {
struct timehands *th;
@@ -275,7 +275,7 @@ fbclock_getmicrouptime(struct timeval *t
} while (gen == 0 || gen != th-th_generation);
 }
 
-static void
+void
 fbclock_getbintime(struct bintime *bt)
 {
struct timehands *th;
@@ -289,7 +289,7 @@ fbclock_getbintime(struct bintime *bt)
bintime_add(bt, boottimebin);
 }
 
-static void
+void
 fbclock_getnanotime(struct timespec *tsp)
 {
struct timehands *th;
@@ -302,7 +302,7 @@ fbclock_getnanotime(struct timespec *tsp
} while (gen == 0 || gen != th-th_generation);
 }
 
-static void
+void
 fbclock_getmicrotime(struct timeval *tvp)
 {
struct timehands *th;

Modified: head/sys/sys/timeffc.h
==
--- head/sys/sys/timeffc.h  Tue Nov 29 06:21:01 2011(r228116)
+++ head/sys/sys/timeffc.h  Tue Nov 29 06:53:36 2011(r228117)
@@ -164,6 +164,28 @@ void ffclock_bindifftime(ffcounter ffdel
 void ffclock_nanodifftime(ffcounter ffdelta, struct timespec *tsp);
 void ffclock_microdifftime(ffcounter ffdelta, struct timeval *tvp);
 
+/*
+ * When FFCLOCK is enabled in the kernel, [get]{bin,nano,micro}[up]time() 
become
+ * wrappers around equivalent feedback or feed-forward functions. Provide 
access
+ * outside of kern_tc.c to the feedback clock equivalent functions for
+ * specialised use i.e. these are not for general consumption.
+ */
+void fbclock_bintime(struct bintime *bt);
+void fbclock_nanotime(struct timespec *tsp);
+void fbclock_microtime(struct timeval *tvp);
+
+void fbclock_getbintime(struct bintime *bt);
+void fbclock_getnanotime(struct timespec *tsp);
+void fbclock_getmicrotime(struct timeval *tvp);
+
+void fbclock_binuptime(struct bintime *bt);
+void fbclock_nanouptime(struct timespec *tsp);
+void fbclock_microuptime(struct timeval *tvp);
+
+void fbclock_getbinuptime(struct bintime *bt);
+void fbclock_getnanouptime(struct timespec *tsp);
+void fbclock_getmicrouptime(struct timeval *tvp);
+
 #else /* !_KERNEL */
 
 /* Feed-Forward Clock system calls. */
___
svn-src-head@freebsd.org mailing list