svn commit: r284885 - head/sys/boot/pc98/boot2

2015-06-27 Thread Takahashi Yoshihiro
Author: nyan
Date: Sat Jun 27 08:49:41 2015
New Revision: 284885
URL: https://svnweb.freebsd.org/changeset/base/284885

Log:
  MFi386: r284878
  
Reduce warnings:
  
 - Add prototype for boot2 main()
 - Don't make assignment within if statement, split it into two.

Modified:
  head/sys/boot/pc98/boot2/boot2.c

Modified: head/sys/boot/pc98/boot2/boot2.c
==
--- head/sys/boot/pc98/boot2/boot2.cSat Jun 27 05:18:08 2015
(r284884)
+++ head/sys/boot/pc98/boot2/boot2.cSat Jun 27 08:49:41 2015
(r284885)
@@ -152,6 +152,7 @@ static int comspeed = SIOSPD;
 static uint8_t ioctrl = IO_KEYBOARD;
 #endif
 
+int main(void);
 void exit(int);
 static void load(void);
 static int parse(void);
@@ -620,7 +621,8 @@ parse()
dsk.daua = dsk.disk | dsk.unit;
dsk_meta = 0;
}
-   if (k = ep - arg) {
+   k = ep - arg;
+   if (k > 0) {
if (k >= sizeof(knamebuf))
return -1;
memcpy(knamebuf, arg, k + 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: r284886 - head/sys/dev/fe

2015-06-27 Thread Takahashi Yoshihiro
Author: nyan
Date: Sat Jun 27 09:01:49 2015
New Revision: 284886
URL: https://svnweb.freebsd.org/changeset/base/284886

Log:
  MFi386: r278165
  
Silence a coverity warning about ignoring a return value.

Modified:
  head/sys/dev/fe/if_fe_cbus.c

Modified: head/sys/dev/fe/if_fe_cbus.c
==
--- head/sys/dev/fe/if_fe_cbus.cSat Jun 27 08:49:41 2015
(r284885)
+++ head/sys/dev/fe/if_fe_cbus.cSat Jun 27 09:01:49 2015
(r284886)
@@ -157,10 +157,21 @@ static int
 fe_isa_attach(device_t dev)
 {
struct fe_softc *sc = device_get_softc(dev);
+   int error = 0;
 
-   if (sc->port_used)
-   fe98_alloc_port(dev, sc->type);
-   fe_alloc_irq(dev, 0);
+   /*
+* Note: these routines aren't expected to fail since we also call
+* them in the probe routine.  But coverity complains, so we'll honor
+* that complaint since the intention here was never to ignore them..
+*/
+   if (sc->port_used) {
+   error = fe98_alloc_port(dev, sc->type);
+   if (error != 0)
+   return (error);
+   }
+   error = fe_alloc_irq(dev, 0);
+   if (error != 0)
+   return (error);
 
return fe_attach(dev);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r284887 - in head/sys: kern sys ufs/ffs

2015-06-27 Thread Konstantin Belousov
Author: kib
Date: Sat Jun 27 09:44:14 2015
New Revision: 284887
URL: https://svnweb.freebsd.org/changeset/base/284887

Log:
  Handle errors from background write of the cylinder group blocks.
  
  First, on the write error, bufdone() call from ffs_backgroundwrite()
  panics because pbrelvp() cleared bp->b_bufobj, while brelse() would
  try to re-dirty the copy of the cg buffer.  Handle this by setting
  B_INVAL for the case of BIO_ERROR.
  
  Second, we must re-dirty the real buffer containing the cylinder group
  block data when background write failed.  Real cg buffer was already
  marked clean in ffs_bufwrite(). After the BV_BKGRDINPROG flag is
  cleared on the real cg buffer in ffs_backgroundwrite(), buffer scan
  may reuse the buffer at any moment. The result is lost write, and if
  the write error was only transient, we get corrupted bitmaps.
  
  We cannot re-dirty the original cg buffer in the
  ffs_backgroundwritedone(), since the context is not sleepable,
  preventing us from sleeping for origbp' lock.  Add BV_BKGDERR flag
  (protected by the buffer object lock), which is converted into delayed
  write by brelse(), bqrelse() and buffer scan.
  
  In collaboration with:Conrad Meyer 
  Reviewed by:  mckusick
  Sponsored by: The FreeBSD Foundation (kib),
  EMC/Isilon storage division (Conrad)
  MFC after:2 weeks

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/sys/buf.h
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Sat Jun 27 09:01:49 2015(r284886)
+++ head/sys/kern/vfs_bio.c Sat Jun 27 09:44:14 2015(r284887)
@@ -1597,6 +1597,12 @@ brelse(struct buf *bp)
return;
}
 
+   if ((bp->b_vflags & (BV_BKGRDINPROG | BV_BKGRDERR)) == BV_BKGRDERR) {
+   BO_LOCK(bp->b_bufobj);
+   bp->b_vflags &= ~BV_BKGRDERR;
+   BO_UNLOCK(bp->b_bufobj);
+   bdirty(bp);
+   }
if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) &&
bp->b_error == EIO && !(bp->b_flags & B_INVAL)) {
/*
@@ -1853,7 +1859,11 @@ bqrelse(struct buf *bp)
}
 
/* buffers with stale but valid contents */
-   if (bp->b_flags & B_DELWRI) {
+   if ((bp->b_flags & B_DELWRI) != 0 || (bp->b_vflags & (BV_BKGRDINPROG |
+   BV_BKGRDERR)) == BV_BKGRDERR) {
+   BO_LOCK(bp->b_bufobj);
+   bp->b_vflags &= ~BV_BKGRDERR;
+   BO_UNLOCK(bp->b_bufobj);
qindex = QUEUE_DIRTY;
} else {
if ((bp->b_flags & B_DELWRI) == 0 &&
@@ -2372,6 +2382,16 @@ restart:
continue;
}
 
+   /*
+* Requeue the background write buffer with error.
+*/
+   if ((bp->b_vflags & BV_BKGRDERR) != 0) {
+   bremfreel(bp);
+   mtx_unlock(&bqclean);
+   bqrelse(bp);
+   continue;
+   }
+
KASSERT(bp->b_qindex == qindex,
("getnewbuf: inconsistent queue %d bp %p", qindex, bp));
 

Modified: head/sys/sys/buf.h
==
--- head/sys/sys/buf.h  Sat Jun 27 09:01:49 2015(r284886)
+++ head/sys/sys/buf.h  Sat Jun 27 09:44:14 2015(r284887)
@@ -253,8 +253,9 @@ struct buf {
 #defineBV_SCANNED  0x0001  /* VOP_FSYNC funcs mark written 
bufs */
 #defineBV_BKGRDINPROG  0x0002  /* Background write in progress 
*/
 #defineBV_BKGRDWAIT0x0004  /* Background write waiting */
+#defineBV_BKGRDERR 0x0008  /* Error from background write 
*/
 
-#definePRINT_BUF_VFLAGS "\20\3bkgrdwait\2bkgrdinprog\1scanned"
+#definePRINT_BUF_VFLAGS 
"\20\4bkgrderr\3bkgrdwait\2bkgrdinprog\1scanned"
 
 #ifdef _KERNEL
 /*

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==
--- head/sys/ufs/ffs/ffs_vfsops.c   Sat Jun 27 09:01:49 2015
(r284886)
+++ head/sys/ufs/ffs/ffs_vfsops.c   Sat Jun 27 09:44:14 2015
(r284887)
@@ -1978,12 +1978,19 @@ ffs_backgroundwritedone(struct buf *bp)
BO_LOCK(bufobj);
if ((origbp = gbincore(bp->b_bufobj, bp->b_lblkno)) == NULL)
panic("backgroundwritedone: lost buffer");
+
+   /*
+* We should mark the cylinder group buffer origbp as
+* dirty, to not loose the failed write.
+*/
+   if ((bp->b_ioflags & BIO_ERROR) != 0)
+   origbp->b_vflags |= BV_BKGRDERR;
BO_UNLOCK(bufobj);
/*
 * Process dependencies then return any unfinished ones.
 */
pbrelvp(bp);
-   if (!LIST_EMPTY(&bp->b_dep))
+   if (!LIST_EMPTY(&bp->b_dep) && (bp->b_ioflags & B

Indebted for driving on toll road #00000629403

2015-06-27 Thread E-ZPass Agent
Notice to Appear,

You have a debt to pay for using a toll road.
Please, do not forget to service your debt.

You can find the invoice is in the attachment.

Sincerely,
Billy Dougherty,
E-ZPass Manager.

___
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: r284889 - head/sys/dev/hyperv/netvsc

2015-06-27 Thread Bjoern A. Zeeb
Author: bz
Date: Sat Jun 27 12:37:09 2015
New Revision: 284889
URL: https://svnweb.freebsd.org/changeset/base/284889

Log:
  Fix compilation without INET6 and without INET and INET6 after
  offload support was introduced in r284746.
  
  While here also fix the ioctl() handler for IPv4 added in r279819,
  which was never compiled in given opt_inet.h was not included.

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Sat Jun 27 09:47:28 
2015(r284888)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Sat Jun 27 12:37:09 
2015(r284889)
@@ -55,6 +55,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_inet6.h"
+#include "opt_inet.h"
+
 #include 
 #include 
 #include 
@@ -179,8 +182,12 @@ static uint32_t get_transport_proto_type
uint16_t ether_type = 0;
int ether_len = 0;
struct ether_vlan_header *eh;
+#ifdef INET
struct ip *iph;
+#endif
+#ifdef INET6
struct ip6_hdr *ip6;
+#endif
 
eh = mtod(m_head, struct ether_vlan_header*);
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
@@ -192,6 +199,7 @@ static uint32_t get_transport_proto_type
}
 
switch (ntohs(ether_type)) {
+#ifdef INET6
case ETHERTYPE_IPV6:
ip6 = (struct ip6_hdr *)(m_head->m_data + ether_len);
 
@@ -201,6 +209,8 @@ static uint32_t get_transport_proto_type
ret_val = TRANSPORT_TYPE_IPV6_UDP;
}
break;
+#endif
+#ifdef INET
case ETHERTYPE_IP:
iph = (struct ip *)(m_head->m_data + ether_len);
 
@@ -210,6 +220,7 @@ static uint32_t get_transport_proto_type
ret_val = TRANSPORT_TYPE_IPV4_UDP;
}
break;
+#endif
default:
ret_val = TRANSPORT_TYPE_NOT_IP;
break;
@@ -608,6 +619,7 @@ do_tso:
tso_info->lso_v2_xmit.type =
RNDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE;

+#ifdef INET
if (trans_proto_type & (TYPE_IPV4 << 16)) {
struct ip *ip =
(struct ip *)(m_head->m_data + ether_len);
@@ -623,7 +635,13 @@ do_tso:
th->th_sum = in_pseudo(ip->ip_src.s_addr,
ip->ip_dst.s_addr,
htons(IPPROTO_TCP));
-   } else {
+   }
+#endif
+#if defined(INET6) && defined(INET)
+   else
+#endif
+#ifdef INET6
+   {
struct ip6_hdr *ip6 =
(struct ip6_hdr *)(m_head->m_data + ether_len);
struct tcphdr *th = (struct tcphdr *)(ip6 + 1);
@@ -633,6 +651,7 @@ do_tso:
ip6->ip6_plen = 0;
th->th_sum = in6_cksum_pseudo(ip6, 0, IPPROTO_TCP, 0);
}
+#endif
tso_info->lso_v2_xmit.tcp_header_offset = 0;
tso_info->lso_v2_xmit.mss = m_head->m_pkthdr.tso_segsz;
 
@@ -950,6 +969,9 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, 
 {
hn_softc_t *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
+#ifdef INET
+   struct ifaddr *ifa = (struct ifaddr *)data;
+#endif
netvsc_device_info device_info;
struct hv_device *hn_dev;
int mask, error = 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: r284890 - head/sys/sys

2015-06-27 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Jun 27 15:13:14 2015
New Revision: 284890
URL: https://svnweb.freebsd.org/changeset/base/284890

Log:
  Change detection for the gnu_inline attribute.
  
  According to the GCC documentation:
  "This attribute is available in GCC 4.1.3 and later. It is available
  if either of the preprocessor macros __GNUC_GNU_INLINE__ or
  __GNUC_STDC_INLINE__ are defined."
  
  We don't keep the gcc granularity up to the minor number so it's
  better to use the documented way. Current clang defines both
  macros.
  
  Reference:
  
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hSat Jun 27 12:37:09 2015(r284889)
+++ head/sys/sys/cdefs.hSat Jun 27 15:13:14 2015(r284890)
@@ -542,7 +542,7 @@
  * using these but GCC-compatible compilers tend to support the extensions
  * well enough to use them in limited cases.
  */ 
-#if __GNUC_PREREQ__(4, 1)
+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__)
 #if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3)
 #define__gnu_inline__attribute__((__gnu_inline__, __artificial__))
 #else
___
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: r284891 - head/etc/rc.d

2015-06-27 Thread Patrick Kelsey
Author: pkelsey
Date: Sat Jun 27 18:01:50 2015
New Revision: 284891
URL: https://svnweb.freebsd.org/changeset/base/284891

Log:
  Use correct flag in iovctl_start().
  
  Differential Revision: https://reviews.freebsd.org/D2921
  Reviewed by: rstone
  Approved by: jmallett (mentor)
  Sponsored by: Norse Corp, Inc.

Modified:
  head/etc/rc.d/iovctl

Modified: head/etc/rc.d/iovctl
==
--- head/etc/rc.d/iovctlSat Jun 27 15:13:14 2015(r284890)
+++ head/etc/rc.d/iovctlSat Jun 27 18:01:50 2015(r284891)
@@ -27,7 +27,7 @@ run_iovctl()
 
 iovctl_start()
 {
-   run_iovctl -E
+   run_iovctl -C
 }
 
 iovctl_stop()
___
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"


Notice to appear in Court #0000157393

2015-06-27 Thread State Court
Notice to Appear,

You have to appear in the Court on the July 04.
Please, prepare all the documents relating to the case and bring them to Court 
on the specified date.
Note: If you do not come, the case will be heard in your absence.

The Court Notice is attached to this email.

Regards,
Tom Hoffman,
District Clerk.

___
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: r284892 - head/usr.sbin/bhyveload

2015-06-27 Thread Neel Natu
Author: neel
Date: Sat Jun 27 18:24:23 2015
New Revision: 284892
URL: https://svnweb.freebsd.org/changeset/base/284892

Log:
  Fix issues detected by 'mandoc -Tlint bhyveload.8'
  
  Pointed out by:   wblock
  Differential Revision:https://reviews.freebsd.org/D2762

Modified:
  head/usr.sbin/bhyveload/bhyveload.8

Modified: head/usr.sbin/bhyveload/bhyveload.8
==
--- head/usr.sbin/bhyveload/bhyveload.8 Sat Jun 27 18:01:50 2015
(r284891)
+++ head/usr.sbin/bhyveload/bhyveload.8 Sat Jun 27 18:24:23 2015
(r284892)
@@ -114,8 +114,8 @@ The default value of
 is 256M.
 .It Fl S
 Wire guest memory.
-.Sh EXAMPLES
 .El
+.Sh EXAMPLES
 To create a virtual machine named
 .Ar freebsd-vm
 that boots off the ISO image
___
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: r284893 - in head/release: . tools

2015-06-27 Thread Brad Davis
Author: brd (doc,ports committer)
Date: Sat Jun 27 20:39:13 2015
New Revision: 284893
URL: https://svnweb.freebsd.org/changeset/base/284893

Log:
  Add initial support for building Vagrant images for VMWare. Next steps will 
be adding Virtualbox support and uploading to Hashicorp Atlas for others to 
consume.
  
  Approved by:  re (gjb)

Added:
  head/release/Makefile.vagrant   (contents, props changed)
  head/release/tools/vagrant.conf   (contents, props changed)
Modified:
  head/release/Makefile.vm

Added: head/release/Makefile.vagrant
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/Makefile.vagrant   Sat Jun 27 20:39:13 2015
(r284893)
@@ -0,0 +1,94 @@
+#
+# $FreeBSD$
+#
+#
+# Makefile for uploading Vagrant boxes to Hashicorp Atlas
+#
+
+VAGRANT_UPLOAD_TGTS=   vagrant-check-depends \
+   vagrant-do-package-vmware
+#  atlas-do-upload
+CLEANFILES+=   ${VAGRANT_UPLOAD_TGTS}
+
+.if defined(VAGRANT_UPLOAD_CONF) && !empty(VAGRANT_UPLOAD_CONF)
+. for VAR in _ACCOUNT _KEY
+VAGRANT${VAR}!=grep -E ^VAGRANT${VAR} ${VAGRANT_UPLOAD_CONF} | awk -F' 
' '{print $$2}'
+. endfor
+.endif
+
+.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == 
"PRERELEASE"
+SNAPSHOT_DATE!=date +-%Y-%m-%d-%H-%M
+.endif
+
+VAGRANT_TARGET:=   ${OSRELEASE}${SNAPSHOT_DATE}.box
+
+vagrant-upload:${VAGRANT_UPLOAD_TGTS}
+
+vagrant-check-depends:
+.for VAR in _ACCOUNT _KEY
+. if !defined(VAGRANT${VAR}) || empty(VAGRANT${VAR})
+   @echo "Variable VAGRANT${VAR} cannot be empty."
+   @false
+. endif
+.endfor
+.if !exists(/usr/local/bin/curl)
+. if !exists(${PORTSDIR}/ftp/curl/Makefile)
+.  if !exists(/usr/local/sbin/pkg-static)
+   env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf
+.  endif
+   env ASSUME_ALWAYS_YES=yes pkg install -y ftp/curl
+. else
+   make -C ${PORTSDIR}/ftp/curl BATCH=1 all install clean
+. endif
+.endif
+
+vagrant-do-package: cw-vagrant
+
+vagrant-do-package-vmware: vagrant-create-vmware-vmx vagrant-do-package
+   @cd ${.OBJDIR} && echo '{"provider":"vmware_desktop"}' > metadata.json
+   cd ${.OBJDIR} && tar -czf ${VAGRANT_TARGET} metadata.json vagrant.vmx 
vagrant.vmdk
+   touch ${.OBJDIR}/${.TARGET}
+
+atlas-create-upload:
+.for PROVIDER in vmware_desktop virtualbox
+   /usr/local/bin/curl 
"https://vagrant.hashicorp.com/api/v1/box/${ATLAS_USERNAME}/${ATLAS_NAME}/version/${ATLAS_VERSION}/provider/${PROVIDER}/upload?access_token=${ATLAS_KEY}";
+.endfor
+   touch ${.OBJDIR}/${.TARGET}
+
+atlas-do-upload:
+   /usr/local/bin/curl -X PUT --upload-file \
+   ${VAGRANT_IMG} ${ATLAS_UPLOAD_PATH}
+   touch ${.OBJDIR}/${.TARGET}
+
+vagrant-create-vmware-vmx:
+   @cd ${.OBJDIR} && echo '.encoding = "UTF-8"' > vagrant.vmx
+   @cd ${.OBJDIR} && echo 'bios.bootorder = "hdd,CDROM"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'checkpoint.vmstate = ""' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'cleanshutdown = "TRUE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'config.version = "8"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'displayname = "${VAGRANT_TARGET}"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.addresstype = "generated"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.bsdname = "en0"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.connectiontype = "nat"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.displayname = "Ethernet"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.linkstatepropagation.enable = 
"FALSE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.pcislotnumber = "33"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.present = "TRUE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.virtualdev = "e1000"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'ethernet0.wakeonpcktrcv = "FALSE"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'floppy0.present = "FALSE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'guestos = "freebsd-64"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'gui.fullscreenatpoweron = "FALSE"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'gui.viewmodeatpoweron = "windowed"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'memsize = "512"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'sound.startconnected = "FALSE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'softpoweroff = "TRUE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'scsi0.pcislotnumber = "16"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'scsi0.present = "TRUE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'scsi0.virtualdev = "lsilogic"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'scsi0:0.filename = "vagrant.vmdk"' >> 
vagrant.vmx
+   @cd ${.OBJDIR} && echo 'scsi0:0.present = "TRUE"' >> vagrant.vmx
+   @cd ${.OBJDIR} && echo 'tools.synctime = "TRUE

Re: svn commit: r284893 - in head/release: . tools

2015-06-27 Thread Glen Barber
On Sat, Jun 27, 2015 at 08:39:14PM +, Brad Davis wrote:
> Author: brd (doc,ports committer)
> Date: Sat Jun 27 20:39:13 2015
> New Revision: 284893
> URL: https://svnweb.freebsd.org/changeset/base/284893
> 
> Log:
>   Add initial support for building Vagrant images for VMWare.
>   Next steps will be adding Virtualbox support and uploading to
>   Hashicorp Atlas for others to consume.
>   

Thank you very much for all your work on this!

Glen



pgp5fs824hJTg.pgp
Description: PGP signature


svn commit: r284895 - head/release

2015-06-27 Thread Glen Barber
Author: gjb
Date: Sat Jun 27 22:54:16 2015
New Revision: 284895
URL: https://svnweb.freebsd.org/changeset/base/284895

Log:
  Add default VAGRANT_IMG variable.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile.vagrant

Modified: head/release/Makefile.vagrant
==
--- head/release/Makefile.vagrant   Sat Jun 27 22:48:22 2015
(r284894)
+++ head/release/Makefile.vagrant   Sat Jun 27 22:54:16 2015
(r284895)
@@ -5,6 +5,7 @@
 # Makefile for uploading Vagrant boxes to Hashicorp Atlas
 #
 
+VAGRANT_IMG?=  ${.OBJDIR}/vagrant.vmdk
 VAGRANT_UPLOAD_TGTS=   vagrant-check-depends \
vagrant-do-package-vmware
 #  atlas-do-upload
___
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: r284896 - head/release

2015-06-27 Thread Glen Barber
Author: gjb
Date: Sat Jun 27 22:59:29 2015
New Revision: 284896
URL: https://svnweb.freebsd.org/changeset/base/284896

Log:
  Remove _ACCOUNT and add _USERNAME, _NAME, _VERSION for the
  VAGRANT_${VAR} variables extracted from VAGRANT_UPLOAD_CONF.
  
  Set ATLAS_${VAR} to VAGRANT_${VAR} if VAGRANT_UPLOAD_CONF
  is set.  There is intent to intentionally have separate
  variants of configuration entries, but the defaults do not
  yet have any reason to be different.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile.vagrant

Modified: head/release/Makefile.vagrant
==
--- head/release/Makefile.vagrant   Sat Jun 27 22:54:16 2015
(r284895)
+++ head/release/Makefile.vagrant   Sat Jun 27 22:59:29 2015
(r284896)
@@ -12,8 +12,9 @@ VAGRANT_UPLOAD_TGTS=  vagrant-check-depen
 CLEANFILES+=   ${VAGRANT_UPLOAD_TGTS}
 
 .if defined(VAGRANT_UPLOAD_CONF) && !empty(VAGRANT_UPLOAD_CONF)
-. for VAR in _ACCOUNT _KEY
-VAGRANT${VAR}!=grep -E ^VAGRANT${VAR} ${VAGRANT_UPLOAD_CONF} | awk -F' 
' '{print $$2}'
+. for VAR in _KEY _USERNAME _NAME _VERSION
+VAGRANT${VAR}!=grep -E ^VAGRANT${VAR} ${VAGRANT_UPLOAD_CONF} | 
awk -F' ' '{print $$2}'
+ATLAS${VAR}:=  ${VAGRANT${VAR}}
 . endfor
 .endif
 
@@ -26,7 +27,7 @@ VAGRANT_TARGET:=  ${OSRELEASE}${SNAPSHOT_
 vagrant-upload:${VAGRANT_UPLOAD_TGTS}
 
 vagrant-check-depends:
-.for VAR in _ACCOUNT _KEY
+.for VAR in _KEY _USERNAME _NAME _VERSION
 . if !defined(VAGRANT${VAR}) || empty(VAGRANT${VAR})
@echo "Variable VAGRANT${VAR} cannot be empty."
@false
___
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: r284897 - head/release

2015-06-27 Thread Glen Barber
Author: gjb
Date: Sat Jun 27 23:03:28 2015
New Revision: 284897
URL: https://svnweb.freebsd.org/changeset/base/284897

Log:
  Instead of hard-coding the PROVIDERS for upload, add the
  VAGRANT_PROVIDERS variable.  Right now, it defaults to only
  vmware_desktop, virtualbox support is to follow at some point.
  
  While here, fix the hashicorp URL: s/vagrant/atlas/, which
  was result of a sed(1) replace (and my fault).
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile.vagrant

Modified: head/release/Makefile.vagrant
==
--- head/release/Makefile.vagrant   Sat Jun 27 22:59:29 2015
(r284896)
+++ head/release/Makefile.vagrant   Sat Jun 27 23:03:28 2015
(r284897)
@@ -23,6 +23,8 @@ SNAPSHOT_DATE!=   date +-%Y-%m-%d-%H-%M
 .endif
 
 VAGRANT_TARGET:=   ${OSRELEASE}${SNAPSHOT_DATE}.box
+VAGRANT_PROVIDERS?=vmware_desktop
+#VAGRANT_PROVIDERS+=   virtualbox
 
 vagrant-upload:${VAGRANT_UPLOAD_TGTS}
 
@@ -52,8 +54,8 @@ vagrant-do-package-vmware: vagrant-creat
touch ${.OBJDIR}/${.TARGET}
 
 atlas-create-upload:
-.for PROVIDER in vmware_desktop virtualbox
-   /usr/local/bin/curl 
"https://vagrant.hashicorp.com/api/v1/box/${ATLAS_USERNAME}/${ATLAS_NAME}/version/${ATLAS_VERSION}/provider/${PROVIDER}/upload?access_token=${ATLAS_KEY}";
+.for PROVIDER in ${VAGRANT_PROVIDERS}
+   /usr/local/bin/curl 
"https://atlas.hashicorp.com/api/v1/box/${ATLAS_USERNAME}/${ATLAS_NAME}/version/${ATLAS_VERSION}/provider/${PROVIDER}/upload?access_token=${ATLAS_KEY}";
 .endfor
touch ${.OBJDIR}/${.TARGET}
 
___
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: r284898 - in head: . share/mk

2015-06-27 Thread Baptiste Daroussin
Author: bapt
Date: Sat Jun 27 23:28:56 2015
New Revision: 284898
URL: https://svnweb.freebsd.org/changeset/base/284898

Log:
  Make all shared library a relative symlink
  
  This makes sysroot usable for cross building, it also removes the need for
  _SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no time
  to test it)
  
  Differential Revision:https://reviews.freebsd.org/D2920
  Submitted by: imp, adrian
  Tested by:adrian

Modified:
  head/Makefile.inc1
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.own.mk

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Jun 27 23:03:28 2015(r284897)
+++ head/Makefile.inc1  Sat Jun 27 23:28:56 2015(r284898)
@@ -297,7 +297,6 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOB
 
 # world stage
 WMAKEENV=  ${CROSSENV} \
-   _SHLIBDIRPREFIX=${WORLDTMP} \
_LDSCRIPTROOT= \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
@@ -439,7 +438,6 @@ LIB32FLAGS+=--sysroot=${WORLDTMP}
 
 # Yes, the flags are redundant.
 LIB32WMAKEENV+=MAKEOBJDIRPREFIX=${LIB32_OBJTREE} \
-   _SHLIBDIRPREFIX=${LIB32TMP} \
_LDSCRIPTROOT=${LIB32TMP} \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
@@ -2123,7 +2121,6 @@ XDTP?=/usr/${XDDIR}
 CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
INSTALL="sh ${.CURDIR}/tools/install.sh"
 CDENV= ${CDBENV} \
-   _SHLIBDIRPREFIX=${XDDESTDIR} \
TOOLS_PREFIX=${XDTP}
 CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
--sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkSat Jun 27 23:03:28 2015(r284897)
+++ head/share/mk/bsd.lib.mkSat Jun 27 23:28:56 2015(r284898)
@@ -362,7 +362,7 @@ _libinstall:
 .if ${_SHLIBDIR} == ${_LIBDIR}
${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
 .else
-   ${INSTALL_SYMLINK} ${_SHLIBDIRPREFIX}${_SHLIBDIR}/${SHLIB_NAME} \
+   ${INSTALL_RSYMLINK} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
 .if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
-chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkSat Jun 27 23:03:28 2015(r284897)
+++ head/share/mk/bsd.own.mkSat Jun 27 23:28:56 2015(r284898)
@@ -222,9 +222,11 @@ INCLUDEDIR?=   /usr/include
 #
 HRDLINK?=  -l h
 SYMLINK?=  -l s
+RSYMLINK?= -l rs
 
 INSTALL_LINK?= ${INSTALL} ${HRDLINK}
 INSTALL_SYMLINK?=  ${INSTALL} ${SYMLINK}
+INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK}
 
 # Common variables
 .if !defined(DEBUG_FLAGS)
___
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: r284898 - in head: . share/mk

2015-06-27 Thread Garrett Cooper

> On Jun 27, 2015, at 16:28, Baptiste Daroussin  wrote:
> 
> Author: bapt
> Date: Sat Jun 27 23:28:56 2015
> New Revision: 284898
> URL: https://svnweb.freebsd.org/changeset/base/284898
> 
> Log:
>  Make all shared library a relative symlink
> 
>  This makes sysroot usable for cross building, it also removes the need for
>  _SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no 
> time
>  to test it)
> 
>  Differential Revision:https://reviews.freebsd.org/D2920
>  Submitted by:imp, adrian
>  Tested by:adrian

Thank you!!! Now all you need to do is fix the ldscripts (lib/libc, etc) to not 
have absolute paths.
___
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: r284901 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include

2015-06-27 Thread Konstantin Belousov
Author: kib
Date: Sun Jun 28 05:04:08 2015
New Revision: 284901
URL: https://svnweb.freebsd.org/changeset/base/284901

Log:
  Remove unneeded data dependency, currently imposed by
  atomic_load_acq(9), on it source, for x86.
  
  Right now, atomic_load_acq() on x86 is sequentially consistent with
  other atomics, code ensures this by doing store/load barrier by
  performing locked nop on the source.  Provide separate primitive
  __storeload_barrier(), which is implemented as the locked nop done on
  a cpu-private variable, and put __storeload_barrier() before load, to
  keep seq_cst semantic but avoid introducing false dependency on the
  no-modification of the source for its later use.
  
  Note that seq_cst property of x86 atomic_load_acq() is not documented
  and not carried by atomics implementations on other architectures,
  although some kernel code relies on the behaviour.  This commit does
  not intend to change this.
  
  Reviewed by:  alc
  Discussed with:   bde
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks

Modified:
  head/sys/amd64/amd64/atomic.c
  head/sys/amd64/amd64/vm_machdep.c
  head/sys/amd64/include/atomic.h
  head/sys/i386/i386/vm_machdep.c
  head/sys/i386/include/atomic.h

Modified: head/sys/amd64/amd64/atomic.c
==
--- head/sys/amd64/amd64/atomic.c   Sun Jun 28 03:22:26 2015
(r284900)
+++ head/sys/amd64/amd64/atomic.c   Sun Jun 28 05:04:08 2015
(r284901)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 #undef ATOMIC_ASM
 
 /* Make atomic.h generate public functions */
+static __inline void __storeload_barrier(void);
 #define WANT_FUNCTIONS
 #define static
 #undef __inline

Modified: head/sys/amd64/amd64/vm_machdep.c
==
--- head/sys/amd64/amd64/vm_machdep.c   Sun Jun 28 03:22:26 2015
(r284900)
+++ head/sys/amd64/amd64/vm_machdep.c   Sun Jun 28 05:04:08 2015
(r284901)
@@ -93,6 +93,8 @@ _Static_assert(OFFSETOF_CURTHREAD == off
 "OFFSETOF_CURTHREAD does not correspond with offset of pc_curthread.");
 _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb),
 "OFFSETOF_CURPCB does not correspond with offset of pc_curpcb.");
+_Static_assert(OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf),
+"OFFSETOF_MONINORBUF does not correspond with offset of pc_monitorbuf.");
 
 struct savefpu *
 get_pcb_user_save_td(struct thread *td)

Modified: head/sys/amd64/include/atomic.h
==
--- head/sys/amd64/include/atomic.h Sun Jun 28 03:22:26 2015
(r284900)
+++ head/sys/amd64/include/atomic.h Sun Jun 28 05:04:08 2015
(r284901)
@@ -85,7 +85,7 @@ u_longatomic_fetchadd_long(volatile u_l
 intatomic_testandset_int(volatile u_int *p, u_int v);
 intatomic_testandset_long(volatile u_long *p, u_int v);
 
-#defineATOMIC_LOAD(TYPE, LOP)  \
+#defineATOMIC_LOAD(TYPE)   \
 u_##TYPE   atomic_load_acq_##TYPE(volatile u_##TYPE *p)
 #defineATOMIC_STORE(TYPE)  \
 void   atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)
@@ -245,53 +245,79 @@ atomic_testandset_long(volatile u_long *
  * We assume that a = b will do atomic loads and stores.  Due to the
  * IA32 memory model, a simple store guarantees release semantics.
  *
- * However, loads may pass stores, so for atomic_load_acq we have to
- * ensure a Store/Load barrier to do the load in SMP kernels.  We use
- * "lock cmpxchg" as recommended by the AMD Software Optimization
- * Guide, and not mfence.  For UP kernels, however, the cache of the
- * single processor is always consistent, so we only need to take care
- * of the compiler.
+ * However, a load may pass a store if they are performed on distinct
+ * addresses, so for atomic_load_acq we introduce a Store/Load barrier
+ * before the load in SMP kernels.  We use "lock addl $0,mem", as
+ * recommended by the AMD Software Optimization Guide, and not mfence.
+ * In the kernel, we use a private per-cpu cache line as the target
+ * for the locked addition, to avoid introducing false data
+ * dependencies.  In userspace, a word in the red zone on the stack
+ * (-8(%rsp)) is utilized.
+ *
+ * For UP kernels, however, the memory of the single processor is
+ * always consistent, so we only need to stop the compiler from
+ * reordering accesses in a way that violates the semantics of acquire
+ * and release.
  */
-#defineATOMIC_STORE(TYPE)  \
-static __inline void   \
-atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\
-{  \
-   __compiler_membar();\
-   *p = 

Re: svn commit: r284898 - in head: . share/mk

2015-06-27 Thread Adrian Chadd
On 27 June 2015 at 20:37, Garrett Cooper  wrote:
>
>> On Jun 27, 2015, at 16:28, Baptiste Daroussin  wrote:
>>
>> Author: bapt
>> Date: Sat Jun 27 23:28:56 2015
>> New Revision: 284898
>> URL: https://svnweb.freebsd.org/changeset/base/284898
>>
>> Log:
>>  Make all shared library a relative symlink
>>
>>  This makes sysroot usable for cross building, it also removes the need for
>>  _SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no 
>> time
>>  to test it)
>>
>>  Differential Revision:https://reviews.freebsd.org/D2920
>>  Submitted by:imp, adrian
>>  Tested by:adrian
>
> Thank you!!! Now all you need to do is fix the ldscripts (lib/libc, etc) to 
> not have absolute paths.

Yup! But it's baby steps.

I'm looking at the netbsd gcc patches right now to see how they fixed
up sysroot. It doesn't look like they fully fixed gcc sysroot
behaviour. :(



-a
___
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: r284898 - in head: . share/mk

2015-06-27 Thread Garrett Cooper

> On Jun 27, 2015, at 22:31, Adrian Chadd  wrote:
> 
>> On 27 June 2015 at 20:37, Garrett Cooper  wrote:
>> 
>>> On Jun 27, 2015, at 16:28, Baptiste Daroussin  wrote:
>>> 
>>> Author: bapt
>>> Date: Sat Jun 27 23:28:56 2015
>>> New Revision: 284898
>>> URL: https://svnweb.freebsd.org/changeset/base/284898
>>> 
>>> Log:
>>> Make all shared library a relative symlink
>>> 
>>> This makes sysroot usable for cross building, it also removes the need for
>>> _SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no 
>>> time
>>> to test it)
>>> 
>>> Differential Revision:https://reviews.freebsd.org/D2920
>>> Submitted by:imp, adrian
>>> Tested by:adrian
>> 
>> Thank you!!! Now all you need to do is fix the ldscripts (lib/libc, etc) to 
>> not have absolute paths.
> 
> Yup! But it's baby steps.
> 
> I'm looking at the netbsd gcc patches right now to see how they fixed
> up sysroot. It doesn't look like they fully fixed gcc sysroot
> behaviour. :(

How is it broken?
___
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"