svn commit: r246822 - in head/sys: net netpfil/pf

2013-02-15 Thread Gleb Smirnoff
Author: glebius
Date: Fri Feb 15 09:03:56 2013
New Revision: 246822
URL: http://svnweb.freebsd.org/changeset/base/246822

Log:
  Finish the r244185. This fixes ever growing counter of pfsync bad
  length packets, which was actually harmless.
  
  Note that peers with different version of head/ may grow this
  counter, but it is harmless - all pfsync data is processed.
  
  Reported  tested by: Anton Yuzhaninov citrin citrin.ru
  Sponsored by: Nginx, Inc

Modified:
  head/sys/net/if_pfsync.h
  head/sys/netpfil/pf/if_pfsync.c

Modified: head/sys/net/if_pfsync.h
==
--- head/sys/net/if_pfsync.hFri Feb 15 07:58:51 2013(r246821)
+++ head/sys/net/if_pfsync.hFri Feb 15 09:03:56 2013(r246822)
@@ -67,8 +67,6 @@
 #definePFSYNC_ACT_EOF  12  /* end of frame */
 #definePFSYNC_ACT_MAX  13
 
-#definePFSYNC_HMAC_LEN 20
-
 /*
  * A pfsync frame is built from a header followed by several sections which
  * are all prefixed with their own subheaders. Frames must be terminated with
@@ -205,18 +203,8 @@ struct pfsync_tdb {
u_int8_t_pad[2];
 } __packed;
 
-/*
- * EOF
- */
-
-struct pfsync_eof {
-   u_int8_thmac[PFSYNC_HMAC_LEN];
-} __packed;
-
 #definePFSYNC_HDRLEN   sizeof(struct pfsync_header)
 
-
-
 /*
  * Names for PFSYNC sysctl objects
  */

Modified: head/sys/netpfil/pf/if_pfsync.c
==
--- head/sys/netpfil/pf/if_pfsync.c Fri Feb 15 07:58:51 2013
(r246821)
+++ head/sys/netpfil/pf/if_pfsync.c Fri Feb 15 09:03:56 2013
(r246822)
@@ -99,8 +99,7 @@ __FBSDID($FreeBSD$);
 #define PFSYNC_MINPKT ( \
sizeof(struct ip) + \
sizeof(struct pfsync_header) + \
-   sizeof(struct pfsync_subheader) + \
-   sizeof(struct pfsync_eof))
+   sizeof(struct pfsync_subheader) )
 
 struct pfsync_pkt {
struct ip *ip;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246823 - head/sbin/fsdb

2013-02-15 Thread Sergey Kandaurov
Author: pluknet
Date: Fri Feb 15 09:10:01 2013
New Revision: 246823
URL: http://svnweb.freebsd.org/changeset/base/246823

Log:
  Remove write only assignments and thus fix the build after struct bufarea
  TAILQ conversion (r246812).

Modified:
  head/sbin/fsdb/fsdbutil.c

Modified: head/sbin/fsdb/fsdbutil.c
==
--- head/sbin/fsdb/fsdbutil.c   Fri Feb 15 09:03:56 2013(r246822)
+++ head/sbin/fsdb/fsdbutil.c   Fri Feb 15 09:10:01 2013(r246823)
@@ -239,7 +239,6 @@ printindir(ufs2_daddr_t blk, int level, 
/* for the final indirect level, don't use the cache */
bp = buf;
bp-b_un.b_buf = bufp;
-   bp-b_prev = bp-b_next = bp;
initbarea(bp);
 
getblk(bp, blk, sblock.fs_bsize);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246824 - head/lib/libc/stdio

2013-02-15 Thread Jilles Tjoelker
Author: jilles
Date: Fri Feb 15 10:44:07 2013
New Revision: 246824
URL: http://svnweb.freebsd.org/changeset/base/246824

Log:
  setbuf(3): Remove bugs section about ancient versions of BSD.

Modified:
  head/lib/libc/stdio/setbuf.3

Modified: head/lib/libc/stdio/setbuf.3
==
--- head/lib/libc/stdio/setbuf.3Fri Feb 15 09:10:01 2013
(r246823)
+++ head/lib/libc/stdio/setbuf.3Fri Feb 15 10:44:07 2013
(r246824)
@@ -32,7 +32,7 @@
 .\ @(#)setbuf.3   8.1 (Berkeley) 6/4/93
 .\ $FreeBSD$
 .\
-.Dd June 4, 1993
+.Dd February 15, 2013
 .Dt SETBUF 3
 .Os
 .Sh NAME
@@ -195,19 +195,3 @@ and
 functions
 conform to
 .St -isoC .
-.Sh BUGS
-The
-.Fn setbuffer
-and
-.Fn setlinebuf
-functions are not portable to versions of
-.Bx
-before
-.Bx 4.2 .
-On
-.Bx 4.2
-and
-.Bx 4.3
-systems,
-.Fn setbuf
-always uses a suboptimal buffer size and should be avoided.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246826 - head/sys/kern

2013-02-15 Thread Sergey Kandaurov
Author: pluknet
Date: Fri Feb 15 13:00:20 2013
New Revision: 246826
URL: http://svnweb.freebsd.org/changeset/base/246826

Log:
  Add support of passing SCM_BINTIME ancillary data object for PF_LOCAL
  sockets.
  
  PR:   kern/175883
  Submitted by: Andrey Simonenko si...@comsys.ntu-kpi.kiev.ua
  Discussed with:   glebius, phk
  MFC after:2 weeks

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Fri Feb 15 12:35:16 2013(r246825)
+++ head/sys/kern/uipc_usrreq.c Fri Feb 15 13:00:20 2013(r246826)
@@ -1798,6 +1798,7 @@ unp_internalize(struct mbuf **controlp, 
struct mbuf *control = *controlp;
struct proc *p = td-td_proc;
struct filedesc *fdescp = p-p_fd;
+   struct bintime *bt;
struct cmsghdr *cm = mtod(control, struct cmsghdr *);
struct cmsgcred *cmcred;
struct file **rp;
@@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, 
microtime(tv);
break;
 
+   case SCM_BINTIME:
+   *controlp = sbcreatecontrol(NULL, sizeof(*bt),
+   SCM_BINTIME, SOL_SOCKET);
+   if (*controlp == NULL) {
+   error = ENOBUFS;
+   goto out;
+   }
+   bt = (struct bintime *)
+   CMSG_DATA(mtod(*controlp, struct cmsghdr *));
+   bintime(bt);
+   break;
+
default:
error = EINVAL;
goto out;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246829 - vendor/ldns/1.6.16

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 13:53:24 2013
New Revision: 246829
URL: http://svnweb.freebsd.org/changeset/base/246829

Log:
  tag ldns 1.6.16

Added:
  vendor/ldns/1.6.16/
 - copied from r246828, vendor/ldns/dist/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 13:57:51 2013
New Revision: 246830
URL: http://svnweb.freebsd.org/changeset/base/246830

Log:
  Oops, I flipped LDNS_UTILS but forgot to update the description.

Modified:
  head/tools/build/options/WITH_LDNS_UTILS

Modified: head/tools/build/options/WITH_LDNS_UTILS
==
--- head/tools/build/options/WITH_LDNS_UTILSFri Feb 15 13:53:24 2013
(r246829)
+++ head/tools/build/options/WITH_LDNS_UTILSFri Feb 15 13:57:51 2013
(r246830)
@@ -1,6 +1,5 @@
 .\ $FreeBSD$
-Setting this variable will prevent the LDNS-based versions of
+Setting this variable will enable the LDNS-based versions of
 .Xr dig 1
 and
-.Xr host 1
-from being built.
+.Xr host 1 .
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r246827 - in head: contrib/ldns contrib/ldns/compat contrib/ldns/drill contrib/ldns/ldns lib lib/libldns share/mk tools/build/options

2013-02-15 Thread Dag-Erling Smørgrav
...and before someone yells you forgot to update src.conf.5!: no, I
didn't, but the last person who touched bsd.own.mk did, and now I have
conflicts I need to sort out...  *again*

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

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

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 14:17:27 2013
New Revision: 246831
URL: http://svnweb.freebsd.org/changeset/base/246831

Log:
  Update src.conf(5) up to but not including my LDNS commits.

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

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Fri Feb 15 13:57:51 2013
(r246830)
+++ head/share/man/man5/src.conf.5  Fri Feb 15 14:17:27 2013
(r246831)
@@ -1,7 +1,7 @@
 .\ DO NOT EDIT-- this file is automatically generated.
 .\ from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z 
gjb
 .\ $FreeBSD$
-.Dd February 2, 2013
+.Dd February 15, 2013
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -291,7 +291,7 @@ 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, arm/armv6, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64.
+arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, 
mips/mips64, mips/mipsn32 and sparc64/sparc64.
 When set, it also enforces the following options:
 .Pp
 .Bl -item -compact
@@ -302,12 +302,6 @@ When set, it also enforces the following
 .It
 .Va WITHOUT_CLANG_IS_CC
 .El
-.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, powerpc/powerpc and powerpc/powerpc64.
 .It Va WITH_CLANG_EXTRAS
 .\ from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 
23:56:22Z dim
 Set to build additional clang and llvm tools, such as bugpoint.
@@ -435,13 +429,6 @@ This includes the device tree compiler (
 .Pp
 It is a default setting on
 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, arm/armv6, arm/armv6eb, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, 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
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246832 - head/sys/kern

2013-02-15 Thread Sergey Kandaurov
Author: pluknet
Date: Fri Feb 15 14:22:05 2013
New Revision: 246832
URL: http://svnweb.freebsd.org/changeset/base/246832

Log:
  vn_io_faults_cnt:
  - use u_long consistently
  - use SYSCTL_ULONG to match the type of variable
  
  Reviewed by:  kib
  MFC after:1 week

Modified:
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/vfs_vnops.c
==
--- head/sys/kern/vfs_vnops.c   Fri Feb 15 14:17:27 2013(r246831)
+++ head/sys/kern/vfs_vnops.c   Fri Feb 15 14:22:05 2013(r246832)
@@ -872,8 +872,8 @@ static const int io_hold_cnt = 16;
 static int vn_io_fault_enable = 1;
 SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RW,
 vn_io_fault_enable, 0, Enable vn_io_fault lock avoidance);
-static unsigned long vn_io_faults_cnt;
-SYSCTL_LONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD,
+static u_long vn_io_faults_cnt;
+SYSCTL_ULONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD,
 vn_io_faults_cnt, 0, Count of vn_io_fault lock avoidance triggers);
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246833 - head/share/mk

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 14:22:23 2013
New Revision: 246833
URL: http://svnweb.freebsd.org/changeset/base/246833

Log:
  The relationship between LDNS_UTILS and BIND_UTILS was inverted.

Modified:
  head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkFri Feb 15 14:22:05 2013(r246832)
+++ head/share/mk/bsd.own.mkFri Feb 15 14:22:23 2013(r246833)
@@ -477,7 +477,7 @@ MK_BIND_UTILS:= no
 MK_LDNS_UTILS:=no
 .endif
 
-.if ${MK_LDNS_UTILS} == no
+.if ${MK_LDNS_UTILS} != no
 MK_BIND_UTILS:=no
 .endif
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 15:09:24 2013
New Revision: 246838
URL: http://svnweb.freebsd.org/changeset/base/246838

Log:
  Manually add the correct text for the LDNS and LDNS_UTILS options.
  There seems to be a bug in makeman that causes it to misunderstand
  the relationship between LDNS_UTILS and BIND_UTILS.

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

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Fri Feb 15 14:54:09 2013
(r246837)
+++ head/share/man/man5/src.conf.5  Fri Feb 15 15:09:24 2013
(r246838)
@@ -646,6 +646,26 @@ When set, it also enforces the following
 Set to build some programs without optional
 .Nm libkvm
 support.
+.It Va WITHOUT_LDNS
+.\ from FreeBSD: head/tools/build/options/WITHOUT_LDNS 246827 2013-02-15 
13:44:18Z des
+Setting this variable will prevent LDNS from being built.
+When set, it also enforces the following options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_LDNS_UTILS
+.El
+.It Va WITH_LDNS_UTILS
+.\ from FreeBSD: head/tools/build/options/WITH_LDNS_UTILS 246830 2013-02-15 
13:57:51Z des
+Setting this variable will enable the LDNS-based versions of
+.Xr dig 1
+and
+.Xr host 1 .
+When set, the following options are also in effect:
+.Pp
+.Bl -inset -compact
+.It Va WITHOUT_BIND_UTILS
+.El
 .It Va WITHOUT_LEGACY_CONSOLE
 .\ from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 
2008-09-21 22:02:26Z sam
 Set to not build programs that support a legacy PC console; e.g.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r246824 - head/lib/libc/stdio

2013-02-15 Thread Bruce Evans

On Fri, 15 Feb 2013, Jilles Tjoelker wrote:


Log:
 setbuf(3): Remove bugs section about ancient versions of BSD.

Modified:
 head/lib/libc/stdio/setbuf.3

Modified: head/lib/libc/stdio/setbuf.3
==
--- head/lib/libc/stdio/setbuf.3Fri Feb 15 09:10:01 2013
(r246823)
+++ head/lib/libc/stdio/setbuf.3Fri Feb 15 10:44:07 2013
(r246824)
...
@@ -195,19 +195,3 @@ and
functions
conform to
.St -isoC .
-.Sh BUGS
-The
-.Fn setbuffer
-and
-.Fn setlinebuf
-functions are not portable to versions of
-.Bx
-before
-.Bx 4.2 .
-On
-.Bx 4.2
-and
-.Bx 4.3
-systems,
-.Fn setbuf
-always uses a suboptimal buffer size and should be avoided.



This also removes the bugs section about setbuf() being unusable.  It
uses a buffer of size BUFSIZ, but that is unusably small.  This bug
is older than the old versions of BSD (setbuf() was broken as designed)
but still applies.

BTW, I recently noticed many utilities using too-small stdio buffers:
- md5(1) and libmd use raw BUFSIZ to get the same slowness as setbuf().
  They even try to get misaligned buffers by allocating them as char
  arrays on they stack.
- cmp(1) in the non-regular file case naively believe that stdio chooses
  a good buffer size, and stdio naively believes that stat()'s
  st_blksize is a good buffer size.  The latter is still broken in the
  kernel (it was unbroken a couple of years ago for regular files).
  So cmp [-lx] on disks runs very slowly.  cmp's internal algorithms
  are also very slow (starting with using stdio at all), but can keep
  up with disks provided the disks are slowed down like this.  The
  non-regular file case is little better.  It uses mmap() and a
  different slow internal algorithm (not quite as slow since it doesn't
  use stdio).  mmap() is especially suitable for disk files, but cmp
  knows that it only works on regular files.  cp(1) and install(1) use
  mmap() more reasonably.

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


Re: svn commit: r246827 - in head: contrib/ldns contrib/ldns/compat contrib/ldns/drill contrib/ldns/ldns lib lib/libldns share/mk tools/build/options

2013-02-15 Thread Jan Beich
Dag-Erling Smørgrav d...@freebsd.org writes:

 Author: des
 Date: Fri Feb 15 13:44:18 2013
 New Revision: 246827
 URL: http://svnweb.freebsd.org/changeset/base/246827

 Log:
   Import LDNS and build it as an internal library.
[...]
 Index: share/mk/bsd.libnames.mk
 ===
 --- share/mk/bsd.libnames.mk  (revision 246826)
 +++ share/mk/bsd.libnames.mk  (revision 246827)
 @@ -85,6 +85,9 @@ LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a
  LIBKRB5?=${DESTDIR}${LIBDIR}/libkrb5.a
  LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a
  LIBL?=   ${DESTDIR}${LIBDIR}/libl.a
 +.if ${MK_LDNS} != no
 +LIBLDNS?=${DESTDIR}${LIBDIR}/lib_ldns.a
 +.endif
  LIBLN?=  don't use LIBLN, use LIBL
  .if ${MK_BIND} != no
  LIBLWRES?=   ${DESTDIR}${LIBDIR}/liblwres.a

Why the underscore? lib/libldns/Makefile doesn't have it.
Not that WITH_LDNS build would succeed anyway:

  === lib/libldns (depend)
  /usr/src/lib/libldns/../../contrib/ldns/buffer.c:10:10: fatal error: 
'ldns/config.
  h' file not found
  #include ldns/config.h
   ^
  1 error generated.
  mkdep: compile failed
  *** [.depend] Error code 1
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

svn commit: r246845 - head/sys/kern

2013-02-15 Thread Ian Lepore
Author: ian
Date: Fri Feb 15 18:30:32 2013
New Revision: 246845
URL: http://svnweb.freebsd.org/changeset/base/246845

Log:
  Add PPS_CANWAIT support for time_pps_fetch().  This adds support for all three
  blocking modes described in section 3.4.3 of RFC 2783, allowing the caller
  to retrieve the most recent values without blocking, to block for a specified
  time, or to block forever.
  
  Reviewed by:  discussion on hackers@

Modified:
  head/sys/kern/kern_tc.c

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Fri Feb 15 17:22:57 2013(r246844)
+++ head/sys/kern/kern_tc.c Fri Feb 15 18:30:32 2013(r246845)
@@ -1446,6 +1446,50 @@ SYSCTL_PROC(_kern_timecounter, OID_AUTO,
  * RFC 2783 PPS-API implementation.
  */
 
+static int
+pps_fetch(struct pps_fetch_args *fapi, struct pps_state *pps)
+{
+   int err, timo;
+   pps_seq_t aseq, cseq;
+   struct timeval tv;
+
+   if (fapi-tsformat  fapi-tsformat != PPS_TSFMT_TSPEC)
+   return (EINVAL);
+
+   /*
+* If no timeout is requested, immediately return whatever values were
+* most recently captured.  If timeout seconds is -1, that's a request
+* to block without a timeout.  WITNESS won't let us sleep forever
+* without a lock (we really don't need a lock), so just repeatedly
+* sleep a long time.
+*/
+   if (fapi-timeout.tv_sec || fapi-timeout.tv_nsec) {
+   if (fapi-timeout.tv_sec == -1)
+   timo = 0x7fff;
+   else {
+   tv.tv_sec = fapi-timeout.tv_sec;
+   tv.tv_usec = fapi-timeout.tv_nsec / 1000;
+   timo = tvtohz(tv);
+   }
+   aseq = pps-ppsinfo.assert_sequence;
+   cseq = pps-ppsinfo.clear_sequence;
+   while (aseq == pps-ppsinfo.assert_sequence 
+   cseq == pps-ppsinfo.clear_sequence) {
+   err = tsleep(pps, PCATCH, ppsfch, timo);
+   if (err == EWOULDBLOCK  fapi-timeout.tv_sec == -1) {
+   continue;
+   } else if (err != 0) {
+   return (err);
+   }
+   }
+   }
+
+   pps-ppsinfo.current_mode = pps-ppsparam.mode;
+   fapi-pps_info_buf = pps-ppsinfo;
+
+   return (0);
+}
+
 int
 pps_ioctl(u_long cmd, caddr_t data, struct pps_state *pps)
 {
@@ -1485,13 +1529,7 @@ pps_ioctl(u_long cmd, caddr_t data, stru
return (0);
case PPS_IOC_FETCH:
fapi = (struct pps_fetch_args *)data;
-   if (fapi-tsformat  fapi-tsformat != PPS_TSFMT_TSPEC)
-   return (EINVAL);
-   if (fapi-timeout.tv_sec || fapi-timeout.tv_nsec)
-   return (EOPNOTSUPP);
-   pps-ppsinfo.current_mode = pps-ppsparam.mode;
-   fapi-pps_info_buf = pps-ppsinfo;
-   return (0);
+   return (pps_fetch(fapi, pps));
 #ifdef FFCLOCK
case PPS_IOC_FETCH_FFCOUNTER:
fapi_ffc = (struct pps_fetch_ffc_args *)data;
@@ -1540,7 +1578,7 @@ pps_ioctl(u_long cmd, caddr_t data, stru
 void
 pps_init(struct pps_state *pps)
 {
-   pps-ppscap |= PPS_TSFMT_TSPEC;
+   pps-ppscap |= PPS_TSFMT_TSPEC | PPS_CANWAIT;
if (pps-ppscap  PPS_CAPTUREASSERT)
pps-ppscap |= PPS_OFFSETASSERT;
if (pps-ppscap  PPS_CAPTURECLEAR)
@@ -1680,6 +1718,9 @@ pps_event(struct pps_state *pps, int eve
hardpps(tsp, ts.tv_nsec + 10 * ts.tv_sec);
}
 #endif
+
+   /* Wakeup anyone sleeping in pps_fetch().  */
+   wakeup(pps);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2013-02-15 Thread Neel Natu
Author: neel
Date: Fri Feb 15 18:41:36 2013
New Revision: 246846
URL: http://svnweb.freebsd.org/changeset/base/246846

Log:
  Advertise PCI-E capability in the hostbridge device presented to the guest.
  
  FreeBSD wants to see this capability in at least one device in the PCI
  hierarchy before it allows use of MSI or MSI-X.
  
  Obtained from:NetApp

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

Modified: head/usr.sbin/bhyve/pci_emul.c
==
--- head/usr.sbin/bhyve/pci_emul.c  Fri Feb 15 18:30:32 2013
(r246845)
+++ head/usr.sbin/bhyve/pci_emul.c  Fri Feb 15 18:41:36 2013
(r246846)
@@ -740,6 +740,38 @@ msicap_cfgwrite(struct pci_devinst *pi, 
CFGWRITE(pi, offset, val, bytes);
 }
 
+void
+pciecap_cfgwrite(struct pci_devinst *pi, int capoff, int offset,
+int bytes, uint32_t val)
+{
+
+   /* XXX don't write to the readonly parts */
+   CFGWRITE(pi, offset, val, bytes);
+}
+
+#definePCIECAP_VERSION 0x2
+int
+pci_emul_add_pciecap(struct pci_devinst *pi, int type)
+{
+   int err;
+   struct pciecap pciecap;
+
+   CTASSERT(sizeof(struct pciecap) == 60);
+
+   if (type != PCIEM_TYPE_ROOT_PORT)
+   return (-1);
+
+   bzero(pciecap, sizeof(pciecap));
+
+   pciecap.capid = PCIY_EXPRESS;
+   pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT;
+   pciecap.link_capabilities = 0x411;  /* gen1, x1 */
+   pciecap.link_status = 0x11; /* gen1, x1 */
+
+   err = pci_emul_add_capability(pi, (u_char *)pciecap, sizeof(pciecap));
+   return (err);
+}
+
 /*
  * This function assumes that 'coff' is in the capabilities region of the
  * config space.
@@ -782,6 +814,9 @@ pci_emul_capwrite(struct pci_devinst *pi
case PCIY_MSIX:
msixcap_cfgwrite(pi, capoff, offset, bytes, val);
break;
+   case PCIY_EXPRESS:
+   pciecap_cfgwrite(pi, capoff, offset, bytes, val);
+   break;
default:
break;
}

Modified: head/usr.sbin/bhyve/pci_emul.h
==
--- head/usr.sbin/bhyve/pci_emul.h  Fri Feb 15 18:30:32 2013
(r246845)
+++ head/usr.sbin/bhyve/pci_emul.h  Fri Feb 15 18:41:36 2013
(r246846)
@@ -150,6 +150,40 @@ struct msixcap {
uint32_tpba_info;   /* bar index and offset within it */
 } __packed;
 
+struct pciecap {
+   uint8_t capid;
+   uint8_t nextptr;
+   uint16_tpcie_capabilities;
+
+   uint32_tdev_capabilities;   /* all devices */
+   uint16_tdev_control;
+   uint16_tdev_status;
+
+   uint32_tlink_capabilities;  /* devices with links */
+   uint16_tlink_control;
+   uint16_tlink_status;
+
+   uint32_tslot_capabilities;  /* ports with slots */
+   uint16_tslot_control;
+   uint16_tslot_status;
+
+   uint16_troot_control;   /* root ports */
+   uint16_troot_capabilities;
+   uint32_troot_status;
+
+   uint32_tdev_capabilities2;  /* all devices */
+   uint16_tdev_control2;
+   uint16_tdev_status2;
+
+   uint32_tlink_capabilities2; /* devices with links */
+   uint16_tlink_control2;
+   uint16_tlink_status2;
+
+   uint32_tslot_capabilities2; /* ports with slots */
+   uint16_tslot_control2;
+   uint16_tslot_status2;
+} __packed;
+
 void   init_pci(struct vmctx *ctx);
 void   msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset,
int bytes, uint32_t val);
@@ -161,6 +195,7 @@ int pci_emul_alloc_bar(struct pci_devins
 intpci_emul_alloc_pbar(struct pci_devinst *pdi, int idx,
uint64_t hostbase, enum pcibar_type type, uint64_t size);
 intpci_emul_add_msicap(struct pci_devinst *pi, int msgnum);
+intpci_emul_add_pciecap(struct pci_devinst *pi, int pcie_device_type);
 intpci_is_legacy(struct pci_devinst *pi);
 void   pci_generate_msi(struct pci_devinst *pi, int msgnum);
 void   pci_generate_msix(struct pci_devinst *pi, int msgnum);

Modified: head/usr.sbin/bhyve/pci_hostbridge.c
==
--- head/usr.sbin/bhyve/pci_hostbridge.cFri Feb 15 18:30:32 2013
(r246845)
+++ head/usr.sbin/bhyve/pci_hostbridge.cFri Feb 15 18:41:36 2013
(r246846)
@@ -42,6 +42,8 @@ pci_hostbridge_init(struct vmctx *ctx, s
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE);
pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_HOST);
 
+   pci_emul_add_pciecap(pi, PCIEM_TYPE_ROOT_PORT);
+
return 

svn commit: r246847 - in vendor-sys/acpica/dist: . generate/unix generate/unix/acpibin generate/unix/acpiexec generate/unix/acpihelp generate/unix/acpinames generate/unix/acpisrc generate/unix/acpi...

2013-02-15 Thread Jung-uk Kim
Author: jkim
Date: Fri Feb 15 19:12:35 2013
New Revision: 246847
URL: http://svnweb.freebsd.org/changeset/base/246847

Log:
  Import ACPICA 20130215.

Added:
  vendor-sys/acpica/dist/source/compiler/aslprepkg.c   (contents, props changed)
  vendor-sys/acpica/dist/source/components/namespace/nsconvert.c   (contents, 
props changed)
Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/unix/Makefile.config
  vendor-sys/acpica/dist/generate/unix/acpibin/Makefile
  vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile
  vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile
  vendor-sys/acpica/dist/generate/unix/acpinames/Makefile
  vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile
  vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile
  vendor-sys/acpica/dist/generate/unix/iasl/Makefile
  vendor-sys/acpica/dist/source/common/adisasm.c
  vendor-sys/acpica/dist/source/common/adwalk.c
  vendor-sys/acpica/dist/source/common/dmextern.c
  vendor-sys/acpica/dist/source/common/dmtable.c
  vendor-sys/acpica/dist/source/common/dmtbdump.c
  vendor-sys/acpica/dist/source/common/dmtbinfo.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/asldefine.h
  vendor-sys/acpica/dist/source/compiler/aslfiles.c
  vendor-sys/acpica/dist/source/compiler/aslmain.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.h
  vendor-sys/acpica/dist/source/compiler/aslpredef.c
  vendor-sys/acpica/dist/source/compiler/aslstartup.c
  vendor-sys/acpica/dist/source/compiler/aslsupport.l
  vendor-sys/acpica/dist/source/compiler/dtcompiler.h
  vendor-sys/acpica/dist/source/compiler/dttable.c
  vendor-sys/acpica/dist/source/compiler/dttemplate.h
  vendor-sys/acpica/dist/source/components/debugger/dbcmds.c
  vendor-sys/acpica/dist/source/components/debugger/dbinput.c
  vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c
  vendor-sys/acpica/dist/source/components/events/evevent.c
  vendor-sys/acpica/dist/source/components/events/evgpe.c
  vendor-sys/acpica/dist/source/components/events/evsci.c
  vendor-sys/acpica/dist/source/components/events/evxface.c
  vendor-sys/acpica/dist/source/components/events/evxfevnt.c
  vendor-sys/acpica/dist/source/components/executer/exprep.c
  vendor-sys/acpica/dist/source/components/executer/exutils.c
  vendor-sys/acpica/dist/source/components/hardware/hwacpi.c
  vendor-sys/acpica/dist/source/components/namespace/nspredef.c
  vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c
  vendor-sys/acpica/dist/source/components/namespace/nsrepair.c
  vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c
  vendor-sys/acpica/dist/source/components/namespace/nsutils.c
  vendor-sys/acpica/dist/source/components/parser/psargs.c
  vendor-sys/acpica/dist/source/components/resources/rscalc.c
  vendor-sys/acpica/dist/source/components/resources/rsdump.c
  vendor-sys/acpica/dist/source/components/resources/rslist.c
  vendor-sys/acpica/dist/source/components/resources/rsxface.c
  vendor-sys/acpica/dist/source/components/utilities/utaddress.c
  vendor-sys/acpica/dist/source/components/utilities/utexcep.c
  vendor-sys/acpica/dist/source/components/utilities/utglobal.c
  vendor-sys/acpica/dist/source/include/acdisasm.h
  vendor-sys/acpica/dist/source/include/acexcep.h
  vendor-sys/acpica/dist/source/include/acglobal.h
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acnamesp.h
  vendor-sys/acpica/dist/source/include/acoutput.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/actbl2.h
  vendor-sys/acpica/dist/source/include/actbl3.h
  vendor-sys/acpica/dist/source/include/acutils.h
  vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c
  vendor-sys/acpica/dist/source/tools/acpisrc/astable.c

Modified: vendor-sys/acpica/dist/changes.txt
==
--- vendor-sys/acpica/dist/changes.txt  Fri Feb 15 18:41:36 2013
(r246846)
+++ vendor-sys/acpica/dist/changes.txt  Fri Feb 15 19:12:35 2013
(r246847)
@@ -1,6 +1,100 @@
 
-17 January 2013. Summary of changes for version 20130117:
+14 February 2013. Summary of changes for version 20130214:
+
+1) ACPICA Kernel-resident Subsystem:
 
+Fixed a possible regression on some hosts: Reinstated the safe return 
+macros (return_ACPI_STATUS, etc.) that ensure that the argument is 
+evaluated only once. Although these macros are not needed for the ACPICA 
+code itself, they are often used by ACPI-related host device drivers where 
+the safe feature may be necessary.
+
+Fixed several issues related to the ACPI 5.0 reduced hardware support 
+(SOC): Now ensure that if the platform declares itself as hardware-reduced 
+via the FADT, the following functions become NOOPs (and always return

svn commit: r246848 - vendor-sys/acpica/20130214

2013-02-15 Thread Jung-uk Kim
Author: jkim
Date: Fri Feb 15 19:13:35 2013
New Revision: 246848
URL: http://svnweb.freebsd.org/changeset/base/246848

Log:
  Tag ACPICA 20130214.

Added:
  vendor-sys/acpica/20130214/
 - copied from r246847, vendor-sys/acpica/dist/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246849 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon...

2013-02-15 Thread Jung-uk Kim
Author: jkim
Date: Fri Feb 15 20:36:28 2013
New Revision: 246849
URL: http://svnweb.freebsd.org/changeset/base/246849

Log:
  Merge ACPICA 20130214.

Added:
  head/sys/contrib/dev/acpica/compiler/aslprepkg.c
 - copied, changed from r246848, 
vendor-sys/acpica/dist/source/compiler/aslprepkg.c
  head/sys/contrib/dev/acpica/components/namespace/nsconvert.c
 - copied, changed from r246848, 
vendor-sys/acpica/dist/source/components/namespace/nsconvert.c
Modified:
  head/sys/conf/files
  head/sys/contrib/dev/acpica/changes.txt   (contents, props changed)
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/adwalk.c
  head/sys/contrib/dev/acpica/common/dmextern.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/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/aslfiles.c
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.h
  head/sys/contrib/dev/acpica/compiler/aslpredef.c
  head/sys/contrib/dev/acpica/compiler/aslstartup.c
  head/sys/contrib/dev/acpica/compiler/aslsupport.l
  head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  head/sys/contrib/dev/acpica/compiler/dttable.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/components/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/components/debugger/dbinput.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
  head/sys/contrib/dev/acpica/components/events/evevent.c
  head/sys/contrib/dev/acpica/components/events/evgpe.c
  head/sys/contrib/dev/acpica/components/events/evsci.c
  head/sys/contrib/dev/acpica/components/events/evxface.c
  head/sys/contrib/dev/acpica/components/events/evxfevnt.c
  head/sys/contrib/dev/acpica/components/executer/exprep.c
  head/sys/contrib/dev/acpica/components/executer/exutils.c
  head/sys/contrib/dev/acpica/components/hardware/hwacpi.c
  head/sys/contrib/dev/acpica/components/namespace/nspredef.c
  head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c
  head/sys/contrib/dev/acpica/components/namespace/nsrepair.c
  head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
  head/sys/contrib/dev/acpica/components/namespace/nsutils.c
  head/sys/contrib/dev/acpica/components/parser/psargs.c
  head/sys/contrib/dev/acpica/components/resources/rscalc.c
  head/sys/contrib/dev/acpica/components/resources/rsdump.c
  head/sys/contrib/dev/acpica/components/resources/rslist.c
  head/sys/contrib/dev/acpica/components/resources/rsxface.c
  head/sys/contrib/dev/acpica/components/utilities/utaddress.c
  head/sys/contrib/dev/acpica/components/utilities/utexcep.c
  head/sys/contrib/dev/acpica/components/utilities/utglobal.c
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/acexcep.h
  head/sys/contrib/dev/acpica/include/acglobal.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acoutput.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbl2.h
  head/sys/contrib/dev/acpica/include/actbl3.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/sys/modules/acpi/acpi/Makefile
  head/usr.sbin/acpi/acpidb/Makefile
  head/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)
  head/sys/contrib/dev/acpica/common/   (props changed)
  head/sys/contrib/dev/acpica/compiler/   (props changed)
  head/sys/contrib/dev/acpica/components/debugger/   (props changed)
  head/sys/contrib/dev/acpica/components/dispatcher/   (props changed)
  head/sys/contrib/dev/acpica/components/events/   (props changed)
  head/sys/contrib/dev/acpica/components/executer/   (props changed)
  head/sys/contrib/dev/acpica/components/hardware/   (props changed)
  head/sys/contrib/dev/acpica/components/namespace/   (props changed)
  head/sys/contrib/dev/acpica/components/parser/   (props changed)
  head/sys/contrib/dev/acpica/components/resources/   (props changed)
  head/sys/contrib/dev/acpica/components/utilities/   (props changed)
  head/sys/contrib/dev/acpica/include/   (props changed)

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri Feb 15 19:13:35 2013(r246848)
+++ head/sys/conf/files Fri Feb 15 20:36:28 2013(r246849)
@@ -371,6 +371,7 @@ contrib/dev/acpica/components/hardware/h
 contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi
 contrib/dev/acpica/components/namespace/nsaccess.c optional acpi
 contrib/dev/acpica/components/namespace/nsalloc.c  optional acpi
+contrib/dev/acpica/components/namespace/nsconvert.coptional acpi
 contrib/dev/acpica/components/namespace/nsdump.c   

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

2013-02-15 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Feb 15 21:24:21 2013
New Revision: 246850
URL: http://svnweb.freebsd.org/changeset/base/246850

Log:
  Fix copy-paste error in bus_space_unmap argument
  
  While I'm at it - fix some style(9) issues
  
  Submitted by: Mikael Urankar

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

Modified: head/sys/arm/ti/ti_cpuid.c
==
--- head/sys/arm/ti/ti_cpuid.c  Fri Feb 15 20:36:28 2013(r246849)
+++ head/sys/arm/ti/ti_cpuid.c  Fri Feb 15 21:24:21 2013(r246850)
@@ -109,8 +109,7 @@ omap4_get_revision(void)
 *   STD_FUSE_PROD_ID_0   0x4A00 2214
 *   STD_FUSE_PROD_ID_1   0x4A00 2218
 */
-   // id_code = REG_READ32(OMAP44XX_L4_CORE_VBASE + OMAP4_ID_CODE); 
-   //FIXME Should we map somewhere else?
+   /* FIXME Should we map somewhere else? */
bus_space_map(fdtbus_bs_tag,OMAP44XX_L4_CORE_HWBASE, 0x4000, 0, bsh);
id_code = bus_space_read_4(fdtbus_bs_tag, bsh, OMAP4_ID_CODE);
bus_space_unmap(fdtbus_bs_tag, bsh, 0x4000);
@@ -228,10 +227,9 @@ omap3_get_revision(void)
 *
 *
 */
-   //id_code = REG_READ32(OMAP35XX_L4_WAKEUP_VBASE + OMAP3_ID_CODE);
-   bus_space_map(fdtbus_bs_tag,OMAP35XX_L4_WAKEUP_HWBASE, 0x1, 0, 
bsh);
+   bus_space_map(fdtbus_bs_tag, OMAP35XX_L4_WAKEUP_HWBASE, 0x1, 0, 
bsh);
id_code = bus_space_read_4(fdtbus_bs_tag, bsh, OMAP3_ID_CODE);
-   bus_space_unmap(fdtbus_bs_tag, bsh, 0x4000);
+   bus_space_unmap(fdtbus_bs_tag, bsh, 0x1);
 
hawkeye = ((id_code  12)  0x);
revision = ((id_code  28)  0xf);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r246827 - in head: contrib/ldns contrib/ldns/compat contrib/ldns/drill contrib/ldns/ldns lib lib/libldns share/mk tools/build/options

2013-02-15 Thread Dag-Erling Smørgrav
Jan Beich jbe...@tormail.org writes:
 Why the underscore? lib/libldns/Makefile doesn't have it.

Typo, or rather leftover from an earlier version.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

Re: svn commit: r246827 - in head: contrib/ldns contrib/ldns/compat contrib/ldns/drill contrib/ldns/ldns lib lib/libldns share/mk tools/build/options

2013-02-15 Thread Dag-Erling Smørgrav
Jan Beich jbe...@tormail.org writes:
 Not that WITH_LDNS build would succeed anyway:

   === lib/libldns (depend)
   /usr/src/lib/libldns/../../contrib/ldns/buffer.c:10:10: fatal error: 
 'ldns/config.
   h' file not found
   #include ldns/config.h
^
   1 error generated.
   mkdep: compile failed
   *** [.depend] Error code 1

Frak, I forgot to commit the generated files :(

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

svn commit: r246851 - in head/sys: arm/allwinner boot/fdt/dts

2013-02-15 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Feb 15 21:29:03 2013
New Revision: 246851
URL: http://svnweb.freebsd.org/changeset/base/246851

Log:
  Enable USB1 (which is EHCI0) for Allwinner A10
  
  Tested by: ganbold@

Modified:
  head/sys/arm/allwinner/a10_clk.c
  head/sys/arm/allwinner/a10_clk.h
  head/sys/arm/allwinner/a10_ehci.c
  head/sys/boot/fdt/dts/cubieboard.dts

Modified: head/sys/arm/allwinner/a10_clk.c
==
--- head/sys/arm/allwinner/a10_clk.cFri Feb 15 21:24:21 2013
(r246850)
+++ head/sys/arm/allwinner/a10_clk.cFri Feb 15 21:29:03 2013
(r246851)
@@ -129,6 +129,7 @@ a10_clk_usb_activate(void)
/* Gating AHB clock for USB */
reg_value = ccm_read_4(sc, CCM_AHB_GATING0);
reg_value |= CCM_AHB_GATING_USB0; /* AHB clock gate usb0 */
+   reg_value |= CCM_AHB_GATING_EHCI0; /* AHB clock gate ehci1 */
reg_value |= CCM_AHB_GATING_EHCI1; /* AHB clock gate ehci1 */
ccm_write_4(sc, CCM_AHB_GATING0, reg_value);
 

Modified: head/sys/arm/allwinner/a10_clk.h
==
--- head/sys/arm/allwinner/a10_clk.hFri Feb 15 21:24:21 2013
(r246850)
+++ head/sys/arm/allwinner/a10_clk.hFri Feb 15 21:29:03 2013
(r246851)
@@ -101,6 +101,7 @@
 #define CCM_MALI400_CLK0x0154
 
 #define CCM_AHB_GATING_USB0(1  0)
+#define CCM_AHB_GATING_EHCI0   (1  1)
 #define CCM_AHB_GATING_EHCI1   (1  3)
 
 #define CCM_USB_PHY(1  8)

Modified: head/sys/arm/allwinner/a10_ehci.c
==
--- head/sys/arm/allwinner/a10_ehci.c   Fri Feb 15 21:24:21 2013
(r246850)
+++ head/sys/arm/allwinner/a10_ehci.c   Fri Feb 15 21:29:03 2013
(r246851)
@@ -75,6 +75,7 @@ __FBSDID($FreeBSD$);
 #define SW_AHB_INCRX_ALIGN (1  8)
 #define SW_AHB_INCR4   (1  9)
 #define SW_AHB_INCR8   (1  10)
+#define GPIO_USB1_PWR  230
 #define GPIO_USB2_PWR  227
 
 #define A10_READ_4(sc, reg)\
@@ -182,6 +183,10 @@ a10_ehci_attach(device_t self)
GPIO_PIN_SETFLAGS(sc_gpio_dev, GPIO_USB2_PWR, GPIO_PIN_OUTPUT);
GPIO_PIN_SET(sc_gpio_dev, GPIO_USB2_PWR, GPIO_PIN_HIGH);
 
+   /* Give power to USB */
+   GPIO_PIN_SETFLAGS(sc_gpio_dev, GPIO_USB1_PWR, GPIO_PIN_OUTPUT);
+   GPIO_PIN_SET(sc_gpio_dev, GPIO_USB1_PWR, GPIO_PIN_HIGH);
+
/* Enable passby */
reg_value = A10_READ_4(sc, SW_USB_PMU_IRQ_ENABLE);
reg_value |= SW_AHB_INCR8; /* AHB INCR8 enable */

Modified: head/sys/boot/fdt/dts/cubieboard.dts
==
--- head/sys/boot/fdt/dts/cubieboard.dtsFri Feb 15 21:24:21 2013
(r246850)
+++ head/sys/boot/fdt/dts/cubieboard.dtsFri Feb 15 21:29:03 2013
(r246851)
@@ -91,7 +91,14 @@
interrupt-parent = AINTC;
};
 
-   usb1: usb@01c1c000 {
+   usb1: usb@01c14000 {
+   compatible = allwinner,usb-ehci, usb-ehci;
+   reg = 0x01c14000 0x1000;
+   interrupts =  39 ;
+   interrupt-parent = AINTC;
+   };
+
+   usb2: usb@01c1c000 {
compatible = allwinner,usb-ehci, usb-ehci;
reg = 0x01c1c000 0x1000;
interrupts =  40 ;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246852 - head/share/mk

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 21:31:01 2013
New Revision: 246852
URL: http://svnweb.freebsd.org/changeset/base/246852

Log:
  fix leftover from an earlier experiment

Modified:
  head/share/mk/bsd.libnames.mk

Modified: head/share/mk/bsd.libnames.mk
==
--- head/share/mk/bsd.libnames.mk   Fri Feb 15 21:29:03 2013
(r246851)
+++ head/share/mk/bsd.libnames.mk   Fri Feb 15 21:31:01 2013
(r246852)
@@ -86,7 +86,7 @@ LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a
 LIBKVM?=   ${DESTDIR}${LIBDIR}/libkvm.a
 LIBL?= ${DESTDIR}${LIBDIR}/libl.a
 .if ${MK_LDNS} != no
-LIBLDNS?=  ${DESTDIR}${LIBDIR}/lib_ldns.a
+LIBLDNS?=  ${DESTDIR}${LIBDIR}/libldns.a
 .endif
 LIBLN?=don't use LIBLN, use LIBL
 .if ${MK_BIND} != no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246853 - head/contrib/ldns/ldns

2013-02-15 Thread Dag-Erling Smørgrav
Author: des
Date: Fri Feb 15 21:33:05 2013
New Revision: 246853
URL: http://svnweb.freebsd.org/changeset/base/246853

Log:
  Add generated files

Added:
  head/contrib/ldns/ldns/common.h   (contents, props changed)
  head/contrib/ldns/ldns/config.h   (contents, props changed)
  head/contrib/ldns/ldns/net.h   (contents, props changed)
  head/contrib/ldns/ldns/util.h   (contents, props changed)

Added: head/contrib/ldns/ldns/common.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/ldns/ldns/common.h Fri Feb 15 21:33:05 2013
(r246853)
@@ -0,0 +1,68 @@
+/**
+ * \file common.h
+ *
+ * Common definitions for LDNS
+ */
+
+/**
+ * a Net::DNS like library for C
+ *
+ * (c) NLnet Labs, 2004-2006
+ *
+ * See the file LICENSE for the license
+ */
+
+#ifndef LDNS_COMMON_H
+#define LDNS_COMMON_H
+
+/*
+ * The build configuration that is used in the distributed headers,
+ * as detected and determined by the auto configure script.
+ */
+#define LDNS_BUILD_CONFIG_HAVE_SSL 1
+#define LDNS_BUILD_CONFIG_HAVE_INTTYPES_H  1
+#define LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT 1
+#define LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED 1
+
+/*
+ * HAVE_STDBOOL_H is not available when distributed as a library, but no build 
+ * configuration variables may be used (like those above) because the header
+ * is sometimes only available when using special compiler flags to enable the
+ * c99 environment. Because we cannot force the usage of this flag, we have to
+ * provide a default type. Below what is suggested by the autoconf manual.
+ */
+/*@ignore@*/
+/* splint barfs on this construct */
+#ifdef HAVE_STDBOOL_H
+# include stdbool.h
+#else
+# ifndef HAVE__BOOL
+#  ifdef __cplusplus
+typedef bool _Bool;
+#  else
+#   define _Bool signed char
+#  endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
+/*@end@*/
+
+#if LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT
+#define ATTR_FORMAT(archetype, string_index, first_to_check) \
+__attribute__ ((format (archetype, string_index, first_to_check)))
+#else /* !LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT */
+#define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
+#endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT */
+
+#if defined(__cplusplus)
+#define ATTR_UNUSED(x)
+#elif LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED
+#define ATTR_UNUSED(x)  x __attribute__((unused))
+#else /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */
+#define ATTR_UNUSED(x)  x
+#endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */
+
+#endif /* LDNS_COMMON_H */

Added: head/contrib/ldns/ldns/config.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/ldns/ldns/config.h Fri Feb 15 21:33:05 2013
(r246853)
@@ -0,0 +1,556 @@
+/* ldns/config.h.  Generated from config.h.in by configure.  */
+/* ldns/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define to 1 if you have the arpa/inet.h header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Whether the C compiler accepts the format attribute */
+#define HAVE_ATTR_FORMAT 1
+
+/* Whether the C compiler accepts the unused attribute */
+#define HAVE_ATTR_UNUSED 1
+
+/* Define to 1 if you have the `b32_ntop' function. */
+/* #undef HAVE_B32_NTOP */
+
+/* Define to 1 if you have the `b32_pton' function. */
+/* #undef HAVE_B32_PTON */
+
+/* Define to 1 if you have the `b64_ntop' function. */
+/* #undef HAVE_B64_NTOP */
+
+/* Define to 1 if you have the `b64_pton' function. */
+/* #undef HAVE_B64_PTON */
+
+/* Define to 1 if you have the `bzero' function. */
+#define HAVE_BZERO 1
+
+/* Define to 1 if you have the `calloc' function. */
+#define HAVE_CALLOC 1
+
+/* Define to 1 if you have the `ctime_r' function. */
+#define HAVE_CTIME_R 1
+
+/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
+   don't. */
+#define HAVE_DECL_NID_SECP384R1 1
+
+/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
+   if you don't. */
+#define HAVE_DECL_NID_X9_62_PRIME256V1 1
+
+/* Define to 1 if you have the dlfcn.h header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `endprotoent' function. */
+#define HAVE_ENDPROTOENT 1
+
+/* Define to 1 if you have the `endservent' function. */
+#define HAVE_ENDSERVENT 1
+
+/* Define to 1 if you have the `EVP_sha256' function. */
+#define HAVE_EVP_SHA256 1
+
+/* Define to 1 if you have the `fcntl' function. */
+#define HAVE_FCNTL 1
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
+
+/* Whether getaddrinfo is available */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the getopt.h header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `gmtime_r' 

svn commit: r246855 - in head/sys: amd64/acpica amd64/amd64 i386/acpica i386/i386 i386/xen

2013-02-15 Thread Jung-uk Kim
Author: jkim
Date: Fri Feb 15 22:43:08 2013
New Revision: 246855
URL: http://svnweb.freebsd.org/changeset/base/246855

Log:
  Consistently use round_page(x) rather than roundup(x, PAGE_SIZE).  There is
  no functional change.

Modified:
  head/sys/amd64/acpica/acpi_machdep.c
  head/sys/amd64/amd64/pmap.c
  head/sys/i386/acpica/acpi_machdep.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/xen/pmap.c

Modified: head/sys/amd64/acpica/acpi_machdep.c
==
--- head/sys/amd64/acpica/acpi_machdep.cFri Feb 15 21:49:12 2013
(r246854)
+++ head/sys/amd64/acpica/acpi_machdep.cFri Feb 15 22:43:08 2013
(r246855)
@@ -122,7 +122,7 @@ table_map(vm_paddr_t pa, int offset, vm_
void *data;
 
off = pa  PAGE_MASK;
-   length = roundup(length + off, PAGE_SIZE);
+   length = round_page(length + off);
pa = pa  PG_FRAME;
va = (vm_offset_t)pmap_kenter_temporary(pa, offset) +
(offset * PAGE_SIZE);
@@ -146,7 +146,7 @@ table_unmap(void *data, vm_offset_t leng
 
va = (vm_offset_t)data;
off = va  PAGE_MASK;
-   length = roundup(length + off, PAGE_SIZE);
+   length = round_page(length + off);
va = ~PAGE_MASK;
while (length  0) {
pmap_kremove(va);

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Fri Feb 15 21:49:12 2013(r246854)
+++ head/sys/amd64/amd64/pmap.c Fri Feb 15 22:43:08 2013(r246855)
@@ -5015,7 +5015,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_
return ((void *)va);
}
offset = pa  PAGE_MASK;
-   size = roundup(offset + size, PAGE_SIZE);
+   size = round_page(offset + size);
va = kmem_alloc_nofault(kernel_map, size);
if (!va)
panic(pmap_mapdev: Couldn't alloc kernel virtual memory);
@@ -5051,7 +5051,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t 
return;
base = trunc_page(va);
offset = va  PAGE_MASK;
-   size = roundup(offset + size, PAGE_SIZE);
+   size = round_page(offset + size);
kmem_free(kernel_map, base, size);
 }
 
@@ -5173,7 +5173,7 @@ pmap_change_attr_locked(vm_offset_t va, 
PMAP_LOCK_ASSERT(kernel_pmap, MA_OWNED);
base = trunc_page(va);
offset = va  PAGE_MASK;
-   size = roundup(offset + size, PAGE_SIZE);
+   size = round_page(offset + size);
 
/*
 * Only supported on kernel virtual addresses, including the direct

Modified: head/sys/i386/acpica/acpi_machdep.c
==
--- head/sys/i386/acpica/acpi_machdep.c Fri Feb 15 21:49:12 2013
(r246854)
+++ head/sys/i386/acpica/acpi_machdep.c Fri Feb 15 22:43:08 2013
(r246855)
@@ -139,7 +139,7 @@ table_map(vm_paddr_t pa, int offset, vm_
void *data;
 
off = pa  PAGE_MASK;
-   length = roundup(length + off, PAGE_SIZE);
+   length = round_page(length + off);
pa = pa  PG_FRAME;
va = (vm_offset_t)pmap_kenter_temporary(pa, offset) +
(offset * PAGE_SIZE);
@@ -163,7 +163,7 @@ table_unmap(void *data, vm_offset_t leng
 
va = (vm_offset_t)data;
off = va  PAGE_MASK;
-   length = roundup(length + off, PAGE_SIZE);
+   length = round_page(length + off);
va = ~PAGE_MASK;
while (length  0) {
pmap_kremove(va);

Modified: head/sys/i386/i386/pmap.c
==
--- head/sys/i386/i386/pmap.c   Fri Feb 15 21:49:12 2013(r246854)
+++ head/sys/i386/i386/pmap.c   Fri Feb 15 22:43:08 2013(r246855)
@@ -4989,7 +4989,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_
vm_size_t tmpsize;
 
offset = pa  PAGE_MASK;
-   size = roundup(offset + size, PAGE_SIZE);
+   size = round_page(offset + size);
pa = pa  PG_FRAME;
 
if (pa  KERNLOAD  pa + size = KERNLOAD)
@@ -5029,7 +5029,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t 
return;
base = trunc_page(va);
offset = va  PAGE_MASK;
-   size = roundup(offset + size, PAGE_SIZE);
+   size = round_page(offset + size);
kmem_free(kernel_map, base, size);
 }
 
@@ -5120,7 +5120,7 @@ pmap_change_attr(vm_offset_t va, vm_size
 
base = trunc_page(va);
offset = va  PAGE_MASK;
-   size = roundup(offset + size, PAGE_SIZE);
+   size = round_page(offset + size);
 
/*
 * Only supported on kernel virtual addresses above the recursive map.

Modified: head/sys/i386/xen/pmap.c
==
--- head/sys/i386/xen/pmap.cFri Feb 15 21:49:12 2013(r246854)
+++ head/sys/i386/xen/pmap.cFri Feb 15 22:43:08 2013(r246855)
@@ -3973,7 

svn commit: r246856 - head/etc

2013-02-15 Thread Jung-uk Kim
Author: jkim
Date: Fri Feb 15 22:58:44 2013
New Revision: 246856
URL: http://svnweb.freebsd.org/changeset/base/246856

Log:
  Revert r227528 and r227787.  This hack is no longer necessary since r233580.

Modified:
  head/etc/rc.resume

Modified: head/etc/rc.resume
==
--- head/etc/rc.resume  Fri Feb 15 22:43:08 2013(r246855)
+++ head/etc/rc.resume  Fri Feb 15 22:58:44 2013(r246856)
@@ -43,10 +43,6 @@ if [ -r /var/run/rc.suspend.pid ]; then
echo 'rc.resume: killed rc.suspend that was still around'
 fi
 
-if [ -r /var/run/moused.pid ]; then
-   pkill -HUP -F /var/run/moused.pid
-fi
-
 # Turns on a power supply of a card in the slot inactivated.
 # See also contrib/pccardq.c (only for PAO users).
 # pccardq | awk -F '~' '$5 == inactive \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246857 - head/gnu/lib/libstdc++

2013-02-15 Thread Dimitry Andric
Author: dim
Date: Fri Feb 15 23:12:35 2013
New Revision: 246857
URL: http://svnweb.freebsd.org/changeset/base/246857

Log:
  Regenerate libstdc++'s config.h, synchronizing it with our current
  almost-C99 headers.
  
  MFC after:1 week

Modified:
  head/gnu/lib/libstdc++/config.h

Modified: head/gnu/lib/libstdc++/config.h
==
--- head/gnu/lib/libstdc++/config.h Fri Feb 15 22:58:44 2013
(r246856)
+++ head/gnu/lib/libstdc++/config.h Fri Feb 15 23:12:35 2013
(r246857)
@@ -22,7 +22,7 @@
 #define HAVE_ATAN2F 1
 
 /* Define to 1 if you have the `atan2l' function. */
-/* #undef HAVE_ATAN2L */
+#define HAVE_ATAN2L 1
 
 /* Define to 1 if you have the `atanf' function. */
 #define HAVE_ATANF 1
@@ -67,7 +67,7 @@
 #define HAVE_EXPF 1
 
 /* Define to 1 if you have the `expl' function. */
-/* #undef HAVE_EXPL */
+#define HAVE_EXPL 1
 
 /* Define to 1 if you have the `fabsf' function. */
 #define HAVE_FABSF 1
@@ -100,7 +100,7 @@
 #define HAVE_FMODF 1
 
 /* Define to 1 if you have the `fmodl' function. */
-/* #undef HAVE_FMODL */
+#define HAVE_FMODL 1
 
 /* Define to 1 if you have the `fpclass' function. */
 /* #undef HAVE_FPCLASS */
@@ -134,7 +134,7 @@
 #define HAVE_HYPOTF 1
 
 /* Define to 1 if you have the `hypotl' function. */
-/* #undef HAVE_HYPOTL */
+#define HAVE_HYPOTL 1
 
 /* Define to 1 if you have the `iconv' function. */
 /* #undef HAVE_ICONV */
@@ -293,7 +293,7 @@
 #define HAVE_SQRTF 1
 
 /* Define to 1 if you have the `sqrtl' function. */
-/* #undef HAVE_SQRTL */
+#define HAVE_SQRTL 1
 
 /* Define to 1 if you have the stdbool.h header file. */
 #define HAVE_STDBOOL_H 1
@@ -304,6 +304,12 @@
 /* Define to 1 if you have the stdlib.h header file. */
 #define HAVE_STDLIB_H 1
 
+/* Define if strerror_l is available in string.h. */
+/* #undef HAVE_STRERROR_L */
+
+/* Define if strerror_r is available in string.h. */
+#define HAVE_STRERROR_R 1
+
 /* Define to 1 if you have the strings.h header file. */
 #define HAVE_STRINGS_H 1
 
@@ -316,6 +322,9 @@
 /* Define to 1 if you have the `strtold' function. */
 #define HAVE_STRTOLD 1
 
+/* Define if strxfrm_l is available in string.h. */
+/* #undef HAVE_STRXFRM_L */
+
 /* Define to 1 if you have the sys/filio.h header file. */
 #define HAVE_SYS_FILIO_H 1
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246858 - head/contrib/llvm/lib/Target/X86

2013-02-15 Thread Dimitry Andric
Author: dim
Date: Fri Feb 15 23:12:58 2013
New Revision: 246858
URL: http://svnweb.freebsd.org/changeset/base/246858

Log:
  Pull in r175057 from upstream llvm trunk:
  
X86: Disable generation of rep;movsl when %esi is used as a base pointer.
  
This happens when there is both stack realignment and a dynamic alloca in 
the
function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose 
the
base pointer and the next register spill will write into oblivion.
  
Fixes PR15249 and unbreaks firefox on i386/freebsd. Mozilla uses dynamic 
allocas
and freebsd a 4 byte stack alignment.
  
  MFC after:1 week

Modified:
  head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp

Modified: head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
==
--- head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cppFri Feb 15 
23:12:35 2013(r246857)
+++ head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cppFri Feb 15 
23:12:58 2013(r246858)
@@ -202,6 +202,14 @@ X86SelectionDAGInfo::EmitTargetCodeForMe
   SrcPtrInfo.getAddrSpace() = 256)
 return SDValue();
 
+  // ESI might be used as a base pointer, in that case we can't simply 
overwrite
+  // the register.  Fall back to generic code.
+  const X86RegisterInfo *TRI =
+  static_castconst X86RegisterInfo *(DAG.getTarget().getRegisterInfo());
+  if (TRI-hasBasePointer(DAG.getMachineFunction()) 
+  TRI-getBaseRegister() == X86::ESI)
+return SDValue();
+
   MVT AVT;
   if (Align  1)
 AVT = MVT::i8;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246859 - head/sys/arm/arm

2013-02-15 Thread Ian Lepore
Author: ian
Date: Fri Feb 15 23:41:47 2013
New Revision: 246859
URL: http://svnweb.freebsd.org/changeset/base/246859

Log:
  Set map-pmap before _bus_dmamap_count_pages() tries to use it.
  
  Obtained from:Thomas Skibo thomassk...@sbcglobal.net

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cFri Feb 15 23:12:58 2013
(r246858)
+++ head/sys/arm/arm/busdma_machdep-v6.cFri Feb 15 23:41:47 2013
(r246859)
@@ -968,6 +968,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
if (segs == NULL)
segs = dmat-segments;
 
+   map-pmap = pmap;
+
if ((dmat-flags  BUS_DMA_COULD_BOUNCE) != 0) {
_bus_dmamap_count_pages(dmat, map, buf, buflen, flags);
if (map-pagesneeded != 0) {
@@ -979,7 +981,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 
sl = NULL;
vaddr = (vm_offset_t)buf;
-   map-pmap = pmap;
 
while (buflen  0) {
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246860 - head/usr.bin/mail

2013-02-15 Thread Dimitry Andric
Author: dim
Date: Fri Feb 15 23:59:57 2013
New Revision: 246860
URL: http://svnweb.freebsd.org/changeset/base/246860

Log:
  Fix undefined behaviour in usr.bin/mail/util.c.
  
  Reported by:  deeptec...@gmail.com
  MFC after:3 days

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

Modified: head/usr.bin/mail/util.c
==
--- head/usr.bin/mail/util.cFri Feb 15 23:41:47 2013(r246859)
+++ head/usr.bin/mail/util.cFri Feb 15 23:59:57 2013(r246860)
@@ -236,8 +236,8 @@ istrncpy(char *dest, const char *src, si
 {
 
strlcpy(dest, src, dsize);
-   while (*dest)
-   *dest++ = tolower((unsigned char)*dest);
+   for (; *dest; dest++)
+   *dest = tolower((unsigned char)*dest);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246861 - head/sys/net80211

2013-02-15 Thread Adrian Chadd
Author: adrian
Date: Sat Feb 16 00:12:21 2013
New Revision: 246861
URL: http://svnweb.freebsd.org/changeset/base/246861

Log:
  Fix an incorrect sizeof()
  
  Spotted by:   clang
  
  Submitted by: dim

Modified:
  head/sys/net80211/ieee80211_mesh.c

Modified: head/sys/net80211/ieee80211_mesh.c
==
--- head/sys/net80211/ieee80211_mesh.c  Fri Feb 15 23:59:57 2013
(r246860)
+++ head/sys/net80211/ieee80211_mesh.c  Sat Feb 16 00:12:21 2013
(r246861)
@@ -2625,7 +2625,7 @@ mesh_parse_meshgate_action(struct ieee80
switch (*frm) {
case IEEE80211_ELEMID_MESHGANN:
gannie = (const struct ieee80211_meshgann_ie *) frm;
-   memset(ie, 0, sizeof(ie));
+   memset(ie, 0, sizeof(*ie));
ie-gann_ie = gannie-gann_ie;
ie-gann_len = gannie-gann_len;
ie-gann_flags = gannie-gann_flags;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246872 - head/lib/libc/gen

2013-02-15 Thread David Xu
Author: davidxu
Date: Sat Feb 16 06:07:07 2013
New Revision: 246872
URL: http://svnweb.freebsd.org/changeset/base/246872

Log:
  Simplify code by using flag O_EXLOCK.
  
  PR: kern/175674

Modified:
  head/lib/libc/gen/sem_new.c

Modified: head/lib/libc/gen/sem_new.c
==
--- head/lib/libc/gen/sem_new.c Sat Feb 16 05:22:48 2013(r246871)
+++ head/lib/libc/gen/sem_new.c Sat Feb 16 06:07:07 2013(r246872)
@@ -198,15 +198,11 @@ _sem_open(const char *name, int flags, .
goto error;
}
 
-   fd = _open(path, flags|O_RDWR|O_CLOEXEC, mode);
+   fd = _open(path, flags|O_RDWR|O_CLOEXEC|O_EXLOCK, mode);
if (fd == -1)
goto error;
-   if (flock(fd, LOCK_EX) == -1)
+   if (_fstat(fd, sb))
goto error;
-   if (_fstat(fd, sb)) {
-   flock(fd, LOCK_UN);
-   goto error;
-   }
if (sb.st_size  sizeof(sem_t)) {
sem_t tmp;
 
@@ -214,10 +210,8 @@ _sem_open(const char *name, int flags, .
tmp._kern._has_waiters = 0;
tmp._kern._count = value;
tmp._kern._flags = USYNC_PROCESS_SHARED | SEM_NAMED;
-   if (_write(fd, tmp, sizeof(tmp)) != sizeof(tmp)) {
-   flock(fd, LOCK_UN);
+   if (_write(fd, tmp, sizeof(tmp)) != sizeof(tmp))
goto error;
-   }
}
flock(fd, LOCK_UN);
sem = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r246204 - head/sys/arm/include

2013-02-15 Thread Oleksandr Tymoshenko

On 2013-02-01, at 2:26 AM, Andre Oppermann an...@freebsd.org wrote:

 Author: andre
 Date: Fri Feb  1 10:26:31 2013
 New Revision: 246204
 URL: http://svnweb.freebsd.org/changeset/base/246204
 
 Log:
  Add VM_KMEM_SIZE_SCALE parameter set to 2 (50%) for all ARM platforms.
 
  VM_KMEM_SIZE_SCALE specifies which fraction of the available physical
  memory, after deduction of the kernel itself and other early statically
  allocated memory, can be used for the kmem_map.  The kmem_map provides
  for all UMA/malloc allocations in KVM space.
 
  Previously ARM was using a fixed kmem_map size of (12*1024*1024) = 12MB
  without regard to effectively available memory.  This is too small for
  recent ARM SoC with more than 128MB of RAM.
 
  For reference a description of others related kmem_map parameters:
 
   VM_KMEM_SIZEdefault start size of kmem_map if SCALE is
   not defined
   VM_KMEM_SIZE_MINhard floor on the kmem_map size
   VM_KMEM_SIZE_MAXhard ceiling on the kmem_map size
   VM_KMEM_SIZE_SCALE  fraction of the available real memory to
   be used for the kmem_map, limited by the
   MIN and MAX parameters.
 
  Tested by:   ian
  MFC after:   1 week

Hi Andre,

this commit brake my Pandaboard with 1GB of memory. It panics early with 
following message:

kmem_suballoc: bad status return of 3 

If you need additional info/debugging - just let me know. 

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